The Idea
A simple app that predicts fuel efficiency (MPG) based on: - Car
weight
- Engine cylinders
Built using real data from mtcars.
How It Works
- Uses a linear regression model
- Inputs:
- Output:
Example (Live R Code)
model <- lm(mpg ~ wt + cyl, data = mtcars)
predict(model, data.frame(wt = 3, cyl = 6))
## 1
## 21.06658
Why It’s Useful
- Helps understand how car features affect fuel efficiency
- Interactive and beginner-friendly
- Demonstrates real data modeling
Try It Yourself
- Deployed on ShinyApps.io
- GitHub repo includes full code
- Easy to use with clear instructions