importMeta | R Documentation |
Function to import meta data for air quality monitoring sites. By default,
the function will return the site latitude, longitude and site type, as well
as the code used in functions like importUKAQ()
, importImperial()
and
importEurope()
. Additional information may optionally be returned.
importMeta(source = "aurn", all = FALSE, year = NA, duplicate = FALSE)
source |
One or more air quality networks for which data is available through openair. Available networks include:
There are two additional options provided for convenience:
|
all |
When |
year |
If a single year is selected, only sites that were open at some
point in that year are returned. If |
duplicate |
Some UK air quality sites are part of multiple networks, so
could appear more than once when |
This function imports site meta data from several networks in the UK and Europe:
"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.
"imperial"
, Imperial College London (formerly King's College London) networks.
"europe"
, Hourly European data (Air Quality 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. The following metadata columns are available in the complete dataset:
source: The network with which the site is associated. Note that some monitoring sites are part of multiple networks (e.g., the AURN & SAQN) so the same site may feature twice under different sources.
code: The site code, used to import data from specific sites of interest.
site: The site name, which is more human-readable than the site code.
site_type: A description of the site environment. Read more at https://uk-air.defra.gov.uk/networks/site-types.
latitude and longitude: The coordinates of the monitoring station, using the World Geodetic System (https://epsg.io/4326).
start_date and end_date: The opening and closing dates of the monitoring station. If by_pollutant = TRUE
, these dates are instead the first and last dates at which specific pollutants were measured. A missing value, NA
, indicates that monitoring is ongoing.
ratified_to: The date to which data has been ratified (i.e., 'quality checked'). Data after this date is subject to change.
zone and agglomeration: The UK is divided into agglomeration zones (large urban areas) and non-agglomeration zones for air quality assessment, which are given in these columns.
local_authority: The local authority in which the monitoring station is found.
provider and code: The specific provider of the locally managed dataset (e.g., "londonair"
).
Thanks go to Trevor Davies (Ricardo), Dr Stuart Grange (EMPA) and Dr Ben Barratt (KCL) and for making these data available.
A data frame with meta data.
David Carslaw
the networkMap()
function from the openairmaps
package which can
visualise site metadata on an interactive map.
Other import functions:
importADMS()
,
importAURN()
,
importEurope()
,
importImperial()
,
importTraj()
,
importUKAQ()
## Not run:
# 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"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.