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)
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 |
FAA Aircraft registry, https://www.faa.gov/licenses_certificates/aircraft_certification/aircraft_registry/releasable_aircraft_download/
A data frame with ~3500 rows and 9 variables:
Tail number
Year manufactured
Type of plane
Manufacturer and model
Number of engines and seats
Average cruising speed in mph
Type of engine
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.
# 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))