get_noaa: Retrieve historical weather data from the NOAA API

Description Usage Arguments Value References Examples

View source: R/get_weather.R

Description

Returns daily temperature (Fahrenheit), precipitation (T/F), or wind (mph) data using the NOAA API. Must set API key via set_api_key_noaa() prior to use. Request key here get key here https://www.ncdc.noaa.gov/cdo-web/token.

Usage

1
get_noaa(.date_start, .date_end, noaa_station)

Arguments

.date_start

the starting date to retrieve data for

.date_end

the end date to retrieve data for

noaa_station

the id of the NOAA station

Value

a tibble of weather data

References

https://www.ncdc.noaa.gov/cdo-web/webservices/v2

Examples

1
2
3
4
5
6
7
8
## Not run: 
set_api_key_noaa('<key>')
date_start <- '2021-09-10'
date_end <- '2021-09-22'
noaa_station <- 'GHCND:USW00094728'
get_noaa(date_start, date_end, noaa_station)

## End(Not run)

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