Cindy Neo
02 May 2024
A shiny project is a directory containing at least two files:
ui.R (for user interface) to control how the app looks
server.R to control what the app does
The files for the shiny app is available on GitHub: https://github.com/CindyNeo/Developing-Data-Products-Course-Project
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).
## 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)Here’s the link to view the Shiny App: https://cindyneo.shinyapps.io/PredictionApp/
Thank you!