@binocularity May 2023/June2023/September2023/February2026​
​​
​In October 2024 NGESO changed to NESOso the links to data feeds were updated.​
​​
​The fuel data used here has been cleaned and visualized and originally comes from NESO:​
​​
​Updated Feb 2026​
​​
​https://www.neso.energy/data-portal/historic-generation-mix​
​​
​Find the cleaned data at the embedded URL links below to download your own copy.
In[]:=
(*Setupfoldersandintialisationcode*)​​folder=NotebookDirectory[];​​SetDirectory[folder];​​​​​​​​​​(*Pre-cleaneddata*)​​dayInYTD=CloudGet["https://www.wolframcloud.com/obj/binocularity/Published/dayInYTD"];​​dataD=CloudGet["https://www.wolframcloud.com/obj/binocularity/Published/dataD"];​​fuelColoursOrdered=CloudGet["https://www.wolframcloud.com/obj/binocularity/Published/fuelColoursOrdered"];​​datesLBlanks=CloudGet["https://www.wolframcloud.com/obj/binocularity/Published/datesLBlanks"];​​stringDate=CloudGet["https://www.wolframcloud.com/obj/binocularity/Published/stringDate"];​​fuelDSout=CloudGet["https://www.wolframcloud.com/obj/binocularity/Published/fuelDSout"];​​fuelPcDSout=CloudGet["https://www.wolframcloud.com/obj/binocularity/Published/fuelPcDSout"];​​​​​​​​weekTotalbyFuelGWh=CloudGet["https://www.wolframcloud.com/obj/binocularity/Published/weekTotalbyFuelGWh"];​​weekTotalbyFuelPcnt=CloudGet["https://www.wolframcloud.com/obj/binocularity/Published/weekTotalbyFuelPcnt"];​​histWeekTotalbyFuelGWh=CloudGet["https://www.wolframcloud.com/obj/binocularity/Published/histWeekTotalbyFuelGWh"];​​histWeekTotalbyFuelPcnt=CloudGet["https://www.wolframcloud.com/obj/binocularity/Published/histWeekTotalbyFuelPcnt"];​​​​(*FuelcolourschosentomatchNGESOpublications*)​​fuelColours=Association[{​​"GAS"RGBColor[Evaluate[{247,99,43}/255]],​​"COAL"RGBColor[Evaluate[{1,1,1}/255]],​​"NUCLEAR"RGBColor[Evaluate[{108,44,145}/255]],​​"WIND"RGBColor[Evaluate[{92,200,246}/255]],​​"HYDRO"RGBColor[Evaluate[{0,121,192}/255]],​​"IMPORTS"RGBColor[Evaluate[{194,0,119}/255]],​​"BIOMASS"RGBColor[Evaluate[{194,204,44}/255]],​​"OTHER"RGBColor[Evaluate[{255,205,243}/255]],​​"SOLAR"RGBColor[Evaluate[{253,231,1}/255]],​​"STORAGE"RGBColor[Evaluate[{255,255,255}/255]]​​}];​​styleColours=fuelColours[[#]]&/@Keys[fuelColoursOrdered];​​swatch=Reverse[fuelColoursOrdered];​​legend=SwatchLegend[Values[swatch],Keys[swatch]];​​​​dataReorder=dataD[All,Keys[fuelColoursOrdered]];​​​​Print[" Cleaned data dowloaded from the Cloud"]​​
Cleaned data dowloaded from the Cloud
In[]:=
chartTitle=StringJoin[{"Electricity supply by fuel type, week ending: ",stringDate,", UK (E,W,S)."}];​​glBool=2;​​glOptions={None,{0,48,96,144,192,240,288,336}};​​id=glOptions[[2]]+1;​​id=id[[;;-2]];​​yTicks={20,40,50,60,80,100};​​newDates=datesLBlanks[[id]];​​newDates=Rotate[#,Pi/4]&/@newDates;​​xTicks=Partition[Riffle[id,newDates],2];​​interactive=​​Overlay[{​​Show[​​BarChart[dataReorder,BarSpacingAutomatic,ChartLayout"Stacked",​​ChartStyle{EdgeForm[],styleColours},​​AxesFalse,​​Method{"GridLinesInFront"True},​​GridLinesStyleDirective[Black,Medium,Thick,Dashing[Small]],​​GridLines{glOptions[[glBool]],None},​​ImageSize{Automatic,560},ImagePadding{{50,90},{60,60}},BackgroundRGBColor[{0.5,0.5,0.5}],​​Epilog{{},​​Text[Style[chartTitle,18,Bold,White],{155,110}]}],​​FrameStyleDirective[White,12],​​Frame{{True,None},{True,None}},​​FrameTicks{{yTicks,None},{xTicks,None}}],​​legend},Alignment{Right,Center}]
Out[]=
SOLAR
HYDRO
BIOMASS
STORAGE
WIND
COAL
GAS
IMPORTS
OTHER
NUCLEAR
In[]:=
formattedDS=Dataset[fuelDSout,Background(If[#≤10,LightGreen,If[#≥(dayInYTD-10),LightRed,White]]&),AlignmentRight,HeaderStyle{"Bold","Code"},ItemStyle{"SubItem"}]
Out[]=
Rank in YTD / 58
Sat 21 Feb 2026
Sun 22 Feb 2026
Mon 23 Feb 2026
Tue 24 Feb 2026
Wed 25 Feb 2026
Thu 26 Feb 2026
Fri 27 Feb 2026
NUCLEAR
5
7
20
27
18
14
10
OTHER
16
12
20
19
8
32
36
IMPORTS
6
15
17
38
22
9
3
GAS
55
58
47
26
36
57
32
COAL
unused
unused
unused
unused
unused
unused
unused
WIND
12
2
16
30
27
4
49
STORAGE
1
8
6
20
7
35
3
BIOMASS
57
58
54
51
52
48
34
HYDRO
25
48
12
17
8
19
1
SOLAR
18
4
12
3
2
27
19
In[]:=
​​formattedPcDS=Dataset[fuelPcDSout,HeaderStyle->{"Bold","Code"},ItemStyle->{"SubItem"},Alignment->Right,ItemDisplayFunction->(NumberForm[#,{3,1}]&)]
Out[]=
Percentage daily
Sat 21 Feb 2026
Sun 22 Feb 2026
Mon 23 Feb 2026
Tue 24 Feb 2026
Wed 25 Feb 2026
Thu 26 Feb 2026
Fri 27 Feb 2026
NUCLEAR
11.6
11.4
10.6
10.2
10.8
10.9
11.3
OTHER
1.7
1.8
1.6
1.7
2.0
1.4
1.4
IMPORTS
17.6
13.3
13.0
9.8
12.3
15.2
18.8
GAS
11.6
8.9
19.5
31.9
27.0
9.6
29.7
COAL
0
0
0
0
0
0
0
WIND
49.0
55.2
46.6
35.8
36.7
54.4
26.2
STORAGE
1.5
0.7
0.8
0.5
0.8
0.3
1.2
BIOMASS
3.2
3.1
3.5
4.1
3.8
5.3
6.9
HYDRO
1.2
0.7
1.4
1.3
1.5
1.3
2.0
SOLAR
2.5
4.7
2.9
4.8
5.1
1.6
2.5