Description Usage Arguments Value Author(s) Examples
View source: R/getWeatherData.R
get Weather data from NOAA Web API for a given location, time period, and distance range in miles
Available metrics: "p_official" : calculated Geonor precip total for hour (mm) "rh_std" : RH std dev for hour (percent) "solarad" : Average solar radiation for the hour (W m-2) "t_ max" : Calculated maximum temp for hour (deg_C) "t_min" : Calculated minimum temp for hour (deg_C) "t_official" : calculated average temp for hour (deg_C) "windspd" : average 1.5m wind speed for the hour (m s-1) "ws_max" : 10sec maximum 1.5m wind speed for the hour (m s-1)
1 2 | getWeatherData(online = TRUE, location, state, from = "2017-01-01",
to = "2017-01-02", range = NA)
|
online |
if TRUE(default),realtime data is pulled from the API. if FALSE, data is pulled from sample offline database |
location |
Valid location supported by NOAA, use |
state |
Valid two letter code of US state |
from |
Beginning of date range. Default: 2017-01-01 |
to |
End of date rage. Default: 2017-01-02 |
range |
Select other available locations within the radial distance of specified location |
a dataframe of with all the metrics mentioned at hourly granularity
Sagar Ganapaneni (sagar123)
1 2 3 4 5 6 7 8 9 | ## Not run:
data <- getWeatherData(online=TRUE,
location="Austin",state="TX",from="2017-01-10",
to="2017-01-11")
data <- getWeatherData(online=FALSE,
location="Austin",state="TX",from="2017-01-10",
to="2017-01-11",range=120)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.