EEAaq_export: Export and save an 'EEAaq_df' class object

View source: R/EEAaq_export.R

EEAaq_exportR Documentation

Export and save an EEAaq_df class object

Description

EEAaq_export export an EEAaq_df class object as a .csv or a .txt file.

Usage

EEAaq_export(data, filepath, format)

Arguments

data

an EEAaq_df class object.

filepath

character string giving the file path

format

character string giving the format of the file. It must be one of 'csv' and 'txt'.

Value

No return value, called for side effects.

Examples


### Download PM10 data for the province (NUTS-3) of Milano (Italy)
### from January 1st to January 31st, 2023
`%>%` <- dplyr::`%>%`
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)

### Export data to csv file
temp <- tempdir()
filepath <- paste0(temp, "/data.csv")
EEAaq_export(data = data, filepath = filepath, format = "csv")


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

Related to EEAaq_export in EEAaq...