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,
map = TRUE
)
lat, lng |
The latitude and longitude for the location of interest. |
source |
One or more air quality networks for which data is available through openair. Available networks include:
|
year |
If a single year is selected, only sites that were open at some
point in that year are returned. If |
site_type |
Optional. One or more site types with which to subset the
site metadata. For example, |
variable |
Optional. One or more variables of interest with which to
subset the site metadata. For example, |
max_dist |
Optional. A maximum distance from the location of interest in kilometres. |
n |
Optional. The maximum number of sites to return. |
map |
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.