Description Usage Arguments Details Value Author(s) See Also Examples
Function to import meta data from UK air pollution monitoring sites
1 | importMeta(source = "aurn", all = FALSE)
|
source |
The data source for the meta data. Can be "aurn", "kcl" or "saqn"; upper or lower case. |
all |
When |
This function imports site meta data from three networks in the UK: the Defra Automatic Urban and Rural Network (AURN), King's College London networks and the Scottish Air Quality Network. 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 meta information can usefully be combined with matching air pollution data and produce maps of concentration — see examples below. Note if many sites and/or years of hourly data are imported it may be better to aggregate first and then combine with the meta data information.
Thanks go to Dr Ben Barratt (KCL) and Trevor Davies (AEA) for making these data available.
A data frame with meta data.
David Carslaw
importAURN
, importKCL
and
importSAQN
for importing air quality data from each
network, and GoogleMapsPlot
for plotting
concentrations on a map.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## 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")
## End(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")
## make a GoogleMapsPlot
GoogleMapsPlot(annual, pollutant = "no2")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.