downloadflightlogs: Download flight logs from the Bureau of Transportation...

Description Usage Arguments Details References See Also Examples

Description

Download flight logs for a given year, and months, to the folder specified.

Usage

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

Arguments

year

Year for which the logs should be downloaded. Numeric vector of length=1.

month

Months for which logs should be downloaded for the given year.

path

Path excluding the directory to download logs to.

dir

Directory within path where the logs will be downloaded to.

verbose

TRUE provide messages to the console.

Details

downloadflightlogs creates a folder under the path path/dir and downloads flight logs for the year year and months specified in month. After downloading all the logs, they will be automatically replaced with corresponding unzipped versions. If an unzipped log already exists, then download of that log will be skipped. If a log that was downloaded was corrupted, it'll be deleted automatically and will be attemped again for download+unzip. If it fails again, the download of that log will be skipped (with a warning).

As long as unzipped logs exist in the directory, they won't be downloaded again. So, it is preferred to keep using the same directory without deleting the logs that've been already downloaded, to save time.

References

https://github.com/hadley/nycflights13 http://www.transtats.bts.gov/DL_SelectFields.asp?Table_ID=236

See Also

flights, nycflights14, nycdelays14, nycweatherdelays14

Examples

1
2
3
4
## Not run: 
dt = downloadflightlogs(month=1:2, year=2014, path="~/Downloads")

## End(Not run)

arunsrinivasan/flights documentation built on May 12, 2019, 3:42 a.m.