energy_data_retrieval.sources.cen.history#
Explicit historical bulk and preserved Qlik exports of CEN hourly generation.
- class energy_data_retrieval.sources.cen.history.HistorySchema(identity_column, value_column, timezone, timestamp_label, energy_unit, timestamp_column=None, date_column=None, hour_column=None, hour_columns=(), hour_origin=1, date_format='%Y-%m-%d', source='cen-bulk', measurement_basis='unspecified', decimal_places=None, temporal_resolution='hourly', decimal_separator='.', sheet=None, skiprows=0, delimiter=',', technology_column=None, pv_technology_values=())[source]#
Bases:
objectA source-specific contract; hourly and daily products cannot be conflated.
Use timestamp_column, or date_column with hour_column/hour_columns. Hour origin 1 means labels 1..24; origin 0 means 0..23.
timestamp_labelindependently states whether each resulting civil-clock label begins or ends its interval.- Parameters:
identity_column (str)
value_column (str)
timezone (str)
timestamp_label (str)
energy_unit (str)
timestamp_column (str | None)
date_column (str | None)
hour_column (str | None)
hour_columns (tuple[str, ...])
hour_origin (int)
date_format (str)
source (str)
measurement_basis (str)
decimal_places (int | None)
temporal_resolution (str)
decimal_separator (str)
sheet (str | None)
skiprows (int)
delimiter (str)
technology_column (str | None)
pv_technology_values (tuple[str, ...])
- identity_column: str#
- value_column: str#
- timezone: str#
- timestamp_label: str#
- energy_unit: str#
- timestamp_column: str | None#
- date_column: str | None#
- hour_column: str | None#
- hour_columns: tuple[str, ...]#
- hour_origin: int#
- date_format: str#
- source: str#
- measurement_basis: str#
- decimal_places: int | None#
- temporal_resolution: str#
- decimal_separator: str#
- sheet: str | None#
- skiprows: int#
- delimiter: str#
- technology_column: str | None#
- pv_technology_values: tuple[str, ...]#
- energy_data_retrieval.sources.cen.history.normalize_history(frame, mapping, schema)[source]#
Map verified aliases to operating units, resolve duplicates, then aggregate.
Mapping columns are source_id, unit_id, site_id. All mapped units constitute the verified roster for this import’s period. Equal aliases are counted once; a conflict (including null versus a reported value) fails for reconciliation.
- Parameters:
frame (DataFrame)
mapping (DataFrame)
schema (HistorySchema)
- Return type:
DataFrame
- energy_data_retrieval.sources.cen.history.import_history(path, mapping_path, output, schema, *, member=None)[source]#
Import preserved exports with exact input/mapping/schema hashes and provenance.
- Parameters:
path (Path)
mapping_path (Path)
output (Path)
schema (HistorySchema)
member (str | None)
- Return type: