EEAaq_map_stations {EEAaq}R Documentation

Create a map representing the stations based on the data given in input or the information specified in the parameters

Description

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.

Usage

EEAaq_map_stations(
  data = NULL,
  pollutant = NULL,
  zone_name = NULL,
  NUTS_level = NULL,
  ID = FALSE,
  bounds_level = NULL,
  color = TRUE,
  dynamic = FALSE
)

Arguments

data

an EEAaq_df or EEAaq_df_sfc class object, which is the output of the EEAaq_get_data function.

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 zone_name belongs.

ID

logic value (T or F). If TRUE the character specified in the parameter zone_name is the unique identifier code provided by Eurostat. If FALSE (the default) it indicates that was specified the full name in latin characters.

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 NUTS_level.

color

logical value (T or F). If TRUE (the default) the points are colored based on the pollutant they are able to detect. If FALSE the points have the same color.

dynamic

logical value (T or F). If TRUE the map is interactive and dynamic. If FALSE (the default) the map is static.

Value

A map representing the specified area and the points representing the location of the stations able to detect the specified pollutants.

Examples


#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 = "Milano", NUTS_level = "LAU",
  pollutant = "PM10", from = 2023, to = 2023, ID = FALSE, verbose = TRUE)
EEAaq_map_stations(data = data, color = TRUE)


[Package EEAaq version 0.0.3 Index]