Automated download and load entire flights data, and functions for generating NYC flights, delay and weather delay for 2014.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
R Flights data for 2014. Jan 13, 2015
man Flights data for 2014. Jan 13, 2015


flights contains functions to download and load flights data from the Bureau of Transportation Statistics. It also contains functions to generate On-time data for flights that departed from NYC (i.e. JFK, LGA or EWR) in 2014. Specifically, nycflights14, nycdelays14 and nycweatherdelays14.


To install the package, use devtools:



Download flight logs

downloadflightlogs (year = 2014L, month = 1:12, path = "./", dir = "flights", 
    verbose = TRUE)

The function takes a year and month argument and downloads all the logs available from here and places them in the directory path/dir. The downloaded files are automatically replaced with their unzipped versions. If an unzipped log file already exists, then the downloads are skipped. And if the downloaded file was corrupted (which would error while unzipping), then we attempt to download it just once again. If it fails again, we skip this log.

Load entire flights data

flights (year = 2014L, month = 1:12, path = "./", dir = "flights", 
    select = NULL, verbose = TRUE) 

This loads all the 100+ columns for the downloaded logs. Note that at the time of writing, logs for 2014 are available until the month of October.


nycflights14 (path = "./", dir = "flights", verbose = TRUE)

Loads columns identical to flights data from nycflights13, except for the year 2014.


nycflights14 (path = "./", dir = "flights", verbose = TRUE)

Loads columns providing additional information about the type of delays for all flights that departed from NYC in 2014.


nycweatherflights14 (path = "./", dir = "flights", verbose = TRUE)

Same as above, but returns only those rows where weather_delay > 0L.