UK Electricity Generation Mix

Guy Lipman
4 min readApr 30, 2019

Analysis of UK electricity generation mix

I’ve recently been thinking and talking to a few people about the UK’s generation mix, and what the important statistics to look at are. In particular, I’ve signed up to receive tweets every four hours from MyGrid GB, which I have found fascinating, not least because we’ve recently experienced the weekend with the longest pause in coal generation (90 hours), follow by what I think might be the weekend with the highest wind and lowest gas generation.

There are a lot of websites and apps that can display live or historical data. I’ve used all of the following at times:

However, all up, that leads to a lot of numbers, and it is sometimes hard to make sense of which I should really be caring about. Clearly these numbers are incredibly important in aggregate, as they are a major determinant of our carbon emissions, but which are most important.

Firstly, I’ve come to the conclusion that there are three things that matter:

  • getting wind generation as high as possible, because this tells me we are developing valuable capacity
  • getting solar generation as high as possible, again because this tells me we are developing valuable capacity
  • getting fossil fuel generation as low as possible

I’m not saying that other things don’t matter, for example nuclear, hydro-power or interconnectors. But I believe they matter primarily as a means to getting wind and solar generation higher and fossil fuel lower.

Secondly, I care about the absolute amount of this generation, not the percentage they are of the total generation at a particular time. 10GW of wind is impressive, whatever percentage of demand that is (especially as we get more and more storage capacity).

Thirdly, for the purposes of fossil fuel generation, I’ve decided to include coal, gas, oil (though there’s virtually none any more) and biomass. I’m sure including biomass in with coal will prove controversial, and I would certainly rather we were burning biomass than coal or even gas. But I still much rather see us not burning it.

Data Analysis

I downloaded data from January 2017 onwards from GridWatch, which produces a csv file.

I used python to load that data:

import pandas as pd
d = pd.read_csv('Downloads/gridwatch.csv')
d.drop(columns=['id'], inplace=True)
#remove the space before each column name
d.rename(columns={x: x[1:] for x in d.columns}, inplace=True)
#clean for two spurious entries:

The data was in 5 minutely snapshots, and I was interested in monthly data. However, I was also interested in the split between daytime (when we can expect solar power) and nighttime. For that, I decided to use a simple metric of whether there was any solar generation.

d['month'] = d['timestamp'].str[:8]
d['daylight'] = (d['solar']>1)
df = d.groupby(['month','daylight']).mean()
df['fuel'] = (df['ccgt'] + df['ocgt'] + df['biomass'] +
df['oil'] + df['other'])

Finally, I generated two tables, the first showing the average levels of wind, solar, and fossil fuel for each month. The second was so I could see how much of the fossil fuel came from each source (ocgt, oil and other proved to be negligible).

df1 = df[['wind','solar','fuel']].round(-2)/1000
df1 = df1.stack().unstack([1,2])
df2 = df[['coal','ccgt','biomass']].round(-2)/1000
df2 = df2.stack().unstack([1,2])

Finally I exported the data to Excel for plotting.


Firstly I plotted each of the key components of fossil fuel use, firstly for nighttime and then for daytime:


Interestingly, I found the biomass usage had been almost constant over the 2 years. Coal use is reducing (and is non-existent in summer). Any trend that there might be in gas seems to be masked by the seasonal pattern. I can also figure I can mostly concentrate on the ccgt numbers (I very much hope coal won’t rise to more material levels in future).

I next plotted the average total levels of fossil fuel generation, for both day and night. Daytime use is higher than nighttime use, and winter usage is higher than summer usage. I would have liked to see a bit more of a downward trend to this.

Finally, I plotted the average wind and solar production. Not surprisingly, there is a seasonal component (higher solar in summer, higher wind in winter) and also a general upwards trend. It turned out that wind levels have on average been almost identical between daytime and nighttime.

This all gives me a decent way of looking at the wind, solar and fossil fuel generation on an ongoing basis, and deciding whether it is a step in the right or wrong direction.



Guy Lipman

Fascinated by what makes societies and markets work, especially in sustainable energy. Views not necessarily reflect those of my employer.