powered by
Please note that, even with a strong internet connection, this function may take several minutes to download relevant data.
get_weather(station, year, dir)
A character string---the airport of interest (use the FAA LID airport code).
The year of interest, as an integer (unquoted). Currently, years 2015 and on are supported.
The folder for the dataset to be saved in
A data frame with ~25,000 rows and 15 variables:
Weather station. Named origin to facilitate merging with flights data
Time of recording
Temperature and dewpoint in F
Relative humidity
Wind direction (in degrees), speed and gust speed (in mph)
Precipitation, in inches
Sea level pressure in millibars
Visibility in miles
Date and hour of the recording as a POSIXct date
POSIXct
get_flights for flight data, get_airports for airport data, get_airlines for airline data, and anyflights for a wrapper function
get_flights
get_airports
get_airlines
anyflights
# NOT RUN { get_weather(station = "PDX", year = 2015, dir = tempdir()) # }
Run the code above in your browser using DataLab