Learn R Programming

openair (version 2.7-2)

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)

Arguments

source

The data source for the meta data. Can be “aurn”, “kcl”, “saqn” (or “aqd”), “aqe” 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.

Value

A data frame with meta data.

Details

This function imports site meta data from four networks in the UK: the Defra Automatic Urban and Rural Network (AURN), King's College London networks, the Scottish Air Quality Network, Welsh Air Quality Network and Air Quality England sites. Additionally, meta data are available for Airbase/e-reporting sites across Europe based on the saqgetr package. The meta data includes site location (latitude, longitude and OS easting and northing --- the latter for KCL networks), site type and it's start/close data, as well as other information.

The Scottish and Welsh air quality networks are available as SAQN (or SAQD) and WAQN.

The meta information can usefully be combined with matching air pollution data and produce maps of concentration --- see examples below.

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

See Also

importAURN, importKCL and importSAQN for importing air quality data from each network.

Examples

Run this code
# NOT RUN {
## import AQ data and add meta data to data frame
# }
# NOT RUN {
aq <- importAURN(site = c("kc1", "my1"), year = 2009)
meta <- importMeta(source = "aurn")
aq <- merge(aq, meta, by = "site")
# }
# NOT RUN {
## aggregate first before adding meta data (useful for many sites/years)
# }
# NOT RUN {
aq <- importAURN(site = c("kc1", "my1"), year = 2009)
meta <- importMeta(source = "aurn")
## calculate annual means
annual <- timeAverage(aq, avg.time = "year", type = "site")
annual <- merge(annual, meta, by = "site")
# }

Run the code above in your browser using DataLab