This function generates a dataframe similar to the planes dataset from nycflights13 for any US airports and time frame. Please note that, even with a strong internet connection, this function may take several minutes to download relevant data.

get_planes(year, dir = NULL, flights_data = NULL)

Arguments

year

A numeric giving the year of interest. This argument is currently not vectorized, as dataset sizes for single years are significantly large. Information for the most recent year is usually available by February or March in the following year.

dir

An optional character string giving the directory to save datasets in. By default, datasets will not be saved to file.

flights_data

Optional---either a filepath as a character string or a dataframe outputted by get_flights that will be used to subset the output to only include relevant carriers/planes. If not supplied, all carriers/planes will be returned.

Source

FAA Aircraft registry, https://www.faa.gov/licenses_certificates/aircraft_certification/aircraft_registry/releasable_aircraft_download/

Value

A data frame with ~3500 rows and 9 variables:

tailnum

Tail number

year

Year manufactured

type

Type of plane

manufacturer, model

Manufacturer and model

engines, seats

Number of engines and seats

speed

Average cruising speed in mph

engine

Type of engine

See also

get_flights for flight data, get_weather for weather data, get_airlines for airlines data, get_airports for airports data, or anyflights for a wrapper function.

Use the as_flights_package function to convert this dataset to a data-only package.

Examples


# grab airplanes data for 2018
if (FALSE) get_planes(2018)

# if you'd like to only return the planes that appear 
# in \code{flights}, query your flights dataset first, 
# and then supply it as a \code{flights_data} argument
if (FALSE) get_planes(2018, 
                 flights_data = get_flights("PDX", 2018, 6))