Created on: June 19, 2025
This presentation pitches a Shiny app that predicts a car’s miles per gallon (mpg) based on its weight using the mtcars dataset. It’s designed for easy use by novices, with interactive features and clear documentation.
June 19, 2025
Created on: June 19, 2025
This presentation pitches a Shiny app that predicts a car’s miles per gallon (mpg) based on its weight using the mtcars dataset. It’s designed for easy use by novices, with interactive features and clear documentation.
Purpose: Predict mpg using a simple linear regression model.
Dataset: mtcars (built-in R dataset with 32 cars).
Features: Slider input for weight, reactive mpg prediction.
Step 1: Open the app at the provided link.
Step 2: Adjust the “Weight” slider (1.5–5.5 thousand lbs).
Step 3: View the predicted mpg, which updates instantly.
No R knowledge needed—just slide and explore!
knitr::opts_chunk$set(echo = FALSE) library(plotly)
## Loading required package: ggplot2
## ## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2': ## ## last_plot
## The following object is masked from 'package:stats': ## ## filter
## The following object is masked from 'package:graphics': ## ## layout
This scatter plot with a regression line shows the relationship modeled by the app.
Offers a simple, interactive tool for car efficiency predictions.
Code on GitHub: https://github.com/Yuemin2025/Developing_Data_Products
App on Shinyapps.io: https://yuemin2025.shinyapps.io/mpg_prediction/