
Import station metadata for the Integrated Surface Databse
Source:R/import_isd_stations.R
import_isd_stations.RdThis function is primarily used to find a site code that can be used to
access data using import_isd_hourly(). Sites searches of approximately
30,000 sites can be carried out based on the site name and based on the
nearest locations based on user-supplied latitude and longitude.
Arguments
- site
A site name search string e.g.
site = "heathrow". The search strings and be partial and can be upper or lower case e.g.site = "HEATHR".- lat, lon
Decimal latitude and longitude (or other Y/X coordinate if using a different
crs). If provided, then_maxclosest ISD stations to this coordinate will be returned.- crs
The coordinate reference system (CRS) of the data, passed to
sf::st_crs(). By default this is EPSG:4326, the CRS associated with the commonly used latitude and longitude coordinates. Different coordinate systems can be specified usingcrs(e.g.,crs = 27700for the British National Grid). Note that non-lat/lng coordinate systems will be re-projected to EPSG:4326 for making comparisons with the NOAA metadata plotting on the map.- country
The country code. This is a two letter code. For a full listing see https://www1.ncdc.noaa.gov/pub/data/noaa/isd-history.csv.
- state
The state code. This is a two letter code.
- n_max
The number of nearest sites to search based on
latitudeandlongitude.- end_year
To help filter sites based on how recent the available data are.
end_yearcan be "current", "any" or a numeric year such as 2016, or a range of years e.g. 1990:2016 (which would select any site that had an end date in that range. By default only sites that have some data for the current year are returned.- provider
By default a map will be created in which readers may toggle between a vector base map and a satellite/aerial image.
providerallows users to override this default; see http://leaflet-extras.github.io/leaflet-providers/preview/ for a list of all base maps that can be used. If multiple base maps are provided, they can be toggled between using a "layer control" interface.- return
The type of R object to import the ISD stations as. One of the following:
"table", which returns an Rdata.frame."sf", which returns a spatialdata.framefrom thesfpackage."map", which returns an interactiveleafletmap.
Value
A data frame is returned with all available meta data, mostly
importantly including a code that can be supplied to importNOAA(). If
latitude and longitude searches are made an approximate distance, dist in
km is also returned.
See also
Other NOAA ISD functions:
import_isd_hourly(),
import_isd_lite(),
import_isd_stations_live()