Preview · menu 2

Portfolio · Data & Business Analysis · Full stack

EV Network Intelligence

An AI-assisted operations intelligence platform for a fictitious UK rapid-charging network: 120 sites, 857 chargers, 18 months of operations. Synthetic data, statistical anomaly detection, forecasting, regulatory obligation tracking and AI narratives grounded on the computed statistics. Designed and built end-to-end by Christopher Hickman — data model, generator, analytics, API, front end and deployment.

Open the live dashboard Back to portfolio
Screenshot of the live EV Network Intelligence dashboard: an AI-written executive brief headlined "Ashford payment failures spike; assign owner now", a row of eight KPI tiles each marked signal or noise, a signal explorer charting revenue against its expected band with anomaly markers and a 90-day forecast fan, and a rail of open exceptions ranked by sigma with a named owner.
ClientNone — a self-directed build on synthetic data
Scale120 sites · 857 chargers · 438,276 charger-days · 599,600 sessions
Runs onMy own servers: MySQL 8 + PHP 8 on one host, a local LLM gateway on another, published through a Cloudflare tunnel
Built withPython (generator), PHP 8 (analytics + API), MySQL 8, vanilla JS + ECharts, no framework

The problem

Why this exists

Most operational dashboards report what happened and stop. The operator still has to work out whether a movement is real, what caused it, whether an obligation is at risk, and what to do about it. This build closes that gap: every number on the page carries its expected value, its uncertainty, the segments that drove it, and a written recommendation with a named owner.

What it does

  1. Separates signal from noise.
    Season-trend decomposition with a robust wide-window trend, weekly seasonality, a UK bank-holiday regressor, and ±3σ control limits from a MAD-based scale. A movement inside the band is reported as noise, not escalated.
  2. Explains what moved and why.
    Each anomaly is decomposed into contributing regions, sites or vendors with their share of the movement, and — where the data supports it — a likely cause: a firmware release in force, a backhaul type common to the affected sites, or every region moving together (a network-wide incident rather than a local one).
  3. Tracks obligations against versioned thresholds.
    Reliability, P1 restore time, payment success and fraud response are held as data — metric, grain, comparator, threshold, window and owner — measured at the grain the regulator judges, and projected to window end on the current run rate.
  4. Forecasts with ranges, not points.
    Holt-Winters additive forecasts 90 days ahead with 80% and 95% intervals, bounded to each metric's physical range. The lower bound is the figure to plan against.
  5. Writes the brief.
    A hosted LLM turns the computed statistics into an executive brief, per-KPI explanations and per-exception recommendations. The model receives a stats packet and may use nothing else; the packet is stored with the text and shown in Explain mode.

Engineering

How it is put together

Synthetic data · PythonA seeded generator producing sites, chargers, telemetry, sessions, payments and faults with realistic seasonality, ~28% YoY growth, a tariff change and five deliberately planted incidents.
Warehouse · MySQL 8Facts at charger × day — the grain the obligation is judged at. Marts derive upward and are reconciled to the facts on every run; a mismatch fails the build.
Analytics · PHP 8Decomposition, anomaly detection, contribution analysis, Holt-Winters forecasting and obligation projection. No ML library — the methods are chosen so every figure can be explained.
AI · hosted model via gatewayNarratives generated server-side against a stats packet, cached in the database, and never called from the browser. If the model is unavailable the page falls back to deterministic templates and says so.
API · read-only PHPWhitelisted GET endpoints over the published analytics mart. No user input reaches SQL; the web user holds SELECT only.
Front end · vanilla JSNo framework. ECharts for charts, a hand-written canvas map replaying real session records, and an Explain mode that reveals the exact packet behind every AI sentence.

The honest test

Five incidents were planted in the data on known dates. The dashboard publishes its own scorecard — what was planted, what the detector found, and how long it took. Building the scorecard is what exposed the defects worth fixing.

IncidentWhat was plantedDetectedLag
Payment gateway incidentContactless failure rate 2% → 38% over 43 hoursNetwork-wide spike, correctly attributed to a gateway incident rather than any site, because every region moved togetherday 0
Card-testing fraudNight-time bursts of declined micro-sessions at two forecourtsBoth sites flagged the day it started, with the signature namedday 0
Backhaul degradationAvailability down ~6 points across 14 sites on 4G backhaulIndividual sites flagged as the degradation ramped in, with the shared backhaul type identified as the common factorday 0
Firmware faultConnector faults ×3.5 on one vendor while a bad release was in forceCaught as a sustained drift by the EWMA rule, and linked to the firmware release in force at the time+21 days
Seasonality & growthSummer and bank-holiday peaks, Christmas trough, ~28% YoY growthCorrectly modelled as the expected baseline rather than reported as exceptions — which is the desired behaviourn/a

The firmware lag is real and left visible: a gradual rate change across a large fleet is genuinely hard to catch early, and a scorecard that reported five out of five at day zero would not be worth publishing.

Defects found by building the test

Design decisions

Choices worth defending

  • The AI never invents a number. The model receives a stats packet and is instructed to use nothing else. The packet is stored with the narrative and shown on demand, so any sentence can be checked against what the model was given.
  • Narratives are precomputed, not live. A visitor never triggers a model call. The page loads at the same speed whether the LLM is running or not, and degrades to deterministic templates rather than failing.
  • Thresholds are data, versioned. A breach stays attributed to the threshold in force at the time, which is what an auditor asks about.
  • Measured at the grain of the obligation. Reliability is computed per charger per day, because a monthly network average hides a site that was down for a week.
  • No ML library. Every method here can be explained to a finance director in a sentence. That is a deliberate constraint, not a limitation.