View source: R/EEAaq_get_data.R
EEAaq_get_data | R Documentation |
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
.
EEAaq_get_data(
IDstations = NULL,
pollutants = NULL,
from = NULL,
to = NULL,
verbose = TRUE
)
IDstations |
Numeric value. Unique ID of the stations to retrieve. |
pollutants |
the pollutants for which to download data. It may be:
|
from |
character defining the initial date of the period to be retrieved. The format is |
to |
character defining the final date of the period to be retrieved. The format is |
verbose |
logic value (T or F). If |
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.
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.
`%>%` <- 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.