How VoltCast works

Predicting how much electricity four US grid regions will need over the next 24 hours, the same way you'd forecast weather but for power demand.

← Back to the dashboard

The problem

Every hour, grid operators have to decide how much power to generate. Too little means blackouts. Too much wastes money and fuel. VoltCast looks at the last week of demand and predicts the next 24 hours for California, Texas (ERCOT), the Mid-Atlantic (PJM), and the Midwest (MISO).

The pipeline

Data flows one direction: from the government API to the chart you see. Each step hands off to the next.

  1. 1
    Pull the data. The EIA (US Energy Information Administration) publishes real hourly demand per region. We pull a rolling 5-year window into Parquet files.
  2. 2
    Validate it. A Pandera schema rejects bad rows: nulls, negative load, impossible spikes, gaps in time. Corrupt data never reaches the model.
  3. 3
    Engineer features. Raw megawatts plus context: sin/cos encodings of hour, day, and month (so hour 23 sits next to hour 0), lag features (load 1h, 24h, and 168h ago), rolling averages, and a weekend flag. Then z-score normalize, scaler fit on the training split only — no peeking at the future.
  4. 4
    Slide a window. The long time series becomes thousands of training examples: each is 168 hours of input mapped to the 24 hours that follow.
  5. 5
    Predict. The champion model takes the latest 168 real hours and outputs all 24 future hours in one shot. No feeding predictions back in.
  6. 6
    Publish. Forecasts land in S3 as JSON. This dashboard reads them through a server route that holds the AWS keys, so the bucket stays private and the browser never touches AWS.

The model

A Temporal Transformer, written from scratch in PyTorch. No HuggingFace, no Trainer abstractions. It learns which past hours matter most for each prediction. To forecast 9pm Friday, it can learn to look hard at 9pm last Friday.

To prove it earns its place, every region also trains an LSTM and a naive "tomorrow = today" baseline. If the Transformer can't beat copy-paste, something is broken. It beats the naive baseline by roughly 33%.

The serverless loop

Nothing runs 24/7. There is no API server. Compute is ephemeral GitHub Actions runners, storage is S3 and DagsHub, the dashboard is on Vercel. Cost is close to zero.

Reading the numbers

← Back to the dashboard · source