View source: R/import_isd_stations.R
| import_isd_stations | R Documentation |
This 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.
import_isd_stations(
site = NULL,
lat = NULL,
lon = NULL,
crs = 4326,
country = NULL,
state = NULL,
n_max = 10,
end_year = "current",
provider = c("OpenStreetMap", "Esri.WorldImagery"),
return = c("table", "sf", "map")
)
site |
A site name search string e.g. |
lat, lon |
Decimal latitude and longitude (or other Y/X coordinate if
using a different |
crs |
The coordinate reference system (CRS) of the data, passed to
|
country |
The country code. This is a two letter code. For a full listing see https://www.ncei.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 |
end_year |
To help filter sites based on how recent the available data
are. |
provider |
By default a map will be created in which readers may toggle
between a vector base map and a satellite/aerial image. |
return |
The type of R object to import the ISD stations as. One of the following:
|
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.
David Carslaw
Other NOAA ISD functions:
import_isd_hourly(),
import_isd_lite(),
import_isd_stations_live()
## Not run:
## search for sites with name beijing
getMeta(site = "beijing")
## End(Not run)
## Not run:
## search for near a specified lat/lon - near Beijing airport
## returns 'n_max' nearest by default
getMeta(lat = 40, lon = 116.9)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.