Package 'fueleconomy'

Title: EPA Fuel Economy Data
Description: Fuel economy data from the EPA, 1985-2015, conveniently packaged for consumption by R users.
Authors: Hadley Wickham [aut, cre]
Maintainer: Hadley Wickham <[email protected]>
License: CC0
Version: 1.0.0.9000
Built: 2024-08-31 04:34:53 UTC
Source: https://github.com/hadley/fueleconomy

Help Index


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))
}