This function read the the weather information of a airport from the website of NOAA's National Weather Service.
current_weather(id,type)
id | one 4 digits code of the airport |
---|---|
type | a vector of weather elements |
a data frame of the weather information
#>#> location station_id latitude longitude #> 1 Ames, Ames Municipal Airport, IA KAMW 41.99056 -93.61889 #> observation_time wind_mph temp_f haha #> 1 Last Updated on May 7 2019, 1:53 pm CDT 11.5 60.0 <NA>current_weather("KAMW", "temp_c")#> location station_id latitude longitude #> 1 Ames, Ames Municipal Airport, IA KAMW 41.99056 -93.61889 #> observation_time temp_c #> 1 Last Updated on May 7 2019, 1:53 pm CDT 15.6