This function read the the weather information of a airport from the website of NOAA's National Weather Service.

current_weather(id,type)

Arguments

id

one 4 digits code of the airport

type

a vector of weather elements

Value

a data frame of the weather information

Examples

current_weather("KAMW", c("wind_mph", "temp_f", "haha"))
#> Some of your types are not found! They are shown as NA!
#> 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