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)
Arguments
force_retrieve: 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.
from: Lower limit of reporting period (as class Date). Only retrieve stations whose period of record ends at or after this date.
to: Upper limit of reporting period (as class Date). Only retrieve stations whose period of record begins at or before this date.
Returns
A data.frame with the following columns (copy-pasted from NOAA):
usaf: Air Force station ID. May contain a letter in the first position.
wban: NCDC WBAN number
ctry: FIPS country ID
st: State for US stations
icao: ICAO ID
lat: Latitude in thousandths of decimal degrees
lon: Longitude in thousandths of decimal degrees
elev.m.: Elevation in meters
begin: Beginning Period Of Record. There may be reporting gaps within the P.O.R.
end: 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.
Details
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.