This function imports meteorological data from a CSV file exported from the EPICURE Information System.
The data are standardized before being added to self$meteo.
If meteorological data already exist in self$meteo, the update parameter allows the user to:
"new": append only the data more recent than the lastmeteo_datetimeinself$meteo."all": replace all existing data with the new data.
The function also updates the internal log (traceability).
Utilisation
import_pom_csv(self, filepath, skip_forecast = TRUE, update = c("new", "all"))Arguments
- self
An
user_dataR6 object in which to import the meteo- filepath
File path of the csv file to be imported. This file must be a csv file exported from Epicure (IFV Information system)
- skip_forecast
Logical. If
TRUE(default), the first 14 data rows are removed before processing (commonly forecast values).- update
Character. Determines how to update existing meteorological data:
"new"(default) or"all".
Valeur de retour
Updates self$meteo with the imported data, update also the log. Returns invisible(self$obs_data).
Détails
The function automatically detects new rows based on the meteo_datetime column.
If update = "new" but self$meteo is empty, all data are imported.
A message is displayed indicating the number of rows imported.
Exemples
if (FALSE) { # \dontrun{
# Import new meteorological data into an existing user_data object
import_pom_csv(self = my_user_data, filepath = "meteo_2025.csv", update = "new")
# Replace all existing meteorological data
import_pom_csv(self = my_user_data, filepath = "meteo_2025.csv", update = "all")
} # }
