Title: | Handle Air Quality Data from the European Environment Agency Data Portal |
---|---|
Description: | This software downloads and manages air quality data from the European Environmental Agency (EEA) dataflow (<https://www.eea.europa.eu/data-and-maps/data/aqereporting-9>). See the web page <https://eeadmz1-downloads-webapp.azurewebsites.net/> for details on the EEA's Air Quality Download Service. The package allows dynamically mapping the stations, summarising and time aggregating the measurements and building spatial interpolation maps. See the web page <https://www.eea.europa.eu/en> for further information on EEA activities and history. Further details, as well as, an extended vignette of the main functions included in the package, are available at the GitHub web page dedicated to the project. |
Authors: | Paolo Maranzano [aut, cre, cph]
|
Maintainer: | Paolo Maranzano <[email protected]> |
License: | GPL (>= 3) |
Version: | 1.0.0 |
Built: | 2025-03-09 05:58:36 UTC |
Source: | https://github.com/cran/EEAaq |
This function extracts the numerical value from NUTS-level strings.
code_extr(level)
code_extr(level)
level |
A character vector representing NUTS-level codes (e.g., |
A sorted numeric vector containing the extracted NUTS levels.
EEAaq_df
class objectEEAaq_export
saves an EEAaq_df
class object as a .csv or a .txt file,
and exports the associated shapefile as well.
EEAaq_export(data, filepath, format, shape = FALSE)
EEAaq_export(data, filepath, format, shape = FALSE)
data |
an |
filepath |
character string giving the file path |
format |
character string giving the format of the file. It must be one of 'csv' and 'txt'. |
shape |
logical value (T or F). If |
No return value, called for side effects.
#Download a dataset with the function EEAaq_get_data, which generate an EEAaq_df object. data <- EEAaq_get_data(zone_name = "15146", NUTS_level = "LAU", LAU_ISO = "IT", pollutants = "PM10", from = "2023-01-01", to = "2023-05-31") temp <- tempdir() filepath <- paste0(temp, "/data.csv") EEAaq_export(data = data, filepath = filepath, format = "csv", shape = TRUE)
#Download a dataset with the function EEAaq_get_data, which generate an EEAaq_df object. data <- EEAaq_get_data(zone_name = "15146", NUTS_level = "LAU", LAU_ISO = "IT", pollutants = "PM10", from = "2023-01-01", to = "2023-05-31") temp <- tempdir() filepath <- paste0(temp, "/data.csv") EEAaq_export(data = data, filepath = filepath, format = "csv", shape = TRUE)
This function imports air quality datasets at european level, based on the zone, time and pollutant specifications.
This function generates an EEAaq_df
object, or an EEAaq_df_sfc
.
EEAaq_get_data( zone_name = NULL, NUTS_level = NULL, LAU_ISO = NULL, pollutants = NULL, from = NULL, to = NULL, quadrant = NULL, polygon = NULL, verbose = TRUE )
EEAaq_get_data( zone_name = NULL, NUTS_level = NULL, LAU_ISO = NULL, pollutants = NULL, from = NULL, to = NULL, quadrant = NULL, polygon = NULL, verbose = TRUE )
zone_name |
character vector specifying the names of the zones to consider. The reference is the NUTS and LAU nomenclature by Eurostat. See Details. |
NUTS_level |
character that specify the level of NUTS or LAU, to which |
LAU_ISO |
a code to identify the corresponding ISO of the country since LAU_ID are not unique over Europe |
pollutants |
the pollutants for which to download data. It may be:
|
from |
the starting point of the time window to consider. It may be:
|
to |
the ending point of the time window to consider. It may be:
ID logic value (T or F). If |
quadrant |
a list of bidimensional numeric vectors containing the coordinates in WGS84 format. If the list has two elements, the function builds a square using the two coordinates as opposite extremes. If the list contains three or more elements, every point is a vertex of a polygon, in particular the convex hull of the specified points. |
polygon |
A |
verbose |
logic value (T or F). If |
Some specific notes:
If the parameter zone_name
corresponds to a valid CITY_NAME
(i.e., not NULL in the dataset), the function will return the corresponding data. If no valid CITY_NAME
is associated with the zone_name
, the function attempts to retrieve all available data for the entire country and subsequently filter for the specified zone_name.
For very small towns or certain countries, such as Turkey or Albania, data may not currently be available in the dataset. This limitation reflects the data unavailability at the the EEA Air Quality Viewer https://discomap.eea.europa.eu/App/AQViewer/index.html?fqn=Airquality_Dissem.b2g.AirQualityStatistics.
If the parameters used in the query include polygon
or quadrant
, the function returns a EEAaq_df_sfc
object. Otherwise, it returns an EEAaq_df
object, which is a tibble dataframe.
The NUTS classification (Nomenclature of territorial units for statistics) is a hierarchical system for dividing up the economic territory of the EU and the UK. The levels are defined as in https://ec.europa.eu/eurostat/web/gisco/geodata/statistical-units/territorial-units-statistics, that is,
NUTS 0: the whole country
NUTS 1: major socio-economic regions
NUTS 2: basic regions for the application of regional policies
NUTS 3: small regions for specific diagnoses
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.
# Download hourly NO2 concentration for Milan city (LAU = 15146) in 2023 data <- EEAaq_get_data(zone_name = "15146", NUTS_level = "LAU",LAU_ISO = "IT", pollutants = c("NO2","CO"), from = "2023-01-01", to = "2023-12-31", verbose = TRUE)
# Download hourly NO2 concentration for Milan city (LAU = 15146) in 2023 data <- EEAaq_get_data(zone_name = "15146", NUTS_level = "LAU",LAU_ISO = "IT", pollutants = c("NO2","CO"), from = "2023-01-01", to = "2023-12-31", verbose = TRUE)
Retrieve one of the metadata (i.e., LAU, NUTS, stations, or pollutant) tables from the EEA dataflow. This function downloads and loads one dataset at a time from a predefined list of available datasets. Ensure that the dataset name is written correctly. See details for further details.
EEAaq_get_dataframe(dataframe = NULL)
EEAaq_get_dataframe(dataframe = NULL)
dataframe |
name of the
|
The function retrieves from the EEAaq GitHub folder one of the following metadata:
since 2024, the data EEA air quality retrieving dataflow is undergoing a major re-organization. In particular, since January 2025, raw data are accessible only through an online platform/dashboard. While EEAaq
is build to
explicitly deal with the automatic and constantly-updated system for raw data, the same process is not always possible for the metadata.
Indeed, most of the metadata information are updated and require relevant pre-processing (i.e., data manipulation and cleaning) steps to make them consistent with the main database on pollutants concentrations.
For this reasons, all the metadata files are periodically pre-processed and updated by the package maintainers. For issues with the data or code, please contact the development team at [email protected]
a dataframe
LAU <- EEAaq_get_dataframe(dataframe= "LAU")
LAU <- EEAaq_get_dataframe(dataframe= "LAU")
Download the updated dataset from EEA, containing measurement station information. For further information about the variables
see stations
.
EEAaq_get_stations(byStation = FALSE, complete = TRUE)
EEAaq_get_stations(byStation = FALSE, complete = TRUE)
byStation |
Logic value (T or F). If |
complete |
Logic value (T or F). If |
Note that, for very small towns or certain countries, such as Turkey or Albania, data may not currently be available in the dataset. This limitation reflects the data unavailability at the the EEA Air Quality Viewer https://discomap.eea.europa.eu/App/AQViewer/index.html?fqn=Airquality_Dissem.b2g.AirQualityStatistics.
A tibble containing the stations information. Further details available here stations
.
EEAaq_get_stations(byStation = FALSE, complete = TRUE)
EEAaq_get_stations(byStation = FALSE, complete = TRUE)
EEAaq_idw_map
recieves as input a EEAaq_taggr_df
or a EEAaq_taggr_df_sfc
class object and produces a
spatial interpolation map. Depending on the time frequency of the aggregation, multiple maps are generated, one for
each timestamp.
It may be exported as pdf, jpeg, png, gif and html.
EEAaq_idw_map( data = NULL, pollutant = NULL, aggr_fun, bounds_level = NULL, distinct = FALSE, gradient = TRUE, idp = 2, nmax = NULL, maxdist = NULL, dynamic = FALSE, fill_NUTS_level = NULL, tile = "Esri.WorldGrayCanvas", save = NULL, filepath = NULL, width = 1280, height = 720, res = 144, delay = 1, verbose = TRUE )
EEAaq_idw_map( data = NULL, pollutant = NULL, aggr_fun, bounds_level = NULL, distinct = FALSE, gradient = TRUE, idp = 2, nmax = NULL, maxdist = NULL, dynamic = FALSE, fill_NUTS_level = NULL, tile = "Esri.WorldGrayCanvas", save = NULL, filepath = NULL, width = 1280, height = 720, res = 144, delay = 1, verbose = TRUE )
data |
an object of class |
pollutant |
vector containing the pollutant for which to build the map. It must be one of the pollutants
contained in |
aggr_fun |
charachter containing the aggregation function to use for computing the interpolation. It must
be one of the statistics contained in |
bounds_level |
character containing the NUTS level or LAU for which draw internal boundaries. Admissible values are 'NUTS0', 'NUTS1', 'NUTS2', 'NUTS3', 'LAU'. |
distinct |
logic value (T or F). If |
gradient |
logic value (T or F). If |
idp |
numeric value that specify the inverse distance weighting power. For further information see
|
nmax |
numeric value; specify the number of nearest observations that should be
used for the inverse distance weighting computing, where nearest is defined in terms of the
space of the spatial locations. By default, all observations are used. For further information see
|
maxdist |
numeric value; only observations within a distance of |
dynamic |
logic value (T or F). If |
fill_NUTS_level |
character containing the NUTS level or LAU for which to aggregate the idw computing,
in order to obtain a uniform coloring inside each area at the specified level.
(For instance if |
tile |
character representing the name of the provider tile. To see the full list of the providers, run
|
save |
character representing in which extension to save the map. Allowed values are 'jpeg', 'png', 'pdf'
(if |
filepath |
a character string giving the file path. |
width , height
|
the width and the height of the plot, expressed in pixels (by default |
res |
the nominal resolution in ppi which will be recorded in the bitmap file, if a positive integer
(by default |
delay |
numeric value specifying the time to show each image in seconds, when |
verbose |
logic value (T or F). If |
EEAaq_idw_map
create a spatial interpolation map, based on the Inverse Distance Weighting method (Shepard 1968).
This method starts from the available georeferenced data and estimates the value of the variable in the points
where it's unknown as a weighted average of the known values, where weights are given by an inverse function of the
distance of every point from the fixed stations.
The greater the distance of a point from a station, the smaller the weight assigned to the values of the respective
station for the computing of that unknown point.
Given the sampling plan for
, which represent the location of the air quality stations,
the pollutant concentration value
represents the value of the pollutant concentration detected
by the site
and
is the point for which the value of the concentration in unknown.
where
represent the weights assigned to each location and
is the distance between
and
.
cosa restituisce la funzione
## Not run: # Download daily NO2 data in 2023 for Milan city (LAU) data <- EEAaq_get_data(zone_name = "15146", NUTS_level = "LAU",LAU_ISO = "IT", pollutants = "NO2", from = "2023-01-01", to = "2023-12-31", verbose = TRUE) # Monthly aggregation t_aggr <- EEAaq_time_aggregate(data = data, frequency = "monthly", aggr_fun = c("mean", "min", "max")) # One map created EEAaq_idw_map(data = t_aggr, pollutant = "NO2", aggr_fun = "mean", distinct = TRUE, gradient = FALSE, dynamic = TRUE, fill_NUTS_level = "LAU") # Let's try to change the parameters fill_NUTS_level and dynamic: # now we are going to use a dataset containing PM10 concentrations # in Milan province (NUTS 3), during 2023 data <- EEAaq_get_data(zone_name = "Centro (IT)", NUTS_level = "NUTS1", pollutant = "PM10", from = "2023-01-01", to = "2023-12-31") # Yearly aggregation t_aggr <- EEAaq_time_aggregate(data = data, frequency = "yearly", aggr_fun = "mean") # Let us generate one dynamic map, containing the municipalities inside the Milan province # filled with the mean concentration value for 2023, computed via IDW: EEAaq_idw_map(data = t_aggr, pollutant = "PM10", aggr_fun = "mean", distinct = TRUE, gradient = FALSE, dynamic = TRUE, fill_NUTS_level = "NUTS3") ## End(Not run)
## Not run: # Download daily NO2 data in 2023 for Milan city (LAU) data <- EEAaq_get_data(zone_name = "15146", NUTS_level = "LAU",LAU_ISO = "IT", pollutants = "NO2", from = "2023-01-01", to = "2023-12-31", verbose = TRUE) # Monthly aggregation t_aggr <- EEAaq_time_aggregate(data = data, frequency = "monthly", aggr_fun = c("mean", "min", "max")) # One map created EEAaq_idw_map(data = t_aggr, pollutant = "NO2", aggr_fun = "mean", distinct = TRUE, gradient = FALSE, dynamic = TRUE, fill_NUTS_level = "LAU") # Let's try to change the parameters fill_NUTS_level and dynamic: # now we are going to use a dataset containing PM10 concentrations # in Milan province (NUTS 3), during 2023 data <- EEAaq_get_data(zone_name = "Centro (IT)", NUTS_level = "NUTS1", pollutant = "PM10", from = "2023-01-01", to = "2023-12-31") # Yearly aggregation t_aggr <- EEAaq_time_aggregate(data = data, frequency = "yearly", aggr_fun = "mean") # Let us generate one dynamic map, containing the municipalities inside the Milan province # filled with the mean concentration value for 2023, computed via IDW: EEAaq_idw_map(data = t_aggr, pollutant = "PM10", aggr_fun = "mean", distinct = TRUE, gradient = FALSE, dynamic = TRUE, fill_NUTS_level = "NUTS3") ## End(Not run)
EEAaq_export
. Reads an EEAaq_df
objectGiven the file containing the data saved with EEAaq_export
, and the
associated shapefile, EEAaq_read
imports the EEAaq_df
class object.
EEAaq_import(file_data, file_shape)
EEAaq_import(file_data, file_shape)
file_data |
file path of the 'csv' or 'txt' file containing the air quality data to import. |
file_shape |
file path of the shapefile associated to the dataset used in |
No return value, called for side effects.
#Download a dataset with the function EEAaq_get_data, which generate an EEAaq_df object. data <- EEAaq_get_data(zone_name = "15146", NUTS_level = "LAU",LAU_ISO = "IT", pollutants = "PM10", from = "2023-01-01", to = "2023-05-31", verbose = TRUE) temp <- tempdir() filepath <- paste0(temp, "/data.csv") #Export the dataset and the associated shape EEAaq_export(data = data, filepath = filepath, format = "csv", shape = TRUE) #Import the EEAaq_df object saved in the previous code line EEAaq_import(file_data = filepath, file_shape = paste0(temp, "/data.shp"))
#Download a dataset with the function EEAaq_get_data, which generate an EEAaq_df object. data <- EEAaq_get_data(zone_name = "15146", NUTS_level = "LAU",LAU_ISO = "IT", pollutants = "PM10", from = "2023-01-01", to = "2023-05-31", verbose = TRUE) temp <- tempdir() filepath <- paste0(temp, "/data.csv") #Export the dataset and the associated shape EEAaq_export(data = data, filepath = filepath, format = "csv", shape = TRUE) #Import the EEAaq_df object saved in the previous code line EEAaq_import(file_data = filepath, file_shape = paste0(temp, "/data.shp"))
Build static or dynamic maps, representing the location of the stations that detects the specified pollutants.
It recieves in input an EEAaq_df
or an EEAaq_df_sfc
class object, or, alternatively, it's possible to specify
the required zones and pollutants with the same nomenclature system of the EEAaq_get_data
function.
EEAaq_map_stations( data = NULL, pollutant = NULL, zone_name = NULL, NUTS_level = NULL, ID = FALSE, bounds_level = NULL, color = TRUE, dynamic = FALSE )
EEAaq_map_stations( data = NULL, pollutant = NULL, zone_name = NULL, NUTS_level = NULL, ID = FALSE, bounds_level = NULL, color = TRUE, dynamic = FALSE )
data |
an |
pollutant |
character vector containing the short names of the pollutants for which locate the stations. |
zone_name |
character vector specifying the names of the zones to consider. The reference is the NUTS and LAU nomnclature by Eurostat. |
NUTS_level |
chracter that specify the level of NUTS or LAU, to which the |
ID |
logic value (T or F). If |
bounds_level |
character containing the NUTS level or LAU for which draw internal boundaries.
Admissible values are "NUTS0", "NUTS1", "NUTS2", "NUTS3", "LAU" and it must be of a lower level then
the one specified in the parameter |
color |
logical value (T or F). If |
dynamic |
logical value (T or F). If |
A map representing the specified area and the points representing the location of the stations able to detect the specified pollutants.
# Using as example PM data in Lombardia (Italy) during the whole 2022, # it's possible to map the stations in two ways. # First of all specifying the zone information: EEAaq_map_stations(pollutant = c("PM10", "PM2.5"), zone_name = "Lombardia",NUTS_level = "NUTS2", ID = FALSE, color = FALSE) #In this case each point have the same color. # Alternatively, it is possible to use the data already downloaded in the parameter data, # coloring the points based on the pollutants the respective station detects. data <- EEAaq_get_data(zone_name = "15146", NUTS_level = "LAU",LAU_ISO = "IT", pollutants = "PM10", from = "2023-01-01", to = "2023-05-31", verbose = TRUE) EEAaq_map_stations(data = data, color = TRUE)
# Using as example PM data in Lombardia (Italy) during the whole 2022, # it's possible to map the stations in two ways. # First of all specifying the zone information: EEAaq_map_stations(pollutant = c("PM10", "PM2.5"), zone_name = "Lombardia",NUTS_level = "NUTS2", ID = FALSE, color = FALSE) #In this case each point have the same color. # Alternatively, it is possible to use the data already downloaded in the parameter data, # coloring the points based on the pollutants the respective station detects. data <- EEAaq_get_data(zone_name = "15146", NUTS_level = "LAU",LAU_ISO = "IT", pollutants = "PM10", from = "2023-01-01", to = "2023-05-31", verbose = TRUE) EEAaq_map_stations(data = data, color = TRUE)
EEAaq_df
data summaryThis function, applied to an EEAaq_df
or EEAaq_df_sfc
class object, produces a list of data frames,
containing relevant information about the data, such as descriptive statistics, missing values statistics,
gap length and correlation.
EEAaq_summary(data = NULL, verbose = TRUE)
EEAaq_summary(data = NULL, verbose = TRUE)
data |
an |
verbose |
logic value (T or F). If |
The function EEAaq_summary
computes and return a list of summary statistics of the dataset given in
data
. In particular the elements of the list are:
Summary
global missing count, missing rate, negative count, minimum, maximum,
mean and standard deviation, organized by pollutant.
Summary_byStat
list of data frames, one for each different station, containing
the descriptive statistics (missing count, missing rate, negative count, minimum, maximum,
mean and standard deviation), organized by station.
gap_length
one data frame for each pollutant, containing the gap length organized by station.
Corr_Matrix
if data
contains more than one pollutant, the correlation matrix between
pollutans is provided, organised by station.
data <- EEAaq_get_data(zone_name = "15146", NUTS_level = "LAU",LAU_ISO = "IT", pollutants = "PM10", from = "2023-01-01", to = "2023-05-31", verbose = TRUE) EEAaq_summary(data)
data <- EEAaq_get_data(zone_name = "15146", NUTS_level = "LAU",LAU_ISO = "IT", pollutants = "PM10", from = "2023-01-01", to = "2023-05-31", verbose = TRUE) EEAaq_summary(data)
EEAaq_df
class object.EEAaq_time_aggregate
compute a time aggregation of an EEAaq_df
or EEAaq_df_sfc
class object,
based on the specified frequency
and the aggregation functions aggr_fun
.
EEAaq_time_aggregate( data = NULL, frequency = "monthly", aggr_fun = c("mean", "min", "max") )
EEAaq_time_aggregate( data = NULL, frequency = "monthly", aggr_fun = c("mean", "min", "max") )
data |
an |
frequency |
vector containing the time frequency for which to aggregate the |
aggr_fun |
character vector containing one or more agregation functions. Admissible values are 'mean', 'median', 'min', 'max', 'sd', 'var', 'quantile_pp' (where pp is a number in the range [0,1], representing the required percentile). |
A EEAaq_taggr_df
or a EEAaq_taggr_df_sfc
class object, which is a tibble containing the
required time aggregation.
data <- EEAaq_get_data(zone_name = "15146", NUTS_level = "LAU",LAU_ISO = "IT", pollutants = "PM10", from = "2023-01-01", to = "2023-12-31", verbose = TRUE) EEAaq_time_aggregate(data = data, frequency = "monthly", aggr_fun = c("mean", "min", "max")) EEAaq_time_aggregate(data = data, frequency = "yearly", aggr_fun = "mean")
data <- EEAaq_get_data(zone_name = "15146", NUTS_level = "LAU",LAU_ISO = "IT", pollutants = "PM10", from = "2023-01-01", to = "2023-12-31", verbose = TRUE) EEAaq_time_aggregate(data = data, frequency = "monthly", aggr_fun = c("mean", "min", "max")) EEAaq_time_aggregate(data = data, frequency = "yearly", aggr_fun = "mean")
Local Administrative Units (LAUs) are the building blocks of the NUTS classification and correspond to the municipalities and communes within the EU To get the final dataframe we combine two dataset: one taken from Eurostat (https://ec.europa.eu/eurostat/web/nuts/local-administrative-units)that includes City names and City IDs, essential for querying and associations. The other one taken from EEA which provides LAU information. The Latter dataset is updated automatically by selecting the most recent shapefile (SHP) available online. While The Eurostat dataset URL needs to be manually updated with the latest download link to ensure the City-related data is current.
get_LAU(year = "Null")
get_LAU(year = "Null")
year |
expressed as four digit (YYYY) |
A tibble containing LAUs information with selected columns (e.g., ISO, LAU_ID, NUTS3_ID and geometry ).
It automatically updates the dataset by identifying the most recent available file, accessing the corresponding page, and downloading the SHP file at the 1:20 Million scale with the EPSG:4326 reference system from this website (https://gisco-services.ec.europa.eu/distribution/v2/nuts/)
get_NUTS(year = "Null")
get_NUTS(year = "Null")
year |
expressed as four digit (YYYY) |
A tibble containing LAUs information with selected columns (NUTS_ID, LEVL_CODE...)
Retrieve Pollutant Data from EEA Vocabulary (https://dd.eionet.europa.eu/vocabulary/aq/pollutant) Downloads and processes pollutant data from the EEA (European Environment Agency) vocabulary database. The data includes relevant information such as pollutant names, codes, and descriptions.
get_pollutants()
get_pollutants()
A tibble containing pollutant information with selected columns (e.g., URI, notation, and extracted code).
This function downloads detailed information for each SamplingPointId. It performs a spatial join to merge the spatial information of LAU and NUTS (specifically, the geometries of LAU and the geometry of stations) and fills in the missing data for CITY_NAME and CITY_ID (retrieved from https://discomap.eea.europa.eu/App/AQViewer/index.html?fqn=Airquality_Dissem.b2g.AirQualityStatistics) through a left join based on the AirQualityStationEoICode column. These values are essential for querying the endpoint. The missing_cities file was obtained manually (from 2000 to 2024) because the website did not allow downloading more than 100,000 rows at a time. The data was collected in multiple batches, filtering SamplingPoints using the following criteria:
Filter on data used in AQ Report: yes
Filter on data coverage: yes For each station, the column AirQualityStationEoICode (identical for all sensors at the same station) was used to select the first row containing unique values for CITY_NAME and CITY_ID. No station reported more than one value for this pair of columns. To support future uploads, it is necessary to integrate updated AirQualityStationEoICode values.
get_stations()
get_stations()
a tibble
This function handles dates based on the respective dataset. According to the documentation:
Data from 2024 onwards corresponds to Unverified data transmitted continuously (Up-To-Date/UTD/E2a).
Data from 2013 to the begin of 2023 corresponds to Verified data (E1a) reported by countries by 30 September each year for the previous year.
Data delivered before 2012 corresponds to Historical Airbase data. The range for E1 is extended until 31/12/2023 because the observations are already validated, and no data for 2023 is retrieved when considering E2.
handle_dates(from, to)
handle_dates(from, to)
from |
StartDate (in "YYYY-MM-DD" format). |
to |
EndDate (in "YYYY-MM-DD" format). |
A list of datasets with associated date ranges and descriptions.
EEAaq_df
class objectGiven an object as input, is_EEAaq_df
verify that the given object belongs
to the EEAaq_df
class.
is_EEAaq_df(data)
is_EEAaq_df(data)
data |
the object for which verify the if it belongs to the |
logical value (T ot F). If TRUE
the object given in input is an EEAaq_df
object.
If FALSE
the object doesn't belong to the EEAaq_df
class.
#Download a dataset with the function EEAaq_get_data, which generate an EEAaq_df object. data <- EEAaq_get_data(zone_name = "15146", NUTS_level = "LAU",LAU_ISO = "IT", pollutants = "PM10", from = "2023-01-01", to = "2024-08-29", verbose = TRUE) #Check if the imported object belongs to the EEAaq_df class is_EEAaq_df(data = data)
#Download a dataset with the function EEAaq_get_data, which generate an EEAaq_df object. data <- EEAaq_get_data(zone_name = "15146", NUTS_level = "LAU",LAU_ISO = "IT", pollutants = "PM10", from = "2023-01-01", to = "2024-08-29", verbose = TRUE) #Check if the imported object belongs to the EEAaq_df class is_EEAaq_df(data = data)
Given data and the aggregation function desired, this function compute a time aggregation of the data.
my_summarise(data, fun_aggr)
my_summarise(data, fun_aggr)
data |
An |
fun_aggr |
Vector character containing the aggregation function for which to time aggregate. |
A tibble with the required aggregation.