← All projects
IE Sustainability Datathon 2026
Forecasting · Geospatial · Energy

Spanish EV Charging Network

A plan for where Spain should build its interurban EV charging network by 2027, with the fewest stations. It forecasts EV demand, then checks where the electrical grid can actually support new chargers, and proposes the smallest network that still covers the country.

Role
Analyst (team)
Event
IE Sustainability Datathon 2026
Horizon
2027 strategy
Stack
Python · statsmodels · GeoPandas
The proposal

The smallest network that covers Spain.

The goal was coverage with the fewest stations, placed only where the grid can carry them. The proposal is 190 interurban fast-charging stations across the 52 provinces whose demand was modeled, and 164 points where demand outruns the grid. Built out, that is 479 fast chargers at 150 kW each, 71.9 MW of nameplate capacity.

The 2027 network
Shading shows the six provinces with a reported share of national EV demand, which together account for 69% of it. Amber markers are the five fastest-growing provinces by 2021-2023 CAGR. Provinces with no reported figure are left unshaded.
Proposed stations190
Grid friction points164
Provinces modeled52
What the map shows
Share of national demand
Fastest-growing, by CAGR
No reported figure
Real province boundaries · demand share and CAGR from the RaviStar analysis · Canary Islands not drawn
Demand

Forecasting EV adoption to 2027.

We benchmarked five time-series models on 108 months of DGT registrations, from January 2015 to December 2024, and picked the one that balanced error against fit. The national forecast then splits across all 52 provinces.

The selected SARIMA won on neither error measure: ARIMA(2,1,2) has the lower RMSE and Prophet the lower MAPE. It was chosen on AIC, 88.4, and on its residuals, Ljung-Box p = 0.93, meaning what the model leaves over is noise rather than a pattern it missed. It puts 1,412,640 EVs on Spanish roads by December 2027.

Model selection

Five candidate models scored on RMSE, MAPE and AIC over 108 months of DGT registrations. Lower is better on all three.
ModelRMSEMAPEAIC
ARIMA(2,1,2)3,34513.2%103.5
SARIMA(1,1,1)(1,1,1,12)3,60414.8%73.0
SARIMA(1,1,1)(1,0,1,12) selected3,41213.5%88.4
Prophet3,35712.9%n/a
Holt-Winters4,37334.6%n/a
Emerging markets

Where growth is fastest, not where volume is highest.

Madrid and Barcelona hold the volume, 45% and 13% of projected national demand between them. The five provinces growing fastest from 2021 to 2023 are somewhere else entirely, and they are the amber markers on the map above. Badajoz and Cáceres both sit on the A-66 Ruta de la Plata, where i-DE manages the distribution network; the other three line up along the A-3.

Badajoz
Fastest
+49.8% CAGR 2021–23 · 8,420 EVs by 2027
A-66 Ruta de la Plata, where i-DE manages distribution.
Albacete
Second
+46.9% CAGR 2021–23 · 6,180 EVs by 2027
A-3, Madrid to Valencia.
Guadalajara
Third
+36.6% CAGR 2021–23 · 4,920 EVs by 2027
A-3, Madrid to Valencia.
Cuenca
Fourth
+34.1% CAGR 2021–23 · 3,640 EVs by 2027
A-3, Madrid to Valencia.
Cáceres
Fifth
+31.8% CAGR 2021–23 · 5,280 EVs by 2027
A-66 Ruta de la Plata, where i-DE manages distribution.
Supply

Four layers of reality.

A good location is not just where traffic is high. It has to sit on an interurban road, near useful stops, and on a stretch of grid that can actually power a fast charger.

Roads & traffic
OpenStreetMap · MITMA
Interurban roads only: autopistas, autovías, carreteras nacionales, with traffic intensity.
Existing chargers
DGT charger registry
Current public fast chargers plotted along the TEN-T corridors, to find the real gaps.
Grid capacity
CNMC · i-DE, Endesa, Viesgo
Grid nodes classified by available hosting capacity in MW, across several distributors.
Points of interest
OpenStreetMap POI
Service areas, petrol stations, hotels, and motorway junctions as candidate host sites.
The model

Scoring every candidate.

We screened over 50,000 OpenStreetMap candidates, a cut of at least 263×. Each one gets a composite score from five weighted signals, then a greedy spatial set-cover algorithm picks the highest scorer that is not within 40 km of a site already chosen. We capped the network at 300 stations; it converged at 190, which means coverage saturated before the budget did. Of those 190, 112 sit on TEN-T corridors, 59% of the network.

Traffic carries the most weight because it is the most reliable signal in the data and the best proxy for utilization. Province-level EV demand carries the least, because it is a blunt instrument and the traffic signal already captures where people actually drive. Grid capacity ranks candidates rather than excluding them: a congested site is buildable with investment, not impossible.

Composite score weights

HOVER A SLICE Traffic volume 30% Coverage gap 25% Grid capacity 20% Proximity to stops 15% EV demand 2027 10%
Traffic volume30%
Coverage gap25%
Grid capacity20%
Proximity to stops15%
EV demand (2027)10%
The constraint

Where the grid says no.

Every proposed station is tagged by the capacity of its nearest grid node. The congested ones are not bad locations, they are the places where a grid upgrade is the only thing standing in the way. What separates the three bands is what that upgrade costs and how long it takes.

Spain is not short of chargers. The 6,896 units already near motorway corridors are almost entirely slow AC, of little use to someone crossing the country, and the real wall is the grid: of the 190 highest-scoring sites, only 26 can be built with no grid works at all, and the rest cannot carry even the AFIR minimum of 2×150 kW without a substation upgrade. Across 5,714 CNMC substation nodes, 92.9% held zero firm available capacity as of April 2026, after a 2023–2025 surge in data center, renewables and industrial connection applications took the headroom.

The 190 proposed stations by the hosting capacity available at their nearest grid node: 26 sufficient, 2 moderate, 162 congested, with the upgrade each band needs.
BandHosting capacityStationsWhat it means
Sufficient≥ 5 MW2613.7%The grid can power a fast charger today. Build first.No grid works · deployable as they are
Moderate1 – 5 MW21.1%Workable, but close to the limit. Plan carefully.Upgrade 6–18 months · €0.5–2M per node
Congested< 1 MW16285.3%Demand outruns the grid. These 162 points, plus the 2 moderate sites, are the 164 reinforcement priorities.Upgrade 12–36 months · €2–10M per node
The plan

A phased rollout.

The proposal is not just a map, it is an order of operations. Build where the grid is ready first, then the sites one distributor can fast-track, then the rest.

Phase 1 · revenue in 9–12 months
The 26 Sufficient stations.
The sites the grid can already power. No works and no negotiation, so these are the ones earning while the rest are still in approval.
Phase 2
The 79 i-DE friction points.
Congested sites on Iberdrola i-DE nodes, where one distributor can self-authorize the substation upgrade rather than wait on third-party approval.
Phase 3
The 162 Congested sites.
The full congested set, including the nodes managed by Endesa and Viesgo, where the upgrade has to be negotiated with a third party.

This is the phasing as presented to the jury. The written report, embedded further down, sequences the same 190 stations in a different order.

The delivery

Shipped as a dashboard, not a notebook.

The analysis only matters if someone at the utility can act on it, so we wrapped it in a five-page Streamlit app: an executive overview, one page per datathon objective, and the interactive maps. Below is the Charging Network page as it runs.

The Charging Network page of the live app: a dark map of Spain with the 12 TEN-T corridors drawn as colored lines and proposed 150 kW stations plotted along them, each dot colored green, yellow or red for the grid capacity available at that location.
Objective 1 in the deployed app: the proposed stations along the TEN-T corridors, colored by the grid status at each location.
The deliverables

The report and the pitch.

Two documents came out of the week: a written strategy report with the full methodology, model selection, and appendix of assumptions, and the deck we presented to the jury. Both are below, scrollable in place.

Load the deck 1.4 MB, opens in a new tab
Team RaviStar · final presentation (10 slides) Open full screen
Next project Hospital Readmission MLOps
Get in touchEmail me anytime