@binocularity May 2023/June2023/September2023​
​​
​In October 2024 NGESO changed to NESO we updated the data feeds.​
​​
​The fuel data used here has been cleaned and visualized and originally comes from NGESO:​
​​
​https://data.nationalgrideso.com/carbon-intensity1/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"];​​​​(*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
Out[]=
Rank in YTD / 16
Sat 10 Jan 2026
Sun 11 Jan 2026
Mon 12 Jan 2026
Tue 13 Jan 2026
Wed 14 Jan 2026
Thu 15 Jan 2026
Fri 16 Jan 2026
GAS
6
11
12
8
5
9
4
COAL
unused
unused
unused
unused
unused
unused
unused
NUCLEAR
8
7
11
10
9
5
6
WIND
12
4
5
10
11
8
15
HYDRO
14
9
3
1
6
5
8
IMPORTS
3
12
14
5
10
2
6
BIOMASS
11
14
13
7
8
15
10
OTHER
9
15
14
10
5
12
4
SOLAR
4
16
11
14
8
13
6
STORAGE
11
16
9
4
7
10
14
In[]:=
​​formattedPcDS=Dataset[fuelPcDSout,HeaderStyle->{"Bold","Code"},ItemStyle->{"SubItem"},Alignment->Right,ItemDisplayFunction->(NumberForm[#,{3,1}]&)]
Out[]=
Percentage daily
Sat 10 Jan 2026
Sun 11 Jan 2026
Mon 12 Jan 2026
Tue 13 Jan 2026
Wed 14 Jan 2026
Thu 15 Jan 2026
Fri 16 Jan 2026
GAS
36.6
27.8
27.5
34.2
37.7
31.3
40.7
COAL
0.0
0.0
0.0
0.0
0.0
0.0
0.0
NUCLEAR
10.2
10.3
9.8
10.1
10.2
10.6
10.5
WIND
27.6
49.1
47.9
31.3
30.6
34.5
23.6
HYDRO
0.9
1.1
1.5
1.7
1.4
1.4
1.3
IMPORTS
14.8
6.5
6.2
14.1
9.7
16.7
13.8
BIOMASS
5.7
3.7
4.9
6.3
6.3
3.6
6.2
OTHER
1.3
1.0
1.1
1.3
1.6
1.1
1.7
SOLAR
2.7
0.3
0.9
0.5
2.0
0.5
2.1
STORAGE
0.3
0.0
0.3
0.6
0.5
0.3
0.2