Learn R Programming

openair (version 2.16-0)

importMeta: Import monitoring site meta data for the UK and European networks

Description

Function to import meta data for air quality monitoring sites

Usage

importMeta(source = "aurn", all = FALSE, duplicate = FALSE, year = NA)

Value

A data frame with meta data.

Arguments

source

One or more sources of meta data. Can be aurn, saqn (or saqd), aqe, waqn, ni, local (or lmam), kcl or europe; upper or lower case.

all

When all = FALSE only the site code, site name, latitude and longitude and site type are imported. Setting all = TRUE will import all available meta data and provide details (when available) or the individual pollutants measured at each site.

duplicate

Some UK air quality sites are part of multiple networks, so could appear more than once when source is a vector of two or more. The default argument, FALSE, drops duplicate sites. TRUE will return them.

year

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

Author

David Carslaw

Details

This function imports site meta data from several networks in the UK and Europe:

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

  • "saqn", The Scottish Air Quality Network.

  • "waqn", The Welsh Air Quality Network.

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

  • "aqe", The Air Quality England Network.

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

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

  • "europe", Import hourly European data (Airbase/e-reporting) based on a simplified version of the saqgetr package.

By default, the function will return the site latitude, longitude and site type. If the option all = TRUE is used, much more detailed information is returned. For most networks, this detailed information includes per-pollutant summaries, opening and closing dates of sites etc.

Thanks go to Trevor Davies (Ricardo), Dr Stuart Grange (EMPA) and Dr Ben Barratt (KCL) and for making these data available.

See Also

the networkMap() function from the openairmaps package which can visualise site metadata

Other import functions: importADMS(), importAQE(), importAURN(), importEurope(), importKCL(), importLocal(), importNI(), importSAQN(), importTraj(), importWAQN()

Examples

Run this code
if (FALSE) {
# basic info
meta <- importMeta(source = "aurn")

# more detailed information:
meta <- importMeta(source = "aurn", all = TRUE)

# from the Scottish Air Quality Network
meta <- importMeta(source = "saqn", all = TRUE)

# from multiple networks
meta <- importMeta(source = c("aurn", "aqe", "local"))
}

Run the code above in your browser using DataLab