rnoaa (version 0.9.5)

lcd: Local Climitalogical Data from NOAA

Description

Local Climitalogical Data from NOAA

Usage

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, and variable rows depending on how frequently data was collected in the given year

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

  • station

  • date

  • latitude

  • longitude

  • elevation

  • name

  • report_type

  • source

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

  • hourly

  • daily

  • monthly

  • shortduration

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

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

Run this code
# NOT RUN {
lcd(station = "01338099999", year = 2017, verbose = TRUE)
lcd(station = "01338099999", year = 2015, verbose = TRUE)
lcd(station = "02413099999", year = 2009, verbose = TRUE)
lcd(station = "02413099999", year = 2001, verbose = TRUE)

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

Run the code above in your browser using DataLab