Tracking Great Britain's Changing Electricity Grid
How Britain's generation mix shifted from coal baseload to wind, solar, and interconnectors — and how the GB Grid bot pipeline reconciles Elexon BMRS outturn with embedded solar.
- Published
- Updated
- Reading
- 3 min
- Filed under
- #energy #python #data #uk-grid
Ten years ago, coal regularly supplied more than a third of Great Britain’s electricity. By the autumn of 2024, Ratcliffe-on-Soar — the country’s last coal-fired power station — closed its doors for good. In that same decade, offshore and onshore wind grew from a rounding error into the single largest source of generation over whole winter weeks.
When I started building the GB Grid tracker and bot network, the goal was straightforward: report what is powering the grid every half-hour settlement period without burying the numbers in dashboards that take ten seconds to load. Getting the numbers right, however, means dealing with a quirk of how Britain meters its electricity.
The transmission vs. distribution blind spot
If you query Elexon’s Balancing Mechanism Reporting Service (BMRS) for instantaneous fuel outturn (FUELINST), you get a clean breakdown of generation by fuel code every five minutes. Look at it at 13:00 on a sunny June afternoon, though, and something looks wrong: solar is nowhere to be seen.
| Fuel Category | BMRS Code | Metering Level | Included in FUELINST? |
|---|---|---|---|
| Combined Cycle Gas | CCGT | Transmission (400/275 kV) | Yes |
| Nuclear | NUCLEAR | Transmission | Yes |
| Transmission Wind | WIND | Transmission | Yes (~75% of GB wind) |
| Interconnectors | INT* | Transmission | Yes (9 cables) |
| Embedded Solar PV | — | Distribution (≤132 kV) | No (appears as negative demand) |
| Embedded Wind | — | Distribution (≤132 kV) | No |
Because almost all solar farms and rooftop arrays in Great Britain connect to local distribution networks rather than the high-voltage national transmission system, the transmission system operator only sees them indirectly as a drop in national demand (INDO). If you compute fuel shares using FUELINST alone on a summer afternoon, you undercount renewables and overstate gas and nuclear shares by 15 to 25 percentage points.
Reconciling BMRS outturn with Sheffield Solar PV_Live
To report true supply-side shares, the /gb-grid ingestion worker merges two upstream feeds at +7 and +37 minutes past each hour:
- Elexon Insights (
FUELINST) for transmission-metered BMUs and interconnectors. - University of Sheffield
PV_Livealongside NESO’s embedded wind estimates for distribution-connected generation.
from dataclasses import dataclass
from datetime import date
import httpx
BMRS_OUTTURN_URL = "https://data.elexon.co.uk/bmrs/api/v1/generation/outturn/summary"
PVLIVE_URL = "https://api.pvlive.uk/pvlive/api/v4/gsp/0"
@dataclass(frozen=True)
class SettlementSnapshot:
settlement_date: date
period: int # 1..48 (or 1..50 on autumn clock change)
by_fuel_mw: dict[str, float]
@property
def total_supply_mw(self) -> float:
# Exclude pumped-storage pumping (negative) and net exports from supply denominator
return sum(mw for code, mw in self.by_fuel_mw.items() if mw > 0)
def share_pct(self, fuel: str) -> float:
total = self.total_supply_mw
return round((max(0.0, self.by_fuel_mw.get(fuel, 0.0)) / total) * 100.0, 1) if total else 0.0
def fetch_merged_period(client: httpx.Client, settlement_date: date, period: int) -> SettlementSnapshot:
bmrs = client.get(
BMRS_OUTTURN_URL,
params={"settlementDate": settlement_date.isoformat(), "settlementPeriod": period},
timeout=10.0,
).raise_for_status().json()
fuels: dict[str, float] = {row["fuelType"]: float(row["generation"]) for row in bmrs.get("data", [])}
# Layer in national embedded solar PV (GSP 0 = national total)
pv = client.get(PVLIVE_URL, params={"extra_fields": "installedcapacity_mwp"}, timeout=10.0).json()
if pv_rows := pv.get("data"):
fuels["SOLAR"] = float(pv_rows[0][2] or 0.0)
return SettlementSnapshot(settlement_date=settlement_date, period=period, by_fuel_mw=fuels)
Treating
FUELINSTas total generation is the most common bug in amateur UK energy trackers. On a sunny bank holiday, embedded solar alone can exceed 11 GW — more than every nuclear and biomass unit combined.
Interconnectors as a two-way valve
The other structural change over the past five years has been interconnector capacity. With North Sea Link (INTNSL, 1.4 GW to Norway), ElecLink (INTELEC, 1.0 GW through the Channel Tunnel), IFA2 (INTIFA2, 1.0 GW to France), and Viking Link (INTVKL, 1.4 GW to Denmark) all online, Great Britain can now import or export well over 8 GW across nine subsea cables.
When Scottish and North Sea wind output exceeds north-to-south transmission bottlenecks (B6 boundary constraints), Great Britain frequently flips from net importer to net exporter for hours at a time — pushing surplus power into continental Europe and Norwegian hydro reservoirs while paying domestic wind farms to turn down north of the bottleneck.
Following the live feeds
If you want the numbers in your feed without checking a dashboard, the GB Grid documentation page lists all nine automated accounts (@GBGrid, @GBGridWind, @GBGridSolar, @GBGridNuclear, @GBGridImports, @GBGridCoal, @GBGridGas, @GBGridHydro, and @GBGridBiomass), their exact cron schedules, and the threshold rules that trigger record alerts.