energy_data_retrieval.pv_catalogue.gem#

Offline GEM project import: group phases, retain evidence and screen overlaps.

Only explicit PV and unrestricted complete locations are candidates. Coordinates and dated statuses remain source claims. No network, fuzzy merge or AC conversion.

energy_data_retrieval.pv_catalogue.gem.read_gem_workbook(content, *, sha256)[source]#

Check exact source bytes and headers before reading utility-scale phases.

Parameters:
  • content (bytes)

  • sha256 (str)

Return type:

list[dict[str, Any]]

energy_data_retrieval.pv_catalogue.gem.stage_gem_projects(phases, *, existing, country_codes, source_id, now)[source]#

Return candidates and ID-only hold reasons; never mutate existing records.

Hold complete locations on mixed technology/licence, ambiguous names, nearby existing projects (2 km), or missing identity. All US sites need an EIA crosswalk. Different phase statuses/bases are retained without a misleading scalar total. Kosovo uses explicitly documented user-assigned XKX, not an ISO assignment.

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

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

  • country_codes (dict[str, str])

  • source_id (str)

  • now (str)

Return type:

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