2025-10-28

Why This App?

  • Fuel efficiency matters
  • Quick MPG estimate from simple inputs
  • Based on classic mtcars dataset
  • Beginner-friendly UI πŸš—βœ¨

The Model Used βœ…

This is the prediction model your Shiny app uses:

model <- lm(mpg ~ wt + hp + am, data = mtcars) summary(model)

Demo Prediction βœ…

Example prediction for a manual car, weight = 3, hp = 110:

pred <- predict( model, newdata = data.frame(wt = 3, hp = 110, am = 1), se.fit = TRUE ) paste0(round(pred\(fit, 2), " MPG (Β±", round(pred\)se.fit, 2), ” SE)β€œ)

MPG vs Weight Plot βœ…

library(plotly) p <- plot_ly(mtcars, x = ~wt, y = ~mpg, type = β€œscatter”, mode = β€œmarkers”) p

Try It Live 🎯