Adapt loader to convert cumulative kWh to power (kW) #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #1
This pull request updates the data format and preprocessing logic to align with a new dataset structure. The changes include modifying the raw data file to include additional metadata and adapting the data loader to handle the new format while introducing a calculated
power
column.Changes to data format:
data/raw/dummy.csv
: Replaced the old dataset structure with a new format that includes metadata fields (e.g.,id
,measurement_category
,location_id
) and updated time series data columns fromts
andvalue
toZeitstempel
andMesswert
.Updates to data preprocessing:
src/preprocessing/loader.py
:load_timeseries
function to skip metadata rows (skiprows=21
) and use the updated column names (Zeitstempel
andMesswert
) for parsing.timestamp
andcum_kwh
, then calculated a newpower
column as the difference ofcum_kwh
multiplied by 4 (to convert cumulative kWh to power in 15-minute intervals).power
values and removed the intermediatecum_kwh
column for a cleaner dataset.