Stories

Explore comprehensive technical tutorials, programming guides, and insights from live coding sessions. Learn Python, data science, and modern web development.

Profile #4 — The post-blackout winners club: location dictates, owner ranks
Analysis

Profile #4 — The post-blackout winners club: location dictates, owner ranks

Recap of three profiles (ContourGlobal/Arrubal, TotalEnergies/Castejón, Castleton/Amorebieta) and the unifying thesis: location determines whether a CCGT participates in Operación Reforzada redispatch at all; within a participating cluster, the owner decides whether you win or lose. Renewable-saturated nodes select; the rest of the market is a footnote.

Profile #3 — Castleton at Amorebieta: 5 months running at 100%
Analysis

Profile #3 — Castleton at Amorebieta: 5 months running at 100%

Third of the post-blackout winners series. Amorebieta (Vizcaya, owned by Castleton Commodities, represented in OMIE by Axpo) operated at saturation — 744 hours/month, the theoretical max — for 5 consecutive months after the blackout. The outlier in the winners club: not 'hibernation → base' like Arrubal, but 'active → 100% all summer → back to normal'. And next door, Bahía de Bizkaia collapses.

Spain is building batteries for a market you can't see
Analysis

Spain is building batteries for a market you can't see

Spain's midday solar glut makes noon the cheapest hour of the day, and batteries are scaling fast to soak it up. But the market where they earn most — secondary-regulation band (aFRR) — stopped being reported per unit on 2024-11-20, exactly as the storage boom began. The only battery revenue still visible per unit is energy arbitrage: profitable, but the minority stream.

A data agent with real identity: end-to-end OAuth On-Behalf-Of over Microsoft Fabric
engineering

A data agent with real identity: end-to-end OAuth On-Behalf-Of over Microsoft Fabric

Almost no "chat with your data" demo answers the key question: whose permissions does the agent query with? How we built a production data agent for a Spanish energy company where every question travels with the user's identity all the way to the lakehouse — one MCP server, three clients (M365 Copilot, Claude, VSCode), and OAuth 2.0 On-Behalf-Of preserving RLS end to end.

From days to minutes: ask your data in plain language
Analysis

From days to minutes: ask your data in plain language

In most companies, answering a business question with data takes days: ticket, analyst, query, Excel. How a Spanish energy company cut it to minutes — any employee asks in their own language, from Teams or Claude, and gets the answer with their own permissions. No new passwords, no bypassing governance.

Profile #2 — TotalEnergies at Castejón: from rare peaker to base load
Analysis

Profile #2 — TotalEnergies at Castejón: from rare peaker to base load

Second of the post-blackout winners series. TotalEnergies' Castejón 3 (Navarra) was a rare peaker — under 1 GWh per month at €600+/MWh emergency prices. Post-blackout it runs 27-43 GWh/month at €250/MWh, in line with Arrubal and Escatrón. Three plants, three owners, same grid signal.

Profile #1 — ContourGlobal at Arrubal: anatomy of a capacity factor switch
Analysis

Profile #1 — ContourGlobal at Arrubal: anatomy of a capacity factor switch

First in a series profiling the winners of Spain's post-blackout redispatch. Arrubal 1+2 (800 MW, La Rioja) operated near hibernation pre-blackout — under 1 GWh/month average. Twelve months on, the same plant runs 24-34 GWh/month at €190/MWh. The plant didn't change. The grid did.

Besós and San Roque: same owners, opposite outcomes
Analysis

Besós and San Roque: same owners, opposite outcomes

Two Spanish CCGT complexes share the same Endesa/Naturgy ownership split — and produce opposite results under Operación Reforzada. In Barcelona, Naturgy's unit wins; in Cádiz, Endesa's dominates. The difference is geography: mixed clusters reward the operator, uniform clusters reward the location.

Operación Reforzada at unit level: which CCGTs win and lose the redispatch
Analysis

Operación Reforzada at unit level: which CCGTs win and lose the redispatch

Drilldown to the plant level: post-blackout pay-as-bid for solving technical constraints does not reward all combined-cycles equally. Within the Besós complex in Barcelona, unit 4 (Naturgy) gains €28M while unit 5 (Endesa) loses €71M — same site, two owners, opposite trajectories. The cluster pattern: south (Cádiz/Huelva) all winners, north interior all winners, Mediterranean coast and SE mixed.

RT3, the hidden cost of integrating renewables in Spain's grid: ×10 since 2020
Analysis

RT3, the hidden cost of integrating renewables in Spain's grid: ×10 since 2020

Spain's technical-constraints cost (compodem RT3) has multiplied tenfold since 2020. Quantitative analysis over 148 months: Pearson correlation +0.76 with the share of variable generation (PV + wind), controlled for OMIE wholesale price. Corroborated by PwC's February 2026 report on the post-blackout Reinforced Operation.

Multi-day battery arbitrage analysis
Tutorials

Multi-day battery arbitrage analysis

Simulate a full year of constrained battery operation to understand profit variability and realistic annual expectations.

Showcase

Excel Automations

Transform your Excel calculations into robust, scalable Python scripts and pipelines with Excel Automations.

DF-ES-12: Spain Energy
Courses

DF-ES-12: Spain Energy

New edition of the course "Applied Python: Data Manipulation and Visualization".

SP-ES-1: Pharmacovigilance
Courses

SP-ES-1: Pharmacovigilance

New edition of the course "Applied Statistical Programming: Academic Projects", in collaboration with the Salamanca Association of Pharmacy Students (ASEF).

Courses

Season packed with immersive live programming courses

This year, I will be collaborating with student associations from universities to organize live courses on the application of Data Analysis, Machine Learning and AI models using Python/R programming.

Market price spread
Reports

Market price spread

Weekly report (July 15 - July 21, 2024) of the market price spread in OMIE markets.

Opinion

ML models in the notebook are worthless

If you've invested valuable time developing your Machine Learning model, why not take advantage of it and put it to work calculating predictions in a web calculator?

Style pivot table to create heat matrix
Tutorials

Style pivot table to create heat matrix

Learn how to highlight the most valuable cells in a Pandas pivot table that summarizes information on billionaires by country and industry.

Subscribe to our newsletter

Get weekly insights on data, automation, and AI.

© 2026 Datons. All rights reserved.