EEAaq_import {EEAaq} | R Documentation |
Reverse function of EEAaq_export
. Reads an EEAaq_df
object
Description
Given the file containing the data saved with EEAaq_export
, and the
associated shapefile, EEAaq_read
imports the EEAaq_df
class object.
Usage
EEAaq_import(file_data, file_shape)
Arguments
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 |
Value
No return value, called for side effects.
Examples
#Download a dataset with the function EEAaq_get_data, which generate an EEAaq_df object.
data <- EEAaq_get_data(zone_name = "Milano", NUTS_level = "LAU", pollutant = "PM10",
from = 2021, to = 2021, 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"))
[Package EEAaq version 0.0.3 Index]