lcd: Local Climitalogical Data from NOAA

Description Usage Arguments Value Note References Examples

View source: R/lcd.R

Description

Local Climitalogical Data from NOAA

Usage

1
lcd(station, year, ...)

Arguments

station

(character) station code, e.g., "02413099999". we will allow integer/numeric passed here, but station ids can have leading zeros, so it's a good idea to keep stations as character class. required

year

(integer) year, e.g., 2017. required

...

curl options passed on to crul::verb-GET

Value

a data.frame with many columns. the first 10 are metadata:

And the rest should be all data columns. The first part of many column names is the time period, being one of:

So the variable you are looking for may not be the first part of the column name

Note

See lcd_cache for managing cached files

References

Docs: https://www.ncei.noaa.gov/data/local-climatological-data/doc/LCD_documentation.pdf Data comes from: https://www.ncei.noaa.gov/data/local-climatological-data/access

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
x = lcd(station = "01338099999", year = 2017)
lcd(station = "01338099999", year = 2015)
lcd(station = "02413099999", year = 2009)
lcd(station = "02413099999", year = 2001)

# pass curl options
lcd(station = "02413099999", year = 2002, verbose = TRUE)

## End(Not run)

rnoaa documentation built on May 19, 2021, 9:13 a.m.