December 24, 2025

Introduction

This project presents a simple Shiny application that explores the relationship between car transmission type and fuel efficiency (MPG) using an interactive interface.

Problem Statement

Many users want to know whether automatic or manual cars give better mileage. This app makes it easy to understand MPG differences visually and numerically.

Application Features

  • Built using R Shiny
  • Uses the built-in mtcars dataset
  • Radio button input for transmission type
  • Displays average MPG and a comparison plot

Data Analysis

# Load dataset
data(mtcars)

# Convert transmission to factor with labels
mtcars$am <- factor(mtcars$am, labels = c("Automatic", "Manual"))

# Calculate average MPG by transmission type
avg_mpg <- aggregate(mpg ~ am, data = mtcars, mean)
avg_mpg
##          am      mpg
## 1 Automatic 17.14737
## 2    Manual 24.39231