Conveniently import European Air Quality data into R
Source:R/import_eea_monitoring.R
import_eea_monitoring.Rd
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()
. IfNULL
, data from all countries will be imported.- cities
A vector of cities in the given
countries
fromimport_eea_cities()
. IfNULL
, data from all cities in the givencountries
will be imported.- pollutants
A vector of pollutant notations or IDs from
import_eea_pollutants()
. IfNULL
, data for all pollutants will be imported.- datetime_start, datetime_end
Start and end date times, provided as
POSIXct
,Date
orinteger
R objects. If aninteger
is provided, this should represent the year of interest; fordatetime_start
this will be represent the first hour of the year and fordatetime_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:
Unverified data transmitted continuously (Up-To-Date/UTD/E2a) data from the beginning of the year.
Verified data (E1a) from 2013, reported by countries by 30 September each year for the previous year.
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:
Hourly data (
"hour"
).Daily data (
"day"
).Variable intervals (different than the previous observations such as weekly, monthly, etc.) (
"var"
).
Value
a tibble