This presentation pitches the Car MPG Predictor Shiny application.
mtcars dataset included in R.The app consists of a simple layout: - A slider input on the right side to select Horsepower (hp). - A text output on the left side that displays the predicted MPG.
You can access the live application here:
Behind the scenes, the app fits a simple linear regression model when it loads.
library(datasets) # Fit a linear model predicting mpg from horsepower fit <- lm(mpg ~ hp, data = mtcars) summary(fit)$coefficients