energy_data_retrieval.hydro_catalogue.eia#

Bounded EIA-860 hydro enrichment with exact registry identity and dated unit evidence.

energy_data_retrieval.hydro_catalogue.eia.parse_partition(plant_bytes, generator_bytes, *, year, first, last)[source]#

Read every operable generator at each hydro-containing plant in an ID range.

Operable includes standby/out-of-service units: eligibility is checked later. No generator ID is numerically normalized; leading zeroes are identity text.

Parameters:
  • plant_bytes (bytes)

  • generator_bytes (bytes)

  • year (int)

  • first (int)

  • last (int)

Return type:

list[dict[str, Any]]

energy_data_retrieval.hydro_catalogue.eia.eligibility(existing, item)[source]#

No fuzzy matching; different source scopes and ambiguous identities stay on hold.

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

  • item (dict[str, Any])

Return type:

str

energy_data_retrieval.hydro_catalogue.eia.enrich(existing, item, *, source_id, identity_source_id, now)[source]#

Retain plant UUID/history and all unit evidence; no promotion to 2026 operation.

Aggregation stays unresolved, including split reporting facilities. Pumping power, storage energy, turbine count and hydraulic subtype are not inferred.

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

  • item (dict[str, Any])

  • source_id (str)

  • identity_source_id (str)

  • now (str)

Return type:

dict[str, Any]

energy_data_retrieval.hydro_catalogue.eia.review_partition(existing, items, *, source_id, identity_source_id, now)[source]#

Prepare reviewable decisions without mutating canonical records.

Preserve full evidence for held identities, including mixed/pumped units. Existing-value conflicts are held rather than aborting a whole partition; duplicate registry identities abort because selecting either would be unsafe.

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

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

  • source_id (str)

  • identity_source_id (str)

  • now (str)

Return type:

dict[str, Any]