Skip to content

Commit

Permalink
Add temporary parameters to test data portal
Browse files Browse the repository at this point in the history
  • Loading branch information
slowe committed Oct 15, 2024
1 parent f18cdea commit 6cef74a
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 21 deletions.
5 changes: 3 additions & 2 deletions 2024-DFES/data/scenarios/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
{ "key": "domestic-consumption", "title": "Domestic underlying energy consumption (MWh)", "combine": "sum", "units":"MWh", "dp": 0, "description": "Annual energy consumption by residential households excluding electric vehicle and heat pump consumption" },
{ "key": "industrial-consumption", "title": "Industrial and commercial underlying energy consumption (MWh)", "combine": "sum", "units":"MWh", "dp": 0, "description": "Annual energy consumption by industrial and commercial properties excluding electric vehicles and heat pump consumption" },
{ "key": "totalconsumptioncf", "title": "Total energy consumption including electric vehicles and heat pumps (MWh)", "combine": "sum", "units":"MWh", "dp": 0, "description": "Total energy consumption by domestic households and industrial and commercial properties including electric vehicle and heat pump consumption" },
{ "key": "peakdemand", "title": "Peak demand (MW) at Primary Substations", "combine": "max", "units":"MW", "dp": 3, "description": "Peak half hourly demand within the year" },
{ "key": "peakutilisation", "title": "Peak utilisation (%) at Primary Substations", "combine": "max", "units":"%", "dp": 1, "description": "Peak half hourly demand within the year as proportion of primary substation capacity" }
{ "key": "peakdemand", "title": "Peak demand (MW) at Primary Substations", "combine": "max", "units":"MW", "dp": 3, "description": "Peak half hourly demand within the year" },
{ "key": "peakutilisation", "title": "Peak utilisation (%) at Primary Substations", "combine": "max", "units":"%", "dp": 1, "description": "Peak half hourly demand within the year as proportion of primary substation capacity" },
{ "key": "evportal", "title": "Electric Vehicles (DATA DIRECT FROM DATA PORTAL)", "combine": "sum", "units":"", "dp": 0, "description": "Number of registered plug in electric vehicles (pure and hybrid)" }
]
17 changes: 11 additions & 6 deletions 2024-DFES/data/scenarios/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"description": "<ul><li>Does not achieve 80% decarbonisation by 2050.<ul><li>Minimal behaviour change.</li><li>Decarbonisation in power and transport but not heat.</li></ul></li></ul>",
"color": "#454546",
"negativecolor": "#d7191c",
"css": "falling-short",
"css": "counterfactual",
"data": {
"evportal": { "dataBy": "primary", "file": "https://northernpowergrid.opendatasoft.com/api/explore/v2.1/catalog/datasets/northern-powergrid-dfes/exports/csv?refine=voltage_level%3A%22Primary%22&refine=scenario_name%3A%22NG%20FES%20-%20Falling%20Short%22&refine=output_parameter%3A%22Number%20of%20electric%20cars%20and%20vans%20(hybrid%20and%20full%20electric)%22","key": "substation_name" },
"ev": { "dataBy": "primary", "file": "primaries/EV-FS.csv", "key": "Primary" },
"ebus": { "dataBy": "primary", "file": "primaries/Number_electric_buses-FS.csv", "key": "Primary" },
"ehgv": { "dataBy": "primary", "file": "primaries/Number_electric_HGVs-FS.csv", "key": "Primary" },
Expand All @@ -26,8 +27,9 @@
"description": "<ul><li>Achieves 100% decarbonisation by 2050.<ul><li>Hydrogen for heating.</li><li>Consumers less inclined to change behaviour.</li><li>Lower energy efficiency.</li><li>Supply side flexibility</li></ul></li></ul>",
"color": "#0079C1",
"negativecolor": "#d7191c",
"css": "system-transformation",
"css": "hydrogen-evolution",
"data": {
"evportal": { "dataBy": "primary", "file": "https://northernpowergrid.opendatasoft.com/api/explore/v2.1/catalog/datasets/northern-powergrid-dfes/exports/csv?refine=voltage_level%3A%22Primary%22&refine=scenario_name%3A%22NG%20FES%20-%20System%20Transformation%22&refine=output_parameter%3A%22Number%20of%20electric%20cars%20and%20vans%20(hybrid%20and%20full%20electric)%22","key": "substation_name" },
"ev": { "dataBy": "primary", "file": "primaries/EV-ST.csv", "key": "Primary" },
"ebus": { "dataBy": "primary", "file": "primaries/Number_electric_buses-ST.csv", "key": "Primary" },
"ehgv": { "dataBy": "primary", "file": "primaries/Number_electric_HGVs-ST.csv", "key": "Primary" },
Expand All @@ -49,8 +51,9 @@
"description": "<ul><li>Achieves 100% decarbonisation by 2050.<ul><li>Electrified heating.</li><li>Consumers willing to change behaviour.</li><li>High energy efficiency.</li><li>Demand side flexibility.</li></ul></li></ul>",
"color": "#F26522",
"negativecolor": "#5e3c99",
"css": "consumer-transformation",
"css": "electric-engagement",
"data": {
"evportal": { "dataBy": "primary", "file": "https://northernpowergrid.opendatasoft.com/api/explore/v2.1/catalog/datasets/northern-powergrid-dfes/exports/csv?refine=voltage_level%3A%22Primary%22&refine=scenario_name%3A%22NG%20FES%20-%20Consumer%20Transformation%22&refine=output_parameter%3A%22Number%20of%20electric%20cars%20and%20vans%20(hybrid%20and%20full%20electric)%22","key": "substation_name" },
"ev": { "dataBy": "primary", "file": "primaries/EV-CT.csv", "key": "Primary" },
"ebus": { "dataBy": "primary", "file": "primaries/Number_electric_buses-CT.csv", "key": "Primary" },
"ehgv": { "dataBy": "primary", "file": "primaries/Number_electric_HGVs-CT.csv", "key": "Primary" },
Expand All @@ -72,8 +75,9 @@
"description": "<ul><li>Achieves 100% decarbonisation by 2047.<ul><li>Fastest credible decarbonisation</li><li>Significant lifestyle change.</li><li>Mixture of hydrogen and electrification for heating.</li></ul></li></ul>",
"color": "#C2CD23",
"negativecolor": "#d01c8b",
"css": "leading-the-way",
"css": "holistic-transition",
"data": {
"evportal": { "dataBy": "primary", "file": "https://northernpowergrid.opendatasoft.com/api/explore/v2.1/catalog/datasets/northern-powergrid-dfes/exports/csv?refine=voltage_level%3A%22Primary%22&refine=scenario_name%3A%22NG%20FES%20-%20Leading%20The%20Way%22&refine=output_parameter%3A%22Number%20of%20electric%20cars%20and%20vans%20(hybrid%20and%20full%20electric)%22","key": "substation_name" },
"ev": { "dataBy": "primary", "file": "primaries/EV-LTW.csv", "key": "Primary" },
"ebus": { "dataBy": "primary", "file": "primaries/Number_electric_buses-LTW.csv", "key": "Primary" },
"ehgv": { "dataBy": "primary", "file": "primaries/Number_electric_HGVs-LTW.csv", "key": "Primary" },
Expand All @@ -94,9 +98,10 @@
"NPg Reference Scenario": {
"description": "<ul><li>Reaches net zero earlier than Government ascribed 2050 target (by the late 2040s)<ul><li>Highly accelerated electric heat & transport.</li><li>Highly decentralised distributed wind, solar & other renewable generation.</li></ul></li></ul>",
"color": "#ab1236",
"css": "planning-scenario",
"css": "reference-scenario",
"data": {
"ev": { "dataBy": "primary", "file": "https://northernpowergrid.opendatasoft.com/api/explore/v2.1/catalog/datasets/northern-powergrid-dfes/exports/csv?refine=voltage_level%3A%22Primary%22&refine=scenario_name%3A%22NPg%20Best%20View%22&refine=output_parameter%3A%22Number%20of%20electric%20cars%20and%20vans%20(hybrid%20and%20full%20electric)%22", "key": "Primary", "api":"substation_name" },
"evportal": { "dataBy": "primary", "file": "https://northernpowergrid.opendatasoft.com/api/explore/v2.1/catalog/datasets/northern-powergrid-dfes/exports/csv?refine=voltage_level%3A%22Primary%22&refine=scenario_name%3A%22NPg%20Best%20View%22&refine=output_parameter%3A%22Number%20of%20electric%20cars%20and%20vans%20(hybrid%20and%20full%20electric)%22","key": "substation_name" },
"ev": { "dataBy": "primary", "file": "primaries/EV-BV.csv", "key": "Primary" },
"ebus": { "dataBy": "primary", "file": "primaries/Number_electric_buses-BV.csv", "key": "Primary" },
"ehgv": { "dataBy": "primary", "file": "primaries/Number_electric_HGVs-BV.csv", "key": "Primary" },
"peakdemand":{ "dataBy": "primary", "file": "primaries/PeakDemandWithCF-BV.csv", "key": "Primary" },
Expand Down
1 change: 0 additions & 1 deletion 2024-DFES/resources/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ OI.ready(function(){
for(c = 0; c < header.length; c++){
id = header[c];
if(id==data.key){
id = data.api||"substation_name";
v = cols[head[id]].toUpperCase();
}else{
v = cols[head[id]];
Expand Down
11 changes: 9 additions & 2 deletions 2024-DFES/resources/dfes.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/*!
Open Innovations Future Energy Scenario viewer
Changeset:
1.6.0
- Remove stuquery dependency
- There is now a "processData" event so that we can reshape an API return
1.5.8
- Can set different map tiles/labels with on.initMap
1.5.7
Expand Down Expand Up @@ -43,7 +46,7 @@
// Main function
function FES(config){

this.version = "1.5.8";
this.version = "1.6.0";
this.title = "FES";
if(!config) config = {};
this.options = (config.options||{});
Expand Down Expand Up @@ -280,12 +283,16 @@

FES.prototype.setScenarioColours = function(scenario){
var css = this.data.scenarios[scenario].css;
var classes = [];
for(var id in this.data.scenarios) classes.push(this.data.scenarios[id].css);
if(!document.querySelector('#scenario-holder .about')) appendHTML(document.getElementById('scenario-holder'),'<div class="about"></div>');
var el = document.querySelector('#scenario-holder .about');
el.innerHTML = (this.data.scenarios[scenario].description||'');
el.classList.remove(...classes);
el.classList.add(css);
el.innerHTML = (this.data.scenarios[scenario].description||'');
el = document.querySelector('#parameter-holder .about');
el.innerHTML = (this.parameters[this.options.parameter] ? (this.parameters[this.options.parameter].description||'') : '');
el.classList.remove(...classes);
el.classList.add(css);

for(var s in this.data.scenarios){
Expand Down
20 changes: 10 additions & 10 deletions 2024-DFES/resources/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@


/* Main site styling */
.falling-short { background-color: #827B7A!important; color: white!important; }
.falling-short-text { color: #827B7A!important; }
.system-transformation { background-color: #5BCBF5!important; color: black!important; }
.system-transformation-text { color: #5BCBF5!important; }
.consumer-transformation { background-color: #FFBF22!important; color: black!important; }
.consumer-transformation-text { color: #FFBF22!important; }
.leading-the-way { background-color: #C2CD23!important; color: black!important; }
.leading-the-way-text { color: #C2CD23!important; }
.counterfactual { background-color: #827B7A!important; color: white!important; }
.counterfactual-text { color: #827B7A!important; }
.hydrogen-evolution { background-color: #5BCBF5!important; color: black!important; }
.hydrogen-evolution-text { color: #5BCBF5!important; }
.electric-engagement { background-color: #FFBF22!important; color: black!important; }
.electric-engagement-text { color: #FFBF22!important; }
.holistic-transition { background-color: #C2CD23!important; color: black!important; }
.holistic-transition-text { color: #C2CD23!important; }
.early-net-zero { background-color: #00AB84!important; color: white!important; }
.early-net-zero-text { color: #00AB84!important; }
.planning-scenario { background-color: #ab1236!important; color: white!important; }
.planning-scenario-text { color: #ab1236!important; }
.reference-scenario { background-color: #ab1236!important; color: white!important; }
.reference-scenario-text { color: #ab1236!important; }


.message { text-align: center; }
Expand Down

0 comments on commit 6cef74a

Please sign in to comment.