Developing Data Products: Pitch for my Shiny App

Cindy Neo

02 May 2024

A Shiny Project

A shiny project is a directory containing at least two files:

Introduction

The dataset used for building the shiny app is from the mtcars dataset in R.

The data was extracted from the 1974 Motor Trend US magazine, and comprises fuel consumption and 10 aspects of automobile design and performance for 32 automobiles (1973–74 models).

Predict MPG from Weight

## Create scatterplot
plot(mpg ~ wt, data = mtcars, xlab = "Weight", ylab = "Miles per Gallon")

## Fit regression model
fit <- lm(mpg ~ wt, data = mtcars)

## Add fitted regression line to scatterplot
abline(fit)