Skip to contents

Import data from the Air Quality England

Usage

importAQE(
  site = "yk13",
  year = 2018,
  data_type = "hourly",
  pollutant = "all",
  meta = FALSE,
  ratified = FALSE,
  to_narrow = FALSE,
  progress = TRUE
)

Arguments

site

Site code of the site to import e.g. “yk13” is York Heworth Green. Several sites can be imported with site = c("yk13", "yk8") --- to import York Heworth Green and Holgate, for example.

year

Year or years to import. To import a sequence of years from 1990 to 2000 use year = 1990:2000. To import several specific years use year = c(1990, 1995, 2000) for example.

data_type

The data type averaging period. These include:

  • "hourly" Default is to return hourly data.

  • "daily" Daily average data.

  • "monthly" Monthly average data with data capture information for the whole network.

  • "annual" Annual average data with data capture information for the whole network.

  • "15_min" To import 15-minute average SO2 concentrations.

  • "8_hour" To import 8-hour rolling mean concentrations for O3 and CO.

  • "24_hour" To import 24-hour rolling mean concentrations for particulates.

  • "daily_max_8" To import maximum daily rolling 8-hour maximum for O3 and CO.

  • "daqi" To import Daily Air Quality Index (DAQI). See here for more details of how the index is defined.

pollutant

Pollutants to import. If omitted will import all pollutants from a site. To import only NOx and NO2 for example use pollutant = c("nox", "no2").

meta

Should meta data be returned? If TRUE the site type, latitude and longitude are returned.

ratified

If TRUE columns are returned indicating when each species was ratified i.e. quality-checked. Available for hourly data only.

to_narrow

By default the returned data has a column for each pollutant/variable. When to_narrow = TRUE the data are stacked into a narrow format with a column identifying the pollutant name.

progress

Show a progress bar when many sites/years are being imported? Defaults to TRUE.

See also