Delayed actuals and revised forecasts can produce misleading comparisons.
01 / Problem & data
How can a dashboard compare historical carbon intensity without hiding missing actuals or source revisions?
Great Britain’s NESO Carbon Intensity API, covering half-hour intensity and generation intervals. Source data is attributed under CC BY 4.0.
Revision-aware storage, freshness checks, and historical workload comparisons.
02 / Implementation
Follow the data through the product.
NESO source intervals
NESO supplies half-hour carbon intensity and generation intervals for Great Britain.
Validation + raw events
Validation preserves the source payload and distinguishes exact repeats from changed records.
Revision-aware SQL
The storage model retains revisions and prevents a delayed forecast from replacing a known actual.
Analytical queries
Queries preserve missing actuals and reject incomplete comparison windows.
FastAPI dashboard
The dashboard presents historical comparisons with their freshness and uncertainty visible.
Three implementation choices
Preserve what the source changed.
Exact repeats add no new event, while changed payloads remain auditable. A delayed forecast cannot overwrite a known actual, and generation revisions replace fuel records together.
Keep missing values meaningful.
Unknown actuals stay null and are excluded from forecast-error calculations. The workload comparison rejects incomplete windows rather than quietly filling gaps.
Start with a complete, small data path.
SQLite and FastAPI provide a working vertical slice before optional PostgreSQL, Kafka, dbt, and Airflow services. Both ingestion paths share validation and materialization logic.
03 / Evidence & reflection
What the work demonstrates.
The recorded seven-day backfill contains 672 source events and 336 intensity intervals. Exact replay added no events. Historical workload comparisons demonstrate timing sensitivity, not measured operational savings.
Broaden failure-injection and infrastructure recovery checks before adding a hosted service or making availability claims.

