Course Project Presenter
2026-11-03
With fluctuating fuel costs, consumers and manufacturers need simple, rapid tools to estimate a vehicle's fuel economy during early design or purchase phases.
The Car Fuel Efficiency Predictor provides an intuitive, web-accessible tool to solve this problem dynamically.
The app uses a reliable multivariable linear regression model derived from the trusted R mtcars dataset, factoring in vehicle weight (wt) and transmission type (am).
fit <- lm(mpg ~ wt + am, data = mtcars)
summary(fit)$coefficients
Estimate Std. Error t value Pr(>|t|)
(Intercept) 37.32155131 3.0546385 12.21799285 5.843477e-13
wt -5.35281145 0.7882438 -6.79080719 1.867415e-07
am -0.02361522 1.5456453 -0.01527855 9.879146e-01
When a user adjusts inputs in the application, the server.R backend executes a predictive matrix multiplication behind the scenes.
For instance, assuming a vehicle weight of 3,200 lbs (wt = 3.2) and an Automatic Transmission (am = 0):
example_input <- data.frame(wt = 3.2, am = 0)
predict(lm(mpg ~ wt + am, data = mtcars), newdata = example_input)
1
20.19255
Experience how straightforward data product interactions can be.
ui.R and server.R files on GitHub.