Download the list of all available weather stations from NOAA, or only those for a specific country and period
NOAA_allStations(force_retrieve = FALSE)NOAA_countryStations(fips, from = NULL, to = NULL)
If TRUE
download the list again from NOAA (even if
it was already downloaded previously). Defaults to FALSE
, so that download
happens only once per session.
2-letter country FIPS ID (full list of codes at ftp://ftp.ncdc.noaa.gov/pub/data/gsod/country-list.txt).
Lower limit of reporting period (as class Date
). Only retrieve
stations whose period of record ends at or after this date.
Upper limit of reporting period (as class Date
). Only retrieve
stations whose period of record begins at or before this date.
A data.frame
with the following columns (copy-pasted from NOAA):
Air Force station ID. May contain a letter in the first position.
NCDC WBAN number
FIPS country ID
State for US stations
ICAO ID
Latitude in thousandths of decimal degrees
Longitude in thousandths of decimal degrees
Elevation in meters
Beginning Period Of Record. There may be reporting gaps within the P.O.R.
Ending Period Of Record. There may be reporting gaps within the P.O.R.
Note that columns begin
and end
in the output are of class Date
.
NOAA_allStations()
downloads the list of all available weather
stations from NOAA, found in
ftp://ftp.ncdc.noaa.gov/pub/data/noaa/isd-history.csv, and returns it
as a data.frame
. The data are downloaded only once per R session,
the first time this function is used, and are then stored internally for
further retrievals.
NOAA_countryStations()
retrieves the list for a specific country only
(or several countries, if length(ctry)>1
), and possibly only for a specific
period of record.