get_weather: Retrieve historical or forecasted weather

Description Usage Arguments Details Value Examples

View source: R/get_weather.R

Description

Returns historical or forecasted temperature (F), precipitation (T/F), and wind speed (mph). Only available for United States locations. Forecast limited to next seven days.

Usage

1
get_weather(.dates, lat, long)

Arguments

.dates

a vector of dates

lat

a double representing latitude in decimal format

long

a double representing longitude in decimal format

Details

Temperature is the max daily temperature, precipitation is TRUE if historical is greater than 0.1 inches or forecast probability is greater than 0.35, and wind speed is the fastest 2-minute wind speed.

Value

a tibble of weather data with nrows == length(.dates)

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
set_api_key_noaa('<key>')
set_api_key_openweather('<key>')
dates <- Sys.Date() + -10:5
lat <- 40.7812
long <- -73.9665
get_weather(dates, lat, long)

## End(Not run)

joemarlo/simpleweather documentation built on Dec. 21, 2021, 1:19 a.m.