energy_data_retrieval.gas_catalogue.catalogue#

Gas-fired plant identities, electrical boundaries and deterministic snapshots.

energy_data_retrieval.gas_catalogue.catalogue.build_parquet(root, output)[source]#

Validate JSONL and publish an immutable, typed Zstandard snapshot.

Parameters:
  • root (Path)

  • output (Path)

Return type:

dict[str, Any]

energy_data_retrieval.gas_catalogue.catalogue.capacity_summary(rows, field)[source]#

Separate lifecycle, technology and historical vintage; exclude ambiguous scopes.

Parameters:
  • rows (list[dict[str, Any]])

  • field (str)

Return type:

dict[str, Any]

energy_data_retrieval.gas_catalogue.catalogue.stable_id(entity_type, *identity)[source]#

Use immutable registry identity, never mutable plant capacity or ownership.

Parameters:
  • entity_type (str)

  • identity (str)

Return type:

str

energy_data_retrieval.gas_catalogue.catalogue.upsert_records(existing, incoming, *, now)[source]#

Preserve creation dates and quarantine conflicts using the shared upsert.

Parameters:
  • existing (list[dict[str, Any]])

  • incoming (list[dict[str, Any]])

  • now (str)

Return type:

tuple[list[dict[str, Any]], list[dict[str, Any]]]

energy_data_retrieval.gas_catalogue.catalogue.validate_catalogue(rows, sources)[source]#

Reject duplicate IDs, external identities and invalid/cyclic hierarchy.

Parameters:
  • rows (list[dict[str, Any]])

  • sources (dict[str, Any])

Return type:

None

energy_data_retrieval.gas_catalogue.catalogue.validate_record(row, sources)[source]#

Validate provenance, coordinates, status dates and electrical/thermal boundaries.

Parameters:
  • row (dict[str, Any])

  • sources (dict[str, Any])

Return type:

None