Skip to contents

This function is a convenient way to use EEA AQ monitoring data in an R session. It calls download_eea_parquet_files(), reads each file using nanoparquet::read_parquet(), removes unnecessary columns, and merges useful columns from import_eea_stations().

Usage

import_eea_monitoring(
  countries = "AD",
  cities = NULL,
  pollutants = NULL,
  datetime_start = as.integer(format(Sys.Date(), "%Y")) - 1,
  datetime_end = as.integer(format(Sys.Date(), "%Y")),
  dataset = 1L,
  aggregation_type = "hour"
)

Arguments

countries

A vector of country codes from import_eea_countries(). If NULL, data from all countries will be imported.

cities

A vector of cities in the given countries from import_eea_cities(). If NULL, data from all cities in the given countries will be imported.

pollutants

A vector of pollutant notations or IDs from import_eea_pollutants(). If NULL, data for all pollutants will be imported.

datetime_start, datetime_end

Start and end date times, provided as POSIXct, Date or integer R objects. If an integer is provided, this should represent the year of interest; for datetime_start this will be represent the first hour of the year and for datetime_end it will represent the last hour of the year, meaning providing the same integer to each will return a year of data.

dataset

The value of the dataset. One of:

  1. Unverified data transmitted continuously (Up-To-Date/UTD/E2a) data from the beginning of the year.

  2. Verified data (E1a) from 2013, reported by countries by 30 September each year for the previous year.

  3. Historical Airbase data delivered between 2002 and 2012 before Air Quality Directive 2008/50/EC entered into force

aggregation_type

represents whether the data collected is obtaining the values:

  1. Hourly data ("hour").

  2. Daily data ("day").

  3. Variable intervals (different than the previous observations such as weekly, monthly, etc.) ("var").

Value

a tibble

Author

Jack Davison