get_ARPA_Lombardia_W_data {ARPALData}R Documentation

Download weather/meteorological data from ARPA Lombardia website

Description

'get_ARPA_Lombardia_W_data' returns observed air weather measurements collected by ARPA Lombardia ground detection system for Lombardy region in Northern Italy. Available meteorological variables are: temperature (Celsius degrees), rainfall (cm), wind speed (m/s), wind direction (degrees), relative humidity ( Data are available from 1989 and are updated up to the current date. For more information about the municipal data visit the section 'Monitoraggio aria' at the webpage: https://www.dati.lombardia.it/stories/s/auv9-c2sj

Usage

get_ARPA_Lombardia_W_data(
  ID_station = NULL,
  Year = 2020,
  Frequency = "10mins",
  Var_vec = NULL,
  Fns_vec = NULL,
  by_sensor = F,
  parallel = T,
  verbose = T
)

Arguments

ID_station

Numeric value. ID of the station to consider. Using ID_station = NULL, all the available stations are selected. Default is ID_station = NULL.

Year

Numeric vector. Year(s) of interest. Default is Year = 2020. Specifying more than one year the code works in parallel computing (half of the available cores) using parLapply() function.

Frequency

Temporal aggregation frequency. It can be "10mins", "hourly", "daily", "weekly", "monthly". Default is Frequency = "10mins"

Var_vec

Character vector of variables to aggregate. If NULL (default) all the variables are averaged, except for 'Temperature' and 'Snow_height', which are cumulated.

Fns_vec

Character vector of aggregation function to apply to the selected variables. Available functions are mean, median, min, max, sum, qPP (PP-th percentile), sd, var, vc (variability coefficient), skew (skewness) and kurt (kurtosis). Attention: for Wind Speed and Wind Speed Gust only mean, min and max are available; for Wind Direction and Wind Direction Gust only mean is available.

by_sensor

Logic value (T or F). If 'by_sensor=T', the function returns the observed concentrations by sensor code, while if 'by_sensor=F' (default) it returns the observed concentrations by station.

parallel

Logic value (T or F). If 'parallel=T' (default), data downloading is performed using parallel computing (socketing), while if 'parallel=F' (default) the download is performed serially. 'parallel=T' works only when 'Year' is a vector with multiple values, i.e. for a single year the serial computing is performed.

verbose

Logic value (T or F). Toggle warnings and messages. If 'verbose=T' (default) the function prints on the screen some messages describing the progress of the tasks. If 'verbose=F' any message about the progression is suppressed.

Details

More detailed description.

Value

A data frame of class 'data.frame' and 'ARPALdf'. The object is fully compatible with Tidyverse.

Examples


## Download all the weather measurements at station 100 during 2020. Data have 10 minutes frequency.
get_ARPA_Lombardia_W_data(ID_station = 100, Year = 2020, Frequency = "10mins")
## Download all the weather measurements at station 100 during 2020. Data have 10 minutes frequency.
## Data are reported by sensor.
get_ARPA_Lombardia_W_data(ID_station = 100, Year = 2020, by_sensor = TRUE)



[Package ARPALData version 1.2.3 Index]