energy_data_retrieval.pv_catalogue.odre#
Offline ODRE PV registry staging with a pinned, explicitly reviewed identity set.
An EIC identifies a network installation, not necessarily a whole project. This adapter rejects aggregates and obvious phase/alias risks; it never fuzzy-merges.
- energy_data_retrieval.pv_catalogue.odre.normal_name(value)[source]#
Conservative exact normalized-name screen; never an identity merge key.
- Parameters:
value (str)
- Return type:
str
- energy_data_retrieval.pv_catalogue.odre.read_odre_json(content, *, sha256, identities_only=False)[source]#
Verify downloaded bytes, required columns and unique valid EIC identifiers.
- Parameters:
content (bytes)
sha256 (str)
identities_only (bool)
- Return type:
list[dict[str, Any]]
- energy_data_retrieval.pv_catalogue.odre.read_odre_energy_page(content, *, sha256, offset, limit)[source]#
Read one pinned Explore API page, without approving any project crosswalk.
Injected energy is measured rolling kWh. Other native metrics stay distinct: the source descriptions disagree about self-consumption in produced energy, and the glossary defines productible for hydropower. Keep all three native values available to the reviewer without mapping them to expected PV output.
- Parameters:
content (bytes)
sha256 (str)
offset (int)
limit (int)
- Return type:
tuple[int, list[dict[str, Any]]]
- energy_data_retrieval.pv_catalogue.odre.screen_odre_identities(rows, identities, *, existing, minimum_kw=10000, maximum_kw=None)[source]#
Screen a bounded cohort against national names and >=1 MW communes.
A shared commune is a review flag, not proof of duplication. Sub-MW entries participate in exact-name screening but not the conservative commune screen. Registry administrative codes are not promoted to surveyed plant coordinates.
- Parameters:
rows (list[dict[str, Any]])
identities (list[dict[str, Any]])
existing (list[dict[str, Any]])
minimum_kw (float)
maximum_kw (float | None)
- Return type:
dict[str, list[str]]
- energy_data_retrieval.pv_catalogue.odre.reviewed_odre_records(rows, identities, *, reviewed_ids, existing, source_id, retrieved_at, snapshot_date, minimum_kw=10000, maximum_kw=None)[source]#
Stage the reviewed cohort, preserving capacity basis and registry semantics.
- Parameters:
rows (list[dict[str, Any]])
identities (list[dict[str, Any]])
reviewed_ids (set[str])
existing (list[dict[str, Any]])
source_id (str)
retrieved_at (str)
snapshot_date (str)
minimum_kw (float)
maximum_kw (float | None)
- Return type:
list[dict[str, Any]]
- energy_data_retrieval.pv_catalogue.odre.reviewed_odre_enrichments(rows, identities, *, reviewed_ids, existing, source_id, snapshot_date)[source]#
Fill missing grid/service facts for reviewed unique complete-phase EICs.
All canonical phase and external EICs participate in uniqueness. No name join, phase aggregation, overwrite or existing extension merge is performed. Native assertions that differ from populated fields remain explicit review evidence. Callers must checksum-validate both exports with
read_odre_json()first.- Parameters:
rows (list[dict[str, Any]])
identities (list[dict[str, Any]])
reviewed_ids (set[str])
existing (list[dict[str, Any]])
source_id (str)
snapshot_date (str)
- Return type:
list[dict[str, Any]]
- energy_data_retrieval.pv_catalogue.odre.reviewed_installed_power_updates(rows, existing, *, reviewed_crosswalks, source_id, minimum_kw=1000, maximum_kw=5000)[source]#
Fill missing installed MW on explicitly reviewed, unique single-phase EICs.
Call
read_odre_jsonwith pinned bytes first. The allowlist maps canonical record IDs to reviewed EICs; it is never inferred from names. Older AC/DC values, lifecycle and their capacity_basis are untouched. Registry installed active kW is kept in the separate AC/DC-unspecified column, not injection MW.- Parameters:
rows (list[dict[str, Any]])
existing (list[dict[str, Any]])
reviewed_crosswalks (dict[str, str])
source_id (str)
minimum_kw (float)
maximum_kw (float)
- Return type:
list[dict[str, Any]]