energy_data_retrieval.wind_catalogue.ons#
Bounded ONS wind unit observations; no farm capacity or lifecycle inference.
- energy_data_retrieval.wind_catalogue.ons.wri_id(ceg)[source]#
Apply the documented WRI Brazil importer mapping, never a name-derived ID.
- Parameters:
ceg (str)
- Return type:
str
- energy_data_retrieval.wind_catalogue.ons.parse_partition(data, *, sha256, offset, limit, retrieved_at)[source]#
Parse one sorted full-CEG partition of a pinned daily CSV.
A unit can represent multiple turbines. Nominal MW follows the dictionary, despite the legacy column name
val_potenciaefetiva. Retrieval time is not an observation date; release-for-operation dates are not farm commissioning.- Parameters:
data (bytes)
sha256 (str)
offset (int)
limit (int)
retrieved_at (str)
- Return type:
dict[str, Any]
- energy_data_retrieval.wind_catalogue.ons.audit_partitions(partitions)[source]#
Verify a contiguous prefix of one pinned release before resuming its scan.
Report structural coverage only. Reviewed or accepted identities and complete turbine inventories cannot be inferred from a successfully parsed partition. Input order is immaterial; gaps, overlaps and daily-source drift are errors.
- Parameters:
partitions (list[dict[str, Any]])
- Return type:
dict[str, Any]
- energy_data_retrieval.wind_catalogue.ons.reconcile(candidates, existing, *, source_id, identity_source_id, now)[source]#
Enrich unique registry-ID plus exact-name matches; preserve all scalar facts.
New/ambiguous identities remain in the ledger. Case and surrounding whitespace are normalized, but accents, words and phase suffixes are not approximated. Replaying the same source is idempotent; changed source content is rejected.
- Parameters:
candidates (list[dict[str, Any]])
existing (list[dict[str, Any]])
source_id (str)
identity_source_id (str)
now (str)
- Return type:
tuple[list[dict[str, Any]], list[dict[str, Any]]]