epa2012 | R Documentation |
Details from the EPA.
epa2012
A data frame with 1129 observations on the following 28 variables.
a numeric vector
Manufacturer name.
Vehicle division.
Vehicle line.
Manufacturer code.
Model type index.
Engine displacement.
Number of cylinders.
Transmission speed.
City mileage.
Highway mileage.
Combined mileage.
Whether the car is considered a "guzzler" or not, a factor with levels N
and Y.
Air aspiration method.
Air aspiration method description.
Transmission type.
Transmission type description.
Number of gears.
Whether transmission locks up, a factor with levels N
and Y
.
A factor with level N
only.
Drive system, a factor with levels.
Drive system description.
Fuel usage, a factor with levels.
Fuel usage description.
Class of car.
Car or truck, a factor with levels car
, 1
, 2
.
Date of vehicle release.
Whether the car has a fuel cell or not, a factor with levels N
, Y
.
Fueleconomy.gov, Shared MPG Estimates: Toyota Prius 2012.
epa2021
library(ggplot2)
library(dplyr)
# Variable descriptions
distinct(epa2012, air_aspir_method_desc, air_aspir_method)
distinct(epa2012, transmission_desc, transmission)
distinct(epa2012, drive_desc, drive_sys)
distinct(epa2012, fuel_usage_desc, fuel_usage)
# Guzzlers and their mileages
ggplot(epa2012, aes(x = city_mpg, y = hwy_mpg, color = guzzler)) +
geom_point() +
facet_wrap(~guzzler, ncol = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.