Car MPG Predictor

Neo Ramaota

Application Overview

This presentation pitches the Car MPG Predictor Shiny application.

  • Problem: Users want to quickly estimate a car’s fuel efficiency based on its engine power.
  • Solution: An intuitive, interactive web application.
  • Data: Built on the standard mtcars dataset included in R.

The Application Interface

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:

https://yuj1ia-neo-ramaota.shinyapps.io/carmpg/

The Prediction Algorithm (Server Logic)

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