energy_data_retrieval.wind_catalogue.repd#

Offline REPD reconciliation through WRI’s explicit historical registry crosswalk.

Planning applications are not automatically new farms. This adapter enriches only existing, singly linked historical identities with matching names; every other selected candidate is retained in a decision ledger. Scope remains unresolved.

energy_data_retrieval.wind_catalogue.repd.resubmission_label_match(current, historical)[source]#

Compare names after removing only administrative resubmission labels.

This is a corroboration check after an explicit registry crosswalk, never an identity matcher. Phase, extension, revised and repowering words are retained.

Parameters:
  • current (str)

  • historical (str)

Return type:

bool

energy_data_retrieval.wind_catalogue.repd.reconcile_repd(text, crosswalk, existing, *, source_id, crosswalk_source_id, now, as_of, allow_resubmission_labels=False)[source]#

Return reviewed enrichments and decisions for all Wind CSV rows.

text is decoded by the caller (Q2 2026 uses Windows-1252). crosswalk is WRI resources/GBR/matches_GBR.csv from a pinned commit. No ID-prefix inference, fuzzy merge, coordinate conversion, model inference, capacity substitution or aggregation approval occurs here. Dates are UTC ISO strings.

Parameters:
  • text (str)

  • crosswalk (str)

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

  • source_id (str)

  • crosswalk_source_id (str)

  • now (str)

  • as_of (str)

  • allow_resubmission_labels (bool)

Return type:

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

energy_data_retrieval.wind_catalogue.repd.procedural_milestones(raw, *, source_id, locator)[source]#

Read dated application history without treating a refusal as current status.

Dates are strictly day/month/year. Empty source cells produce no event; a malformed nonempty date fails the record rather than becoming a null date. Appeal success is not evidence of construction, operation or approved scope.

Parameters:
  • raw (dict[str, str])

  • source_id (str)

  • locator (str)

Return type:

list[dict[str, str]]