2025-03-11

knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE)
library(ggplot2)
data(mtcars)

The Problem: Estimating Fuel Efficiency

  • Car buyers want to know the expected fuel efficiency (MPG) of vehicles
  • Fuel efficiency is influenced by multiple car specifications
  • Comparing MPG across different car models can be challenging
  • Our app provides an easy way to estimate MPG based on key specifications

My Solution: MPG Predictor App

The Car MPG Predictor app allows users to:

  • Input car specifications through an intuitive interface
  • See instant MPG predictions based on a statistical model
  • Compare their car to others in the dataset
  • Understand how different specifications affect fuel efficiency
## [1] 0.8490314

My model explains approximately 84.9% of the variation in MPG.

How It Works: Under the Hood

##    1 
## 21.6

The app uses a linear regression model that: - Takes user inputs for weight, horsepower, cylinders, and transmission - Applies coefficients derived from the mtcars dataset - Returns an estimated MPG value - Visualizes the prediction in context with other cars

Try It Yourself!

Benefits of My App:

  • Simple: Easy-to-use interface with sliders and dropdown menus
  • Educational: Learn how car specifications affect fuel efficiency
  • Practical: Make informed decisions when purchasing a vehicle
  • Visual: See how your car compares to others in a scatter plot

Get Started:

  • Visit our Shiny app: Car MPG Predictor
  • Enter your car’s specifications
  • Instantly see the predicted MPG
  • Explore how changing specifications affects fuel efficiency