View source: R/network_searchNetwork.R
searchNetwork | R Documentation |
openair::importMeta()
While networkMap()
visualises entire UK air quality networks,
searchNetwork()
can subset specific networks to find air quality sites near
to a specific site of interest (for example, the location of known industrial
activity, or the centroid of a specific urban area).
searchNetwork(
lat,
lng,
source = "aurn",
year = NULL,
site_type = NULL,
variable = NULL,
max_dist = NULL,
n = NULL,
crs = 4326,
map = TRUE
)
lat , lng |
The decimal latitude(Y)/longitude(X). required Values representing the decimal latitude and longitude (or other Y/X
coordinate if using a different |
source |
One or more UK or European monitoring networks. default: One or more air quality networks for which data is available through openair. Available networks include:
There are two additional options provided for convenience:
|
year |
A year, or range of years, with which to filter data. default: By default, |
site_type |
One or more site types with which to subset the site metadata. default: If |
variable |
One or more variables of interest with which to subset the site metadata. default: If |
max_dist |
A maximum distance from the location of interest in kilometres. default: If |
n |
The maximum number of sites to return. default: If |
crs |
The coordinate reference system (CRS). default: The coordinate reference system (CRS) of the data, passed to
|
map |
Return a map? default: If |
Data subsetting progresses in the order in which the arguments are given;
first source
and year
, then site_type
and variable
, then max_dist
,
and finally n
.
Either a tibble or leaflet
map.
Other uk air quality network mapping functions:
networkMap()
## Not run:
# get all AURN sites open in 2020 within 20 km of Buckingham Palace
palace <- convertPostcode("SW1A1AA")
searchNetwork(lat = palace$lat, lng = palace$lng, max_dist = 20, year = 2020)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.