Skip to contents

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).


  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.


One or more air quality networks for which data is available through openair. Available networks include:

  • "aurn", The UK Automatic Urban and Rural Network.

  • "aqe", The Air Quality England Network.

  • "saqn", The Scottish Air Quality Network.

  • "waqn", The Welsh Air Quality Network.

  • "ni", The Northern Ireland Air Quality Network.

  • "local", Locally managed air quality networks in England.

  • "kcl", King's College London networks.

  • "europe", European AirBase/e-reporting data. There are two additional options provided for convenience:

  • "ukaq" will return metadata for all networks for which data is imported by importUKAQ() (i.e., AURN, AQE, SAQN, WAQN, NI, and the local networks).

  • "all" will import all available metadata (i.e., "ukaq" plus "kcl" and "europe").


If a single year is selected, only sites that were open at some point in that year are returned. If all = TRUE only sites that measured a particular pollutant in that year are returned. Year can also be a sequence e.g. year = 2010:2020 or of length 2 e.g. year = c(2010, 2020), which will return only sites that were open over the duration. Note that year is ignored when the source is either "kcl" or "europe".


Optional. One or more site types with which to subset the site metadata. For example, site_type = "urban background" will only search urban background sites.


Optional. One or more variables of interest with which to subset the site metadata. For example, variable = c("pm10", "co") will search sites that measure PM10 and/or CO.


Optional. A maximum distance from the location of interest in kilometres.


Optional. The maximum number of sites to return.


If TRUE, the default, searchNetwork() will return a leaflet map. If FALSE, it will instead return a tibble.


Either a tibble or leaflet map.


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.

See also

Other uk air quality network mapping functions: networkMap()


if (FALSE) {
# 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)