getMeta {worldmet} | R Documentation |
Find a ISD site code and other meta data
Description
Get information on meteorological sites
Usage
getMeta(
site = "heathrow",
lat = NA,
lon = NA,
country = NA,
state = NA,
n = 10,
end.year = "current",
provider = c("OpenStreetMap", "Esri.WorldImagery"),
plot = TRUE,
returnMap = FALSE
)
Arguments
site |
A site name search string e.g. |
lat |
A latitude in decimal degrees to search. Takes the values -90 to 90. |
lon |
A longitude in decimal degrees to search. Takes values -180 to 180. Negative numbers are west of the Greenwich meridian. |
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 |
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. |
plot |
If |
returnMap |
Should the leaflet map be returned instead of the meta data?
Default is |
Details
This function is primarily used to find a site code that can be used to
access data using importNOAA()
. 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.
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.
Author(s)
David Carslaw
See Also
getMetaLive()
to download the all meta data to allow re-use and
direct querying.
Examples
## 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' nearest by default
getMeta(lat = 40, lon = 116.9)
## End(Not run)