Machine Learning · Energy
GridCast AI
A full-stack machine learning platform for forecasting short-term electricity demand across Great Britain, with a production-style ML pipeline, explainable AI, and an interactive analytics dashboard.
Live Demo
Overview dashboard — system status, live demand metrics, and 48-hour forecast at a glance.
Overview
GridCast AI ingests historical half-hourly demand data from Great Britain's National Energy System Operator, engineers lag and rolling-window features, trains an XGBoost forecaster, and serves predictions through FastAPI to a Next.js dashboard that consumes the API directly.
- —48-hour demand forecasts with confidence intervals.
- —SHAP explanations built into every prediction, not bolted on after.
- —Regional demand map and what-if scenario simulation across GB.
- —Ingestion, features, training, inference, and explainability run as independent modules.

Forecast analytics — 48-hour demand forecast, confidence intervals, and statistical decomposition.
Build
The dashboard has five focused views: overview, forecasts, grid map, scenarios, and explainability, instead of one crowded screen. You can go from headline metrics to a single prediction's SHAP waterfall without losing context.
NESO data is validated and transformed into model-ready features before XGBoost is trained and persisted as an artifact. FastAPI then serves forecasts, historical demand, and SHAP values through typed endpoints. The frontend only talks to that API; it has no knowledge of the model internals.
Frontend
Next.js · TypeScript
Interactive dashboard with forecast analytics, regional demand mapping, scenario simulation, and explainable AI visualisations.
Backend
FastAPI · Python
REST API serving forecasts, model metadata, SHAP explanations, historical demand, and simulation endpoints.
Machine Learning
XGBoost · scikit-learn · SHAP
Feature engineering, model comparison, recursive 48-hour forecasting, evaluation metrics, and explainable predictions.
Data Pipeline
NESO Historic Demand Data
Validation, preprocessing, lag feature generation, rolling statistics, training dataset creation, and model artifact generation.

Regional grid map — demand visualised across GB with switchable layers.

Scenario simulation — what-if forecasting with adjustable operational variables.

Model insights — global feature importance across all forecast points.

Local explanations — SHAP waterfall chart for individual forecast reasoning.
Built solo, front to back. Most of the iteration time went into the SHAP explainability views, not the forecasting model itself.