rnoaa (version 0.9.5)

isd_stations: Get NOAA ISD/ISH station data from NOAA FTP server.

Description

Get NOAA ISD/ISH station data from NOAA FTP server.

Usage

isd_stations(refresh = FALSE)

Arguments

refresh

(logical) Download station data from NOAA ftp server again. Default: FALSE

Value

a tibble (data.frame) with the columns:

  • usaf - USAF number, character

  • wban - WBAN number, character

  • station_name - station name, character

  • ctry - Country, if given, character

  • state - State, if given, character

  • icao - ICAO number, if given, character

  • lat - Latitude, if given, numeric

  • lon - Longitude, if given, numeric

  • elev_m - Elevation, if given, numeric

  • begin - Begin date of data coverage, of form YYYYMMDD, numeric

  • end - End date of data coverage, of form YYYYMMDD, numeric

File storage

We use rappdirs to store files, see rappdirs::user_cache_dir() for how we determine the directory on your machine to save files to, and run rappdirs::user_cache_dir("rnoaa") to get that directory.

Details

The data table is cached, but you can force download of data from NOAA by setting refresh=TRUE

References

ftp://ftp.ncdc.noaa.gov/pub/data/noaa/

See Also

Other isd: isd_read, isd_stations_search, isd

Examples

Run this code
# NOT RUN {
# Get station table
(stations <- isd_stations())

## plot stations
### remove incomplete cases, those at 0,0
df <- stations[complete.cases(stations$lat, stations$lon), ]
df <- df[df$lat != 0, ]
### make plot
library("leaflet")
leaflet(data = df) %>%
  addTiles() %>%
  addCircles()
# }

Run the code above in your browser using DataCamp Workspace