energy_data_retrieval.data_center_catalogue.catalogue#
Evidence-bound data center projects and exact OEM models, using JSONL/Parquet.
Reuse the PV catalogue’s canonical encoding, shard reader and non-overwriting upsert. No network access, geocoding or inferred IT capacity occurs here.
- energy_data_retrieval.data_center_catalogue.catalogue.stable_id(entity_type, *identity)[source]#
Choose immutable external identity once; keep model punctuation/case.
- Parameters:
entity_type (str)
identity (str)
- Return type:
str
- energy_data_retrieval.data_center_catalogue.catalogue.validate_record(row, sources)[source]#
Validate units, evidence, scope and nullable ratings before any publication.
- Parameters:
row (dict[str, Any])
sources (dict[str, Any])
- Return type:
None
- energy_data_retrieval.data_center_catalogue.catalogue.validate_catalogue(rows, sources, *, bess_projects=None, bess_equipment=None)[source]#
Reject duplicate identities, cycles, orphan links and unsafe aggregate roles.
- Parameters:
rows (list[dict[str, Any]])
sources (dict[str, Any])
bess_projects (set[str] | None)
bess_equipment (set[str] | None)
- Return type:
None
- energy_data_retrieval.data_center_catalogue.catalogue.capacity_summary(rows, field)[source]#
Sum compatible basis groups only; exclude overlaps and keep unknown as null.
Unresolved overlap groups are conservatively excluded even after filtering. Aggregate exclusions are persistent, independent of filters, so filtering out children cannot turn an overlapping campus total into an eligible facility.
- Parameters:
rows (list[dict[str, Any]])
field (str)
- Return type:
dict[str, Any]
- energy_data_retrieval.data_center_catalogue.catalogue.upsert_records(existing, incoming, *, now)[source]#
Reuse PV upsert for safe facts; quarantine only conflicting fields.
Source dates/boundaries travel with both observations. Creation timestamps survive. Empty incoming values never erase facts. Identical rows do not churn updated_at. Explicit review is needed to resolve quarantined fields.
- Parameters:
existing (list[dict[str, Any]])
incoming (list[dict[str, Any]])
now (str)
- Return type:
tuple[list[dict[str, Any]], list[dict[str, Any]]]