prepare_data_for_modelling | R Documentation |
Prepares environmental data by filtering for relevant components,
converting the data to a wide format, and adding temporal features. Should be
called before
split_data_counterfactual()
prepare_data_for_modelling(env_data, params)
env_data |
A data table in long format. Must include the following columns:
|
params |
A list of modelling parameters loaded from
|
A data.table
in wide format, with columns:
date
, one column per component, and temporal features
like date_unix
, day_julian
, weekday
, and hour
.
env_data <- data.table::data.table(
Station = c("StationA", "StationA", "StationA"),
Komponente = c("NO2", "TMP", "NO2"),
Wert = c(50, 20, 40),
date = as.POSIXct(c("2023-01-01 10:00:00", "2023-01-01 11:00:00", "2023-01-02 12:00:00"))
)
params <- list(meteo_variables = c("TMP"), target = "NO2")
prepared_data <- prepare_data_for_modelling(env_data, params)
print(prepared_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.