getWeatherData: get Weather data

Description Usage Arguments Value Author(s) Examples

View source: R/getWeatherData.R

Description

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)

Usage

1
2
getWeatherData(online = TRUE, location, state, from = "2017-01-01",
  to = "2017-01-02", range = NA)

Arguments

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 getAllLocations for view avaialble locations.

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

Value

a dataframe of with all the metrics mentioned at hourly granularity

Author(s)

Sagar Ganapaneni (sagar123)

Examples

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)

NOAAWeather documentation built on March 21, 2018, 5:08 p.m.