This function loads data from CSV files in the specified directory. It supports two formats:
load_uba_data_from_dir(data_dir)A data.table containing the loaded data in long format. Returns an error if no valid
files are found or the resulting dataset is empty.
Character. Path to the directory containing .csv files.
"inv": Files must contain the following columns:
Station, Komponente, Datum, Uhrzeit, Wert.
"24Spalten": Files must contain:
Station, Komponente, Datum, and columns Wert01, ..., Wert24.
File names should include "inv" or "24Spalten" to indicate their format. The function scans
recursively for .csv files in subdirectories and combines the data into a single data.table
in long format.
Files that are not in the exected format will be ignored.
If Uhrzeit uses 1-24 to represent hours, values will be shifted to 0-23 for
lubridate compatibility.