Public-source transformer data access and alignment audit
Accessed 12 October 2026; exact retrieval UTC times and source URLs in fetch_manifest.json.

Reproduce online:
  python3 fetch_and_audit_eredes_era5.py
Reproduce from archived response bytes:
  python3 fetch_and_audit_eredes_era5.py --offline
Requires Python >=3.10, standard library only; no API key for these public requests.

Authoritative outputs:
  data_access_audit.json              detailed provenance and scientific limitations
  data_access_table.csv/.json         source coverage table
  aveiro_pt_inventory_sample.csv      ten genuine Aveiro PT inventory records
  aveiro_substation_native_records.csv genuine AVEIRO substation native records
  aveiro_era5_land_hourly.csv          ERA5-Land external 2 m temperature at PT point
  aveiro_context_hourly_join.csv      complete 168-hour UTC grid, including blank values
  fetch_manifest.json                response SHA256 hashes, API URLs, UTC retrieval times

The *_raw.json responses preserve source bytes. The weekly energy request is paginated
in six files substation_aveiro_week_page000_raw.json through page500_raw.json; these
566 rows are authoritative. The earlier substation_aveiro_week_raw.json is only an
initial 100-row page retained as an access snapshot, not the complete sample.
Selected source metadata files are derived from the preserved full API catalog.

Scientific meaning:
  PT 0105D2000100 is an MV/LV site in Aveiro, with 630 kVA installed power and a
  20–39% band for maximum utilization over the previous 12 months. The inventory
  refresh cadence is quarterly. Installed kVA can sum several transformers.
  AVEIRO HV/MV substation 0105S5001500 is a separate asset; the characteristics table
  lists 63 MVA and a 60/15 kV transformation ratio for reference year 2025.
  Public fields checked here establish no PT-to-substation electrical relationship.
  Substation energy values retain the published kWh unit. Native timestamps are
  mostly 15 minutes apart despite the dataset description calling them hourly.
  The accumulation interval is unresolved; no kW conversion or summation is used.
  ERA5-Land temperature_2m is external gridded air temperature, redistributed by
  Open-Meteo. It is reanalysis, not direct satellite thermometry of the transformer.
  The nearest returned grid point is approximately 6 km from the requested PT point.
  Missing energy keys remain missing. No imputation, interpolation or thermal fit
  was performed. Reanalysis backfill is not evidence of prospective real-time use.

Results for 17–23 March 2026 UTC:
  Native electrical timestamps: 566 of 672 possible 15-minute slots (84.23%).
  Hourly weather: 168 of 168 (100%).
  Exact-hour electrical/weather matches: 137 of 168 (81.55%).
  Missing exact-hour energy keys: 31; no null energy values among present records.
  Latest observation in queried Aveiro electricity archive: 24 March 2026 00:00 UTC.
  The source promises monthly publication, but actual timestamps are historical.
  These results establish access and alignment only. They do not demonstrate an
  improvement in transformer-temperature forecasting or calibrated confidence.

Attribution and source links:
  E-REDES – Distribuição de eletricidade, Portal Open Data E-REDES.
  https://e-redes.opendatasoft.com/explore/dataset/postos-transformacao-distribuicao/
  https://e-redes.opendatasoft.com/explore/dataset/diagrama_carga_subestacao_01_a_07/
  https://e-redes.opendatasoft.com/explore/dataset/caracteristicas-da-rede/
  All checked dataset metadata explicitly state CC BY 4.0. PT/network source prose
  also includes a generic restrictive ownership clause; this audit records rather
  than resolves the inconsistency. Energy source prose explicitly permits access
  under CC BY 4.0 with publisher attribution.
  Copernicus Climate Change Service (C3S), ECMWF, ERA5-Land hourly data.
  https://cds.climate.copernicus.eu/datasets/reanalysis-era5-land
  DOI 10.24381/cds.e2161bac
  https://confluence.ecmwf.int/pages/viewpage.action?pageId=501029136
  ERA5-Land-T daily updates arrive about 5 days behind real time; consolidated data
  replace initial data about two months later. A dedicated ERA5-Land uncertainty
  field is not published; ERA5 equivalent-field uncertainty is a documented proxy.
  Open-Meteo redistribution documentation:
  https://open-meteo.com/en/docs/historical-weather-api
  https://open-meteo.com/en/terms
  Free Open-Meteo API usage is restricted to non-commercial purposes; returned data
  are CC BY 4.0 and require attribution. The present audit is public research.
