| Title: | EPA Fuel Economy Data | 
| Version: | 1.0.0 | 
| Description: | Fuel economy data from the EPA, 1985-2015, conveniently packaged for consumption by R users. | 
| License: | CC0 | 
| URL: | https://github.com/hadley/fueleconomy | 
| BugReports: | https://github.com/hadley/fueleconomy/issues | 
| Depends: | R (≥ 3.1.0) | 
| Suggests: | dplyr | 
| Encoding: | UTF-8 | 
| LazyData: | true | 
| RoxygenNote: | 7.1.0 | 
| NeedsCompilation: | no | 
| Packaged: | 2020-03-23 14:55:12 UTC; hadley | 
| Author: | Hadley Wickham [aut, cre] | 
| Maintainer: | Hadley Wickham <hadley@rstudio.com> | 
| Repository: | CRAN | 
| Date/Publication: | 2020-03-23 15:30:02 UTC | 
Common models
Description
These models have at least 10 years worth of data. This dataset is suitable for a left-join designed to restrict the number of observations to a more manageable level.
Usage
common
Format
A dataset with variables make, model, n (total number of models) and years (total number of model-years).
Examples
if (require("dplyr")) {
vehicles %>% semi_join(common)
}
Vehicle data
Description
Fuel economy data from the EPA, 1985-2015. This dataset contains selected varaibles, and removes vehicles with incomplete data (e.g. no drive train data)
Usage
vehicles
Format
A data frame with variables:
- id
- Unique EPA identifier 
- make
- Manufacturer 
- model
- Model name 
- year
- Model year 
- class
- EPA vehicle size class, http://www.fueleconomy.gov/feg/ws/wsData.shtml#VClass 
- trans
- Transmission 
- drive
- Drive train 
- cyl
- Number of cylinders 
- displ
- Engine displacement, in litres 
- fuel
- Fuel type 
- hwy
- Highway fuel economy, in mpg 
- cty
- City fuel economy, in mpg 
Source
http://www.fueleconomy.gov/feg/download.shtml
Examples
if (require("dplyr")) {
vehicles
vehicles %>% group_by(year) %>% summarise(cty = mean(cty))
}