EEAaq_get_data: Download air quality data at european level from the EEA...

View source: R/EEAaq_get_data.R

EEAaq_get_dataR Documentation

Download air quality data at european level from the EEA download service

Description

This function retrieves air quality datasets at european level, based on station, time and pollutant specifications. This function generates a data.frame/tibble object of class EEAaq_df.

Usage

EEAaq_get_data(
  IDstations = NULL,
  pollutants = NULL,
  from = NULL,
  to = NULL,
  verbose = TRUE
)

Arguments

IDstations

Numeric value. Unique ID of the stations to retrieve.

pollutants

the pollutants for which to download data. It may be:

  • character vector representing the short names of the pollutants to analyse. The reference is the variable Notation in the dataset pollutants provided by this package.

  • numeric vector representing the codes of the pollutants to analyse. The reference is the variable Code in the dataset pollutants provided by this package.

from

character defining the initial date of the period to be retrieved. The format is yyyy-mm-dd.

to

character defining the final date of the period to be retrieved. The format is yyyy-mm-dd.

verbose

logic value (T or F). If TRUE (the default) information about the function progress are printed. If FALSE no message is printed.

Details

Recall that stations and sensors are physically managed by national or local environmental protection agencies with their own specificities and rules. EEA operates as a collector of national environmental protection systems and harmonizes the information received by national offices. However, data provided can change on a country basis. For instance, time resolution, sampling frequency, spatial coverage, or the classifications (e.g., urban or rural) can differ country by country. Before downloading the data, we suggest to manage and filter the stations/sensors of interest through their metadata files (provided by EEAaq_get_stations or EEAaq_get_dataframe). See the examples and the vignette for practical examples.

Value

A data frame of class EEAaq_df, if zone_name is specified, and of class EEAaq_df_sfc if whether the parameter quadrant or polygon is specified.

Examples


`%>%` <- dplyr::`%>%`
### Download PM10 data for the province (NUTS-3) of Milano (Italy)
### from January 1st to January 31st, 2023
IDstations <- EEAaq_get_stations(byStation = TRUE, complete = FALSE)
IDstations <- IDstations %>%
                dplyr::filter(NUTS3 %in% c("Milano")) %>%
                dplyr::pull(AirQualityStationEoICode) %>%
                unique()
data <- EEAaq_get_data(IDstations = IDstations, pollutants = "PM10",
                       from = "2023-01-01", to = "2023-01-31",
                       verbose = TRUE)


EEAaq documentation built on April 3, 2025, 11:16 p.m.

Related to EEAaq_get_data in EEAaq...