GLOBALGRID2050 / EXPLORE CODE

Part of: Explore Code / Electricity markets and data pipelines / globalgrid2050 / uk_renewables_pipeline

Dashboard V6 Live and 5 more files

A web page in the UK renewables pipeline folder of GlobalGrid2050 that draws major projects and major project news, using SHA-256. Published at https://globalgrid2050.com/uk_renewables_pipeline/dashboard_v6_live.html.

680 lines of HTML and JavaScript from globalgrid2050, in 6 files. Topic: Electricity markets and data pipelines. Section 962 of 2044.

Cut 2026-12-06T03:07:51+00:00. A copy for reading; the repository at the stated commit is the source.

In the State lines below, domain stage, users and canonical status are rule-based first approximations from code and path evidence (rules explore-agent-rules-v1), not observed facts: the rules.

In this section

  1. Dashboard V6 Live render · globalgrid2050 / uk_renewables_pipeline/dashboard_v6_live.html lines 1–237
  2. UK Renewables Pipeline — Datacentres Page render · globalgrid2050 / uk_renewables_pipeline/datacentres/index.html lines 1–140
  3. UK Renewables Pipeline — V7 Page render · globalgrid2050 / uk_renewables_pipeline/v7/index.html lines 1–125
  4. UK Renewables Pipeline — V7 other · globalgrid2050 / uk_renewables_pipeline/v7/scripts/app.js lines 1–28
  5. State other · globalgrid2050 / uk_renewables_pipeline/v7/scripts/core/state.js lines 1–25
  6. Canonical Project Export transform · globalgrid2050 / uk_renewables_pipeline/v7/scripts/plugins/canonical-project-export.js lines 1–125

Dashboard V6 Live

A web page in the UK renewables pipeline folder of GlobalGrid2050 that draws major projects and major project news, using SHA-256. Published at https://globalgrid2050.com/uk_renewables_pipeline/dashboard_v6_live.html.

renderglobalgrid2050 / uk_renewables_pipeline/dashboard_v6_live.html · lines 1–237 of 237 · Entry point · pattern drawTable (shared by 3 files)

What it does
It draws major projects, major project news, the REPD register and solar. Defines 27 functions or classes, including $, esc, norm, clean, hex64. Side effects: changes the web page (DOM); makes network requests.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'renewables'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. Domain terms in the code: the REPD register, solar.
Inputs & outputs
In: JSON file major_projects_v6.json; JSON file major_project_news_v6.json; form fields (user input). Out: CSV file globalgrid2050_uk_renewables_v6_q2_2026.csv; downloaded file globalgrid2050_uk_renewables_v6_q2_2026.csv; web page.
Downstream impact
Used directly by 72 files: GlobalGrid2050 — PipelineNews Intelligence Page (globalgrid2050, https://globalgrid2050.com/pipelinenews_intelligence/202609050309/); Testcode — Pipeline Page (globalgrid2050, https://globalgrid2050.com/testcode/202609060345/pipeline/); UK Renewables Pipeline — V7 Page (globalgrid2050, https://globalgrid2050.com/uk_renewables_pipeline/v7/); UK Renewables Pipeline — V8 Page (globalgrid2050, https://globalgrid2050.com/uk_renewables_pipeline/v8/); and 68 more. Reached from 117 other entry points, including GlobalGrid2050 Historical Builds (globalgrid2050, https://globalgrid2050.com/historical_builds.html); GlobalGrid2050 Homepage Before Four Nests (globalgrid2050, https://globalgrid2050.com/homepage-before-four-nests-20260925.html); Grid Engine — Compute Against Charging Page (globalgrid2050, https://globalgrid2050.com/grid_engine/202609060324-compute-against-charging/). It is itself an entry point, published at https://globalgrid2050.com/uk_renewables_pipeline/dashboard_v6_live.html.
What it achieves
It validates project snapshot (`validateProjectSnapshot`), draws table (`drawTable`) and validates news snapshot (`validateNewsSnapshot`). UK Solar + Storage Daily V6. Its code works with 1 MW and 100 MW.
Why it matters
Loaded by the PipelineNews Intelligence page at https://globalgrid2050.com/pipelinenews_intelligence/202609050309/ and 69 other pages. Also imported by Compile V8 Fast and Compile Index, from PipelineNews.
Application
globalgrid2050 · uk_renewables_pipeline · page
Uses
Dashboard V5 Live (link), Dashboard V4 Live (link), Dashboard V2 2026 08 22 (link), Dashboard (link), GlobalGrid2050 — Renewable Energy Planning Database (REPD) Grid Atlas v8 Page (link), https://cdn.jsdelivr.net/npm/chart.js
Used by
linked from GlobalGrid2050 — PipelineNews Intelligence Page (link), linked from Testcode — Pipeline Page (link), linked from UK Renewables Pipeline — V7 Page (link), linked from UK Renewables Pipeline — V8 Page (link), linked from UK Renewables Pipeline — V9 4 Page (link), linked from UK Renewables Pipeline — V9 5 1 Page (link), linked from UK Renewables Pipeline — V9 5 Page (link), linked from UK Renewables Pipeline — V9 6 1 Page (link), and 64 more
Produces
$, esc, norm, clean, hex64, validDate, assert, sameOriginURL, canonicalJSON, sha256, projectView, validateProjectSnapshot
Defines here
$, esc, norm, clean, hex64, validDate, assert, sameOriginURL, canonicalJSON, sha256, projectView, validateProjectSnapshot, setupCharts, signal, apply, drawTable, fillFilters, isForeign, validPublicURL, validateNewsSnapshot, nmatch, drawNews, loadNews, formatTimestamp, loadProjects, fail, exportCSV
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 uk_renewables_pipeline/dashboard_v6_live.html:1-237 · blob c2ada7161cc412f8aca7adff538994d2e0bcda21 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: output · effects: dom, network · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>GlobalGrid2050 | UK Solar + Storage Daily V6</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
:root{--bg:#000;--panel:#0b0e14;--line:#2f343d;--text:#fff;--muted:#a6adbb;--accent:#00ffff;--ok:#00ff88;--solar:#ffff00;--bess:#ffae00;--bad:#ff6666}*{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--text);font-family:"Courier New",monospace}body{display:flex;height:100vh;overflow:hidden;font-size:13px}.sidebar{width:250px;flex:none;background:#090909;border-right:1px sol  … [line shortened here: 5,376 characters; full line on GitHub]
</style>
</head>
<body>
<aside class="sidebar"><div class="brand"><b>GLOBALGRID2050</b><small>UK SOLAR + STORAGE DAILY · V6</small></div><nav class="nav"><a class="active" href="#">V6 LIVE</a><a href="dashboard_v5_live.html">V5</a><a href="dashboard_v4_live.html">V4</a><a href="dashboard_v3_live_2026-08-22.html">V3</a><a href="dashboard_v2_2026-08-22.html">V2</a><a href="dashboard.html">V1</a><a href="../index.html">DIRE  … [line shortened here: 506 characters; full line on GitHub]
<main class="main">
<div class="header"><h1>UK RENEWABLES PIPELINE V6</h1><div class="status" id="statusBox">● VALIDATING SAME-ORIGIN Q2 SNAPSHOT</div></div>
<div class="meta"><strong>V6 · 22 AUGUST 2026</strong><span>Solar &gt;1 MW · BESS &gt;100 MW</span><span>GlobalGrid project + development identity</span><span id="repdMeta">DESNZ REPD Q2 2026 · validating snapshot…</span><a href="https://www.gov.uk/government/publications/renewable-energy-planning-database-quarterly-extract" target="_blank" rel="noopener">Official REPD portal</a></div>
<div class="mobile-actions" aria-label="Version navigation and export"><a href="dashboard_v5_live.html">V5</a><a href="dashboard_v4_live.html">V4</a><a href="dashboard_v3_live_2026-08-22.html">V3</a><a href="dashboard_v2_2026-08-22.html">V2</a><a href="dashboard.html">V1</a><a href="../index.html">DIRECTORY</a><a href="#" id="exportMobile">EXPORT CSV</a></div>
<div class="notice"><b>DATA DISCIPLINE:</b> REPD fields below come from the official Q2 2026 publication and are never overwritten by news. NEWS SIGNAL is external intelligence only. A missing official date remains “not supplied”; V6 never invents one. Private commercial material is not part of this public application.</div>
<section class="newspaper"><div class="masthead"><h2>GLOBALGRID2050 <span>ENERGY DAILY</span></h2><div class="strap"><span>REPD-bound UK solar + storage intelligence</span><span id="newsMeta">waiting for validated project universe…</span></div></div><div class="tools" id="newsTools"><button class="active" data-mode="ALL">ALL</button><button data-mode="SOLAR">SOLAR</button><button data-mode="BESS">  … [line shortened here: 849 characters; full line on GitHub]
<h2 class="section">REPD Q2 2026 PIPELINE ANALYTICS</h2>
<div class="gauges"><div class="card"><h3>FILTERED CAPACITY (MW)</h3><div class="chart"><canvas id="g1"></canvas><div class="value" id="v1">0</div></div></div><div class="card"><h3>FILTERED PROJECTS</h3><div class="chart"><canvas id="g2"></canvas><div class="value" id="v2">0</div></div></div><div class="card"><h3>LARGEST PROJECT (MW)</h3><div class="chart"><canvas id="g3"></canvas><div class="valu  … [line shortened here: 436 characters; full line on GitHub]
<div class="filters" id="tech"><button class="btn active" data-tech="ALL">ALL</button><button class="btn" data-tech="SOLAR">SOLAR &gt;1 MW</button><button class="btn" data-tech="BESS">BESS &gt;100 MW</button></div>
<div class="filters"><select id="state"><option value="ALL">ALL REPD STATUS</option></select><select id="county"><option value="ALL">ALL COUNTIES / REGIONS</option></select><input id="assetSearch" class="asset-search" placeholder="SEARCH SITE / REPD REF / GG PROJECT OR DEVELOPMENT ID / PLANNING REF / AUTHORITY"></div>
<div class="tablewrap"><table><thead><tr><th>SITE</th><th>GLOBALGRID PROJECT ID</th><th>GLOBALGRID DEVELOPMENT ID</th><th>REPD REF</th><th>REPD UPDATED</th><th>TECH</th><th>REPD STATUS</th><th>MW</th><th>COUNTY / REGION</th><th>PLANNING AUTHORITY</th><th>PLANNING REF</th><th>NEWS SIGNAL</th></tr></thead><tbody id="tbody"><tr><td colspan="12">Loading validated Q2 snapshot…</td></tr></tbody></table>  … [line shortened here: 406 characters; full line on GitHub]
</main>
<script>
const PROJECT_SNAPSHOT='../dist/major_projects_v6.json';
const NEWS_SNAPSHOT='../dist/major_project_news_v6.json';
const OFFICIAL_PAGE='https://www.gov.uk/government/publications/renewable-energy-planning-database-quarterly-extract';
const EXPECTED={sourceRows:14657,sourceRefs:14657,projects:3714,solar:3445,bess:269,solarThreshold:1,bessThreshold:100,publicationDate:'2026-08-03',csvSha256:'84c1b5f958a934d8b4b86ec88f50bdcf43830ded7ff2efc27bffca0c98695035',xlsxSha256:'624a0a9712c58a7a93716e51f2bf054eec8b1af7170f6f9516cc10cd248e2657'};
const FOREIGN=['new jersey','california','texas','australia','new south wales','queensland','victoria australia','canada','alberta','ontario canada','germany','italy','spain','india','china','south africa','new zealand','republic of ireland','irish republic','ireland','united states','u s roundup','new york','arizona','nevada','florida','ohio','virginia','massachusetts','pennsylvania','colorado'];
let projects=[],filtered=[],news=[],techMode='ALL',newsMode='ALL',assetQ='',newsQ='',charts=[];
const $=id=>document.getElementById(id);
const esc=v=>String(v??'').replace(/[&<>"']/g,c=>({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'}[c]));
const norm=v=>String(v??'').toLowerCase().replace(/&/g,' and ').replace(/[^a-z0-9]+/g,' ').replace(/\s+/g,' ').trim();
const clean=v=>String(v??'').trim();
const hex64=v=>/^[a-f0-9]{64}$/i.test(clean(v));
const validDate=v=>{const s=clean(v);if(!/^\d{4}-\d{2}-\d{2}$/.test(s))return false;const d=new Date(s+'T00:00:00Z');return!Number.isNaN(d.getTime())&&d.toISOString().slice(0,10)===s};
function assert(ok,message){if(!ok)throw new Error(message)}
function sameOriginURL(path){const u=new URL(path,window.location.href);assert(u.origin===window.location.origin,'V6 data URL is not same-origin');return u}
function canonicalJSON(value,key=''){
  if(value===null)return'null';
  if(Array.isArray(value))return'['+value.map(v=>canonicalJSON(v)).join(',')+']';
  if(typeof value==='object')return'{'+Object.keys(value).sort().map(k=>JSON.stringify(k)+':'+canonicalJSON(value[k],k)).join(',')+'}';
  if(typeof value==='number'){
    assert(Number.isFinite(value),'Snapshot contains a non-finite number');
    // The backend hashes Python floats; preserve the canonical trailing .0 for capacity integers.
    if(key==='capacity_mw'&&Number.isInteger(value))return value.toFixed(1);
  }
  return JSON.stringify(value);
}
async function sha256(text){
  assert(window.crypto&&window.crypto.subtle,'Secure SHA-256 validation is unavailable');
  const digest=await window.crypto.subtle.digest('SHA-256',new TextEncoder().encode(text));
  return [...new Uint8Array(digest)].map(v=>v.toString(16).padStart(2,'0')).join('');
}
function projectView(row,index){
  const ref=clean(row.repd_ref),gg=clean(row.gg_project_id),dev=clean(row.gg_development_id);
  assert(/^\d+$/.test(ref),`Project ${index+1} has an invalid REPD Ref`);
  assert(gg===`GG2050-REPD-${ref}`,`REPD ${ref} has an invalid GlobalGrid Project ID`);
  assert(dev===`GG2050-DEV-REPD-${ref}`||/^GG2050-DEV-[A-F0-9]{12,32}$/.test(dev),`REPD ${ref} has an invalid GlobalGrid Development ID`);
  assert(row.identity_status==='REPD_BOUND',`REPD ${ref} is not REPD_BOUND`);
  const technology=clean(row.technology).toLowerCase(),mw=Number(row.capacity_mw);
  assert(technology==='solar'||technology==='bess',`REPD ${ref} has an invalid technology`);
  assert(row.capacity_known===true&&Number.isFinite(mw),`REPD ${ref} has unknown official capacity`);
  assert(technology==='solar'?mw>EXPECTED.solarThreshold:mw>EXPECTED.bessThreshold,`REPD ${ref} fails its exclusive threshold`);
  assert(clean(row.name)&&clean(row.status),`REPD ${ref} is missing a required official field`);
  const updated=row.repd_record_updated==null?'':clean(row.repd_record_updated);
  assert(!updated||validDate(updated),`REPD ${ref} has an invalid record-update date`);
  const county=clean(row.county),region=clean(row.region),country=clean(row.country);
  return{ref,gg,dev,name:clean(row.name),tech:technology.toUpperCase(),mw,updated,status:clean(row.status),county,region,country,location:[county,region].filter((v,i,a)=>v&&a.indexOf(v)===i).join(' / '),authority:clean(row.planning_authority),planning:clean(row.planning_application_reference),operator:clean(row.operator),lifecycle:clean(row.lifecycle)};
}
async function validateProjectSnapshot(payload){
  assert(payload&&typeof payload==='object'&&!Array.isArray(payload),'Project snapshot is not an object');
  assert(payload.schema==='globalgrid2050.major-projects.v6'&&payload.version===6,'Unexpected V6 project schema/version');
  assert(payload.repd_bound===true&&payload.globalgrid_id_required===true,'Canonical REPD/GlobalGrid identity policy is missing');
  assert(payload.identity_schema==='globalgrid2050.project-identity.v6','Canonical identity-registry metadata is missing');
  assert(clean(payload.source_owner).includes('DESNZ'),'DESNZ source ownership metadata is missing');
  assert(clean(payload.source_dataset_title).includes('Q2 2026'),'Q2 2026 edition metadata is missing');
  assert(payload.source_page===OFFICIAL_PAGE,'Official publication-page provenance mismatch');
  assert(payload.source_publication_date===EXPECTED.publicationDate,'Official publication date mismatch');
  assert(!Number.isNaN(Date.parse(payload.validated_at)),'Snapshot validation timestamp is invalid');
  assert(payload.source_record_count===EXPECTED.sourceRows&&payload.source_unique_ref_count===EXPECTED.sourceRefs,'Official source count/Ref-ID gate failed');
  assert(payload.csv_xlsx_reconciled===true,'CSV/XLSX reconciliation gate failed');
  assert(payload.source_hashes&&hex64(payload.source_hashes.csv_sha256)&&hex64(payload.source_hashes.xlsx_sha256),'Official source hashes are missing or malformed');
  assert(payload.source_hashes.csv_sha256.toLowerCase()===EXPECTED.csvSha256&&payload.source_hashes.xlsx_sha256.toLowerCase()===EXPECTED.xlsxSha256,'Official Q2 CSV/XLSX source hashes do not match the validated publication');
  assert(norm(payload.canonical_capacity_source).includes('xlsx')&&norm(payload.canonical_capacity_source).includes('csv'),'Reconciled capacity provenance metadata is missing');
  assert(payload.thresholds&&Number(payload.thresholds.solar_mw_exclusive)===EXPECTED.solarThreshold&&Number(payload.thresholds.bess_mw_exclusive)===EXPECTED.bessThreshold,'Exclusive threshold metadata mismatch');
  assert(payload.project_count===EXPECTED.projects&&payload.count===EXPECTED.projects&&payload.solar_count===EXPECTED.solar&&payload.bess_count===EXPECTED.bess,'Declared V6 project counts mismatch');
  assert(Array.isArray(payload.projects)&&payload.projects.length===EXPECTED.projects,'V6 project array count mismatch');
  assert(Number(payload.record_update_supplied_count)+Number(payload.record_update_missing_count)===EXPECTED.projects,'REPD update-date coverage metadata mismatch');
  assert(hex64(payload.projects_sha256),'Project-universe SHA-256 is missing or malformed');
  const calculatedHash=await sha256(canonicalJSON(payload.projects));
  assert(calculatedHash===payload.projects_sha256.toLowerCase(),'Project-universe SHA-256 validation failed');
  const seenRefs=new Set(),seenGG=new Set(),mapped=[];
  payload.projects.forEach((row,index)=>{
    const p=projectView(row,index);
    assert(!seenRefs.has(p.ref)&&!seenGG.has(p.gg),`Duplicate canonical project identity at REPD ${p.ref}`);
    seenRefs.add(p.ref);seenGG.add(p.gg);mapped.push(p);
  });
  const solar=mapped.filter(p=>p.tech==='SOLAR').length,bess=mapped.filter(p=>p.tech==='BESS').length;
  assert(solar===EXPECTED.solar&&bess===EXPECTED.bess,'Calculated V6 threshold counts mismatch');
  const supplied=mapped.filter(p=>p.updated).length;
  assert(supplied===payload.record_update_supplied_count&&mapped.length-supplied===payload.record_update_missing_count,'Calculated REPD update-date coverage mismatch');
  mapped.sort((a,b)=>b.mw-a.mw||a.name.localeCompare(b.name));
  return mapped;
}
function setupCharts(){
  if(typeof Chart==='undefined')return;
  const o={responsive:true,maintainAspectRatio:false,circumference:180,rotation:270,cutout:'80%',plugins:{legend:{display:false},tooltip:{enabled:false}}};
  charts=[new Chart($('g1'),{type:'doughnut',data:{datasets:[{data:[0,1],backgroundColor:['#ff00ff','#222'],borderWidth:0}]},options:o}),new Chart($('g2'),{type:'doughnut',data:{datasets:[{data:[0,1],backgroundColor:['#00ffff','#222'],borderWidth:0}]},options:o}),new Chart($('g3'),{type:'doughnut',data:{datasets:[{data:[0,1],backgroundColor:['#00ff88','#222'],borderWidth:0}]},options:o})];
}
function signal(ref){
  const i=news.find(x=>x.repd_ref===ref);
  if(!i)return{l:'—',c:'',n:'no primary matched headline'};
  const e=clean(i.event||'PROJECT UPDATE').toUpperCase();
  if(e==='CONSENT')return{l:'APPROVED*',c:'approved',n:i.published};
  if(e==='CONSTRUCTION')return{l:'CONSTRUCTION*',c:'construction',n:i.published};
  if(e==='OPERATIONAL')return{l:'OPERATIONAL*',c:'operational',n:i.published};
  if(e==='FINANCIAL CLOSE')return{l:'FINANCED*',c:'finance',n:i.published};
  if(e==='ACQUISITION')return{l:'ACQUIRED*',c:'finance',n:i.published};
  if(e==='GRID CONNECTION')return{l:'GRID CONNECTED*',c:'operational',n:i.published};
  if(e==='REFUSAL')return{l:'REFUSED*',c:'',n:i.published};
  if(e==='DELAY')return{l:'DELAYED*',c:'',n:i.published};
  if(e==='DELAY / REFUSAL')return{l:norm(i.headline).includes('refus')?'REFUSED*':'DELAYED*',c:'',n:i.published};
  return{l:'PROJECT UPDATE*',c:'',n:i.published};
}
function apply(){
  const state=$('state').value,geography=$('county').value,q=assetQ;
  filtered=projects.filter(p=>(techMode==='ALL'||p.tech===techMode)&&(state==='ALL'||p.status===state)&&(geography==='ALL'||p.county===geography||p.region===geography)&&(!q||[p.name,p.ref,p.gg,p.dev,p.planning,p.authority,p.county,p.region,p.operator].join(' ').toUpperCase().includes(q)));
  const total=filtered.reduce((a,p)=>a+p.mw,0),max=filtered.length?Math.max(...filtered.map(p=>p.mw)):0,allTotal=projects.reduce((a,p)=>a+p.mw,0)||1,allMax=projects.length?Math.max(...projects.map(p=>p.mw)):1;
  $('v1').textContent=Math.round(total).toLocaleString();$('v2').textContent=filtered.length.toLocaleString();$('v3').textContent=max.toLocaleString(undefined,{maximumFractionDigits:2});
  if(charts.length===3){charts[0].data.datasets[0].data=[total,Math.max(allTotal-total,0)];charts[1].data.datasets[0].data=[filtered.length,Math.max(projects.length-filtered.length,0)];charts[2].data.datasets[0].data=[max,Math.max(allMax-max,0)];charts.forEach(c=>c.update())}
  drawTable();
}
function drawTable(){
  const tb=$('tbody');tb.innerHTML='';
  for(const p of filtered){
    const s=signal(p.ref),tr=document.createElement('tr');
    tr.innerHTML=`<td class="site">${esc(p.name)}</td><td><b>${esc(p.gg)}</b></td><td>${esc(p.dev)}</td><td>${esc(p.ref)}</td><td>${esc(p.updated||'not supplied by REPD')}</td><td><span class="badge" style="background:${p.tech==='SOLAR'?'#ffff00':'#ffae00'}">${p.tech}</span></td><td>${esc(p.status)}</td><td class="mw">${p.mw.toLocaleString(undefined,{maximumFractionDigits:5})}</td><td>${esc(p.loca  … [line shortened here: 605 characters; full line on GitHub]
    tb.appendChild(tr);
  }
  if(!filtered.length)tb.innerHTML='<tr><td colspan="12">No projects match the current filters.</td></tr>';
}
function fillFilters(){
  const states=[...new Set(projects.map(p=>p.status).filter(Boolean))].sort(),locations=[...new Set(projects.flatMap(p=>[p.county,p.region]).filter(Boolean))].sort();
  for(const x of states){const o=document.createElement('option');o.value=x;o.textContent=x;$('state').appendChild(o)}
  for(const x of locations){const o=document.createElement('option');o.value=x;o.textContent=x;$('county').appendChild(o)}
}
function isForeign(item,project){
  const text=norm([item.headline,item.source,item.source_url].join(' '));
  const identity=norm([item.project,project&&project.name,project&&project.country,project&&project.county,project&&project.region,project&&project.authority,project&&project.planning].join(' '));
  return FOREIGN.some(place=>{
    const token=norm(place);if(!text.includes(token))return false;
    if(token==='ireland'&&identity.includes('northern ireland'))return false;
    return !identity.includes(token);
  });
}
function validPublicURL(value){try{const u=new URL(value);return u.protocol==='https:'||u.protocol==='http:'}catch(e){return false}}
function validateNewsSnapshot(payload){
  assert(payload&&payload.schema==='globalgrid2050.major-project-news.v6','Unexpected V6 news schema');
  assert(payload.repd_bound===true&&payload.globalgrid_id_required===true,'News identity policy is missing');
  assert(payload.thresholds&&Number(payload.thresholds.solar_mw_exclusive)===EXPECTED.solarThreshold&&Number(payload.thresholds.bess_mw_exclusive)===EXPECTED.bessThreshold,'News threshold metadata mismatch');
  assert(payload.eligible_projects===EXPECTED.projects&&payload.eligible_solar===EXPECTED.solar&&payload.eligible_bess===EXPECTED.bess,'News eligible-universe counts mismatch');
  assert(payload.news_horizon_days===183&&Array.isArray(payload.items)&&payload.headline_count===payload.items.length,'News crawl/count metadata mismatch');
  const editionDate=new Date(payload.updated);assert(!Number.isNaN(editionDate.getTime()),'News edition timestamp is invalid');
  const editionDay=new Date(clean(payload.updated).slice(0,10)+'T00:00:00Z'),earliest=new Date(editionDay.getTime()-183*86400000),latest=new Date(editionDay.getTime()+86400000),byRef=new Map(projects.map(p=>[p.ref,p])),articleIds=new Set();
  return payload.items.map((item,index)=>{
    const ref=clean(item.repd_ref),project=byRef.get(ref),published=new Date(clean(item.published)+'T00:00:00Z');
    assert(project,`News item ${index+1} is outside the canonical V6 universe`);
    assert(item.primary_repd_ref===ref&&item.identity_status==='REPD_BOUND','News item is not a canonical PRIMARY_MATCH');
    assert(item.gg_project_id===project.gg&&item.gg_development_id===project.dev,'News project/development identity mismatch');
    assert(/^GG2050-NEWS-[A-F0-9]{16}$/.test(clean(item.gg_article_id))&&!articleIds.has(item.gg_article_id),'News article identity is missing or duplicated');
    articleIds.add(item.gg_article_id);
    assert(validPublicURL(item.url)&&clean(item.headline)&&clean(item.source),'News article URL/headline/source is invalid');
    assert(validDate(item.published)&&published>=earliest&&published<=latest,'News publication date is outside the declared horizon');
    assert(Number(item.confidence)>=68&&Number(item.confidence)<=100,'News match-confidence gate failed');
    assert(clean(item.technology).toUpperCase()===project.tech,'News technology binding mismatch');
    assert(Number(item.capacity_mw)===project.mw,'News capacity is not the official REPD project capacity');
    assert(clean(item.repd_record_updated)===project.updated,'News REPD update-date binding mismatch');
    assert(!isForeign(item,project),'Foreign-location veto failed');
    return{...item,repd_ref:ref,gg_project_id:project.gg,gg_development_id:project.dev,technology:project.tech,capacity_mw:project.mw,repd_record_updated:project.updated};
  });
}
function nmatch(item){
  const event=clean(item.event).toUpperCase(),technology=clean(item.technology).toUpperCase();
  if(newsMode==='SOLAR'&&technology!=='SOLAR')return false;if(newsMode==='BESS'&&technology!=='BESS')return false;
  if(newsMode==='CONSENT'&&event!=='CONSENT')return false;if(newsMode==='CONSTRUCTION'&&event!=='CONSTRUCTION')return false;if(newsMode==='OPERATIONAL'&&event!=='OPERATIONAL')return false;
  if(newsMode==='FINANCE'&&!['FINANCIAL CLOSE','ACQUISITION'].includes(event))return false;
  return !newsQ||[item.headline,item.project,item.repd_ref,item.gg_project_id,item.gg_development_id,item.gg_article_id,item.source,item.event].join(' ').toUpperCase().includes(newsQ);
}
function drawNews(){
  const rows=news.filter(nmatch),box=$('stories');if(!rows.length){box.innerHTML='<div class="empty">No V6-qualified headlines match this filter.</div>';return}
  box.innerHTML=rows.map(i=>`<a class="story ${i.technology.toLowerCase()==='bess'?'bess':'solar'}" href="${esc(i.url)}" target="_blank" rel="noopener"><div class="kicker">${esc(i.technology)} · ${esc(i.event||'PROJECT UPDATE')} · ${esc(i.published)}</div><h3>${esc(i.headline)}</h3><p><span class="project">${esc(i.project)}</span> · REPD ${Number(i.capacity_mw).toLocaleString(undefined,{maximumFra  … [line shortened here: 729 characters; full line on GitHub]
}
async function loadNews(){
  try{
    const u=sameOriginURL(NEWS_SNAPSHOT);u.searchParams.set('v',Date.now());
    const response=await fetch(u,{cache:'no-store',headers:{Accept:'application/json'}});assert(response.ok,`V6 news HTTP ${response.status}`);
    news=validateNewsSnapshot(await response.json());
    $('newsMeta').textContent=`${news.length.toLocaleString()} V6-qualified headlines · PRIMARY_MATCH only`;
  }catch(error){console.error('V6 news snapshot:',error);news=[];$('newsMeta').textContent='V6 news feed unavailable or quiet · REPD analytics remain live'}
  drawNews();apply();
}
function formatTimestamp(value){const d=new Date(value);return d.toISOString().replace('T',' ').replace(/\.\d{3}Z$/,' UTC')}
async function loadProjects(){
  try{
    const u=sameOriginURL(PROJECT_SNAPSHOT);u.searchParams.set('v',Date.now());
    const response=await fetch(u,{cache:'no-store',headers:{Accept:'application/json'}});assert(response.ok,`V6 project snapshot HTTP ${response.status}`);
    const payload=await response.json();projects=await validateProjectSnapshot(payload);
    $('statusBox').textContent='● LIVE · VALIDATED SAME-ORIGIN DESNZ Q2 SNAPSHOT';
    $('statusBox').classList.remove('error');
    $('repdMeta').textContent=`DESNZ REPD Q2 2026 · published ${payload.source_publication_date} · validated ${formatTimestamp(payload.validated_at)} · 14,657 official source records · 14,657 unique REPD refs · CSV ↔ XLSX reconciled · 3,714 projects (3,445 solar, 269 BESS)`;
    fillFilters();apply();loadNews();
  }catch(error){fail(error)}
}
function fail(error){
  console.error('V6 project snapshot:',error);projects=[];filtered=[];news=[];
  $('statusBox').textContent='● FAIL-CLOSED · VALIDATED V6 SNAPSHOT UNAVAILABLE';$('statusBox').classList.add('error');
  $('repdMeta').textContent='Same-origin snapshot rejected: metadata, hash, counts or canonical identity did not validate';
  $('tbody').innerHTML='<tr><td colspan="12" class="error">V6 refused to display a malformed or unvalidated same-origin project snapshot. The government website is not contacted by this browser.</td></tr>';
  $('newsMeta').textContent='newspaper unavailable until canonical project identity loads';drawNews();
}
function exportCSV(event){
  if(event)event.preventDefault();
  const out=['Site,GlobalGrid Project ID,GlobalGrid Development ID,REPD Ref,REPD Record Last Updated,Technology,Official REPD Status,Official REPD Capacity MW,County,Region,Operator or Applicant,Planning Authority,Planning Application Reference,Derived Lifecycle,News Signal'];
  for(const p of filtered){const s=signal(p.ref);out.push([p.name,p.gg,p.dev,p.ref,p.updated,p.tech,p.status,p.mw,p.county,p.region,p.operator,p.authority,p.planning,p.lifecycle,s.l].map(v=>'"'+String(v??'').replace(/"/g,'""')+'"').join(','))}
  const u=URL.createObjectURL(new Blob(['\ufeff'+out.join('\n')],{type:'text/csv'})),a=document.createElement('a');a.href=u;a.download='globalgrid2050_uk_renewables_v6_q2_2026.csv';document.body.appendChild(a);a.click();a.remove();URL.revokeObjectURL(u);
}
document.querySelectorAll('#tech .btn').forEach(b=>b.onclick=()=>{document.querySelectorAll('#tech .btn').forEach(x=>x.classList.remove('active'));b.classList.add('active');techMode=b.dataset.tech;apply()});
$('state').onchange=apply;$('county').onchange=apply;$('assetSearch').oninput=e=>{assetQ=e.target.value.trim().toUpperCase();apply()};
document.querySelectorAll('#newsTools button').forEach(b=>b.onclick=()=>{document.querySelectorAll('#newsTools button').forEach(x=>x.classList.remove('active'));b.classList.add('active');newsMode=b.dataset.mode;drawNews()});
$('newsSearch').oninput=e=>{newsQ=e.target.value.trim().toUpperCase();drawNews()};$('export').onclick=exportCSV;$('exportMobile').onclick=exportCSV;
setupCharts();loadProjects();
</script>
</body>
</html>

UK Renewables Pipeline — Datacentres Page

A web page in GlobalGrid2050 that draws UK datacentre pipeline, datacentre proximity and the Renewable Energy Planning Database (REPD) register, and uses data from the GridAtlas repository. Published at https://globalgrid2050.com/uk_renewables_pipeline/datacentres/.

renderglobalgrid2050 / uk_renewables_pipeline/datacentres/index.html · lines 1–140 of 140 · Entry point · pattern parseCsv (shared by 8 files)

What it does
It draws UK datacentre pipeline, datacentre proximity, the REPD register and solar. Defines 13 functions or classes, including esc, num, fmt, parseCsv, dcLink. Side effects: changes the web page (DOM); makes network requests.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'datacentres'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. Domain terms in the code: the REPD register, solar.
Inputs & outputs
In: data source: gridatlas data; GeoJSON file uk_datacentre_pipeline_202610312133.geojson; CSV file datacentre_proximity.csv; form fields (user input). Out: web page.
Downstream impact
It is itself an entry point, published at https://globalgrid2050.com/uk_renewables_pipeline/datacentres/.
What it achieves
It parses CSV (`parseCsv`) and is built from the esc step (`esc`) and the num step (`num`). One static page, no build step.
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · uk_renewables_pipeline/datacentres · page
Uses
GridAtlas — Atlas Page (estate URL)
Used by
none found
Produces
esc, num, fmt, parseCsv, dcLink, repdLink, newsLink, repd10, dcMw, nearest, render, mwOf
Defines here
esc, num, fmt, parseCsv, dcLink, repdLink, newsLink, repd10, dcMw, nearest, render, mwOf, PIPE
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 uk_renewables_pipeline/datacentres/index.html:1-140 · blob ffdc7fc8c4a2cf89e0c06aa321fa6a90910a83e6 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: output · effects: dom, network · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>GlobalGrid2050 | UK data centres beside the REPD pipeline</title>
<!-- One static page, no build step. It reads one file that is already on main:
     dist/convergence/2026q3/datacentre_proximity.csv (226 sites, REPD October 2026 x GridAtlas
     data-centre pipeline 202610312133). Every map link uses a URL GridAtlas already understands:
       data centre: /gridatlas/atlas/?latitude=..&longitude=..&zoom=13&project=<name>
       REPD:        /gridatlas/atlas/?repd_ref=..&technology=..&latitude=..&longitude=..&zoom=12
     (the second is the Pipeline News MAP contract, atlas-receiver-v9-7.js CONTRACT_PARAMS). -->
<style>
:root{--bg:#05080c;--fg:#d8e6f0;--mut:#8aa0b2;--line:#1d2a36;--dc:#b07cff;--ok:#39d98a;--pipe:#ffc400;--link:#4fd1ff}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--fg);font:14px/1.45 "Courier New",monospace}
header{padding:16px;border-bottom:1px solid var(--line)}h1{margin:0 0 6px;font-size:18px;color:#fff}
.note{color:var(--mut);font-size:12px;max-width:980px}.bar{display:flex;flex-wrap:wrap;gap:8px;padding:10px 16px;border-bottom:1px solid var(--line)}
.bar input,.bar select{background:#0b1218;color:var(--fg);border:1px solid var(--line);padding:8px;min-height:44px;font:inherit}
.bar input{flex:1 1 220px}.bar select{flex:1 1 180px;max-width:100%;min-width:0}.news{padding:10px 16px;border-bottom:1px solid var(--line);font-size:13px}
.news a{display:inline-block;margin:4px 10px 4px 0}a{color:var(--link)}
table{width:100%;border-collapse:collapse}th,td{padding:8px 10px;border-bottom:1px solid var(--line);vertical-align:top;text-align:left}
th{color:var(--mut);font-weight:normal;font-size:12px;position:sticky;top:0;background:var(--bg)}
.name{color:#fff;font-weight:bold}.op{color:var(--mut);font-size:12px}.st{font-size:12px;padding:1px 6px;border:1px solid;border-radius:3px;white-space:nowrap}
.mw{max-width:260px}td{overflow-wrap:anywhere}.acts a{display:inline-block;margin:2px 8px 2px 0;min-height:24px}.warn{color:#ff8a3d;font-size:12px}
.near{font-size:12px}.near div{margin-bottom:3px}
@media (max-width:760px){thead{display:none}tr{display:block;border-bottom:1px solid var(--line);padding:8px 0}td{display:block;border:0;padding:3px 12px}td[data-h]:before{content:attr(data-h) ": ";color:var(--mut);font-size:12px}}
</style>
</head>
<body>
<header>
  <h1>UK data centres beside the REPD pipeline</h1>
  <div class="note" id="meta">Loading…</div>
  <div class="note" id="attribution">Data-centre sites: © <a href="https://www.openstreetmap.org/copyright" target="_blank" rel="noopener">OpenStreetMap</a> contributors, <a href="https://opendatacommons.org/licenses/odbl/1-0/" target="_blank" rel="noopener">ODbL 1.0</a>; contains public sector information licensed under the <a href="https://www.nationalarchives.gov.uk/doc/open-government-licence/  … [line shortened here: 941 characters; full line on GitHub]
</header>
<div class="news" id="news"></div>
<div class="bar">
  <input id="q" type="search" placeholder="Search name, operator, region" aria-label="Search">
  <select id="st" aria-label="Status"><option value="">All statuses</option><option value="pipeline">Pipeline (announced, planning, consented)</option><option>operational</option><option>announced</option><option>in_planning</option><option>consented</option><option>unknown</option></select>
  <select id="sort" aria-label="Sort"><option value="pipe">Pipeline first, largest stated MW</option><option value="repd">Most REPD MW within 10 km</option><option value="mw">Largest stated data-centre MW</option><option value="name">Name</option></select>
</div>
<table>
  <thead><tr><th>Data centre</th><th>Status</th><th>Data-centre MW (as published)</th><th>REPD within 10 km (solar, battery, wind)</th><th>Nearest REPD</th><th>Open</th></tr></thead>
  <tbody id="rows"></tbody>
</table>
<script>
const SRC = "../../dist/convergence/2026q3/datacentre_proximity.csv";
const ATLAS = "https://ventusltd.github.io/gridatlas/atlas/";
const STC = {operational:"var(--ok)",announced:"#e6e6e6",in_planning:"#ff8a3d",consented:"#40c4ff",unknown:"#6b7a8f"};
const TECH = {solar:"solar",battery:"bess",wind_onshore:"wind_onshore",wind_offshore:"wind_offshore"};
const GROUPS = ["operational","under_construction","consented","in_planning"];
const esc = s => String(s ?? "").replace(/[&<>"']/g, c => ({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[c]));
const num = v => v === "" || v == null ? null : Number(v);
const fmt = v => v.toLocaleString("en-GB", {maximumFractionDigits: 1});
function parseCsv(text) {
  const rows = []; let row = [], cell = "", q = false;
  for (let i = 0; i < text.length; i++) {
    const c = text[i];
    if (q) { if (c === '"') { if (text[i + 1] === '"') { cell += '"'; i++; } else q = false; } else cell += c; }
    else if (c === '"') q = true;
    else if (c === ",") { row.push(cell); cell = ""; }
    else if (c === "\n") { row.push(cell); rows.push(row); row = []; cell = ""; }
    else if (c !== "\r") cell += c;
  }
  if (cell || row.length) { row.push(cell); rows.push(row); }
  const head = rows.shift();
  return rows.filter(r => r.length === head.length).map(r => Object.fromEntries(head.map((h, i) => [h, r[i]])));
}
function dcLink(d) {
  if (!d.lat || !d.lon) return "";
  const u = new URL(ATLAS);
  u.searchParams.set("latitude", d.lat); u.searchParams.set("longitude", d.lon);
  u.searchParams.set("zoom", "13"); u.searchParams.set("project", d.name);
  return u.href;
}
function repdLink(ref, tech) {
  const u = new URL(ATLAS);
  u.searchParams.set("repd_ref", ref); u.searchParams.set("technology", tech);
  return u.href;
}
function newsLink(q) { const u = new URL("https://www.google.com/search"); u.searchParams.set("q", q); u.searchParams.set("tbm", "nws"); return u.href; }
function repd10(d) {
  const by = {}; let unknown = 0;
  for (const g of GROUPS) { by[g] = 0; for (const t of Object.keys(TECH)) { by[g] += num(d[`r10km_${t}_${g}_mw`]) || 0; unknown += num(d[`r10km_${t}_${g}_mw_unknown`]) || 0; } }
  return {by, total: GROUPS.reduce((s, g) => s + by[g], 0), unknown};
}
function dcMw(d) {
  const parts = [];
  if (d.it_load_mw) parts.push(`IT load ${fmt(+d.it_load_mw)} MW`);
  if (d.grid_connection_mw) parts.push(`grid connection ${fmt(+d.grid_connection_mw)} MW`);
  if (d.unclassified_mw) parts.push(`${fmt(+d.unclassified_mw)} MW${d.unclassified_mw_label ? " (" + esc(d.unclassified_mw_label.split(" | ").slice(0, 2).join("; ")) + ")" : " (basis not stated)"}`);
  return parts.length ? parts.join("<br>") : `<span class="op">not stated</span>`;
}
function nearest(d) {
  const out = [];
  for (const [t, tech] of Object.entries(TECH)) {
    const ref = d[`nearest_${t}_ref`]; if (!ref) continue;
    const km = num(d[`nearest_${t}_km`]); if (km == null || km > 25) continue;
    const mw = d[`nearest_${t}_mw`] ? `${fmt(+d[`nearest_${t}_mw`])} MW` : "MW not stated";
    out.push(`<div>${t.replace("_", " ")} · REPD <a href="${esc(repdLink(ref, tech))}" target="_blank" rel="noopener">${esc(ref)}</a> · ${fmt(km)} km · ${mw} · ${esc(d[`nearest_${t}_status`])}</div>`);
  }
  return out.join("") || `<span class="op">none within 25 km</span>`;
}
let all = [];
function render() {
  const q = document.getElementById("q").value.trim().toLowerCase();
  const st = document.getElementById("st").value, sort = document.getElementById("sort").value;
  let list = all.filter(d => (!q || `${d.name} ${d.operator} ${d.region_inferred}`.toLowerCase().includes(q))
    && (!st || (st === "pipeline" ? ["announced", "in_planning", "consented"].includes(d.status) : d.status === st)));
  const mwOf = d => Math.max(num(d.it_load_mw) || 0, num(d.grid_connection_mw) || 0, num(d.unclassified_mw) || 0);
  const PIPE = d => ["announced", "in_planning", "consented"].includes(d.status) ? 1 : 0;
  list.sort(sort === "pipe" ? (a, b) => PIPE(b) - PIPE(a) || mwOf(b) - mwOf(a) || b._r.total - a._r.total : sort === "name" ? (a, b) => a.name.localeCompare(b.name) : sort === "mw" ? (a, b) => mwOf(b) - mwOf(a) : (a, b) => b._r.total - a._r.total);
  document.getElementById("rows").innerHTML = list.map(d => {
    const r = d._r, reliable = d.proximity_reliable === "True";
    const repd = !reliable ? `<span class="warn">location is ${esc(d.precision)} precision: distances withheld</span>`
      : `${fmt(r.total)} MW stated<div class="op">operational ${fmt(r.by.operational)} · building ${fmt(r.by.under_construction)} · consented ${fmt(r.by.consented)} · planning ${fmt(r.by.in_planning)}${r.unknown ? ` · ${r.unknown} with MW not stated` : ""}</div>`;
    const map = dcLink(d);
    return `<tr><td><div class="name">${esc(d.name)}</div><div class="op">${esc(d.operator || "operator not stated")} · ${esc(d.region_inferred || "")}</div></td>`
      + `<td data-h="Status"><span class="st" style="color:${STC[d.status] || "#ccc"}">${esc(d.status)}</span></td>`
      + `<td data-h="MW" class="mw">${dcMw(d)}</td>`
      + `<td data-h="REPD ≤10 km">${repd}${reliable && d.nearest_node_name ? `<div class="op">nearest transmission node ${esc(d.nearest_node_name)} · ${fmt(+d.nearest_node_km)} km</div>` : ""}</td>`
      + `<td data-h="Nearest" class="near">${reliable ? nearest(d) : "–"}</td>`
      + `<td class="acts">${map ? `<a href="${esc(map)}" target="_blank" rel="noopener">MAP ↗</a>` : `<span class="op">no point</span>`}<a href="${esc(newsLink(`"${d.name}" data centre`))}" target="_blank" rel="noopener">NEWS ↗</a></td></tr>`;
  }).join("");
}
fetch(SRC).then(r => { if (!r.ok) throw new Error(`HTTP ${r.status}`); return r.text(); }).then(t => {
  all = parseCsv(t).map(d => (d._r = repd10(d), d));
  const pipe = all.filter(d => ["announced", "in_planning", "consented"].includes(d.status)).length;
  document.getElementById("meta").innerHTML = `${all.length} data-centre sites (${pipe} in the pipeline) from the GridAtlas open data-centre layer, `
    + `each with the October 2026 REPD solar, battery and wind projects around it. Straight-line distance between published points: `
    + `proximity is not a connection, a contract or capacity. Blank MW is unknown, not zero. Data-centre MW is demand as the source states it and is never added to REPD MW. `
    + `MAP opens GridAtlas, where the Offtakers layer shows the 30 nearest substations, REPD sites and conventional plants for any data centre. `
    + `Source: <a href="${SRC}">datacentre_proximity.csv</a>.`;
  render();
}).catch(e => { document.getElementById("meta").textContent = `Data could not be loaded: ${e.message}`; });
const NEWS = [["UK data centre investment", "UK data centre investment"], ["AI Growth Zones", "\"AI Growth Zone\" UK"], ["Data centre grid connection", "data centre grid connection UK"], ["Data centre planning", "data centre planning appeal UK"], ["Data centres and energy policy", "data centres energy policy UK"]];
document.getElementById("news").innerHTML = "<b>Data-centre news:</b> " + NEWS.map(([l, q]) => `<a href="${esc(newsLink(q))}" target="_blank" rel="noopener">${esc(l)} ↗</a>`).join("");
for (const id of ["q", "st", "sort"]) document.getElementById(id).addEventListener(id === "q" ? "input" : "change", render);
</script>
</body>
</html>

UK Renewables Pipeline — V7 Page

A web page in GlobalGrid2050 that reads inputs for news and county (units: MW), covering the Renewable Energy Planning Database (REPD) register, battery storage (BESS) and wind. Published at https://globalgrid2050.com/uk_renewables_pipeline/v7/.

renderglobalgrid2050 / uk_renewables_pipeline/v7/index.html · lines 1–125 of 125 · Entry point

What it does
It draws the REPD register, battery storage (BESS) and wind. Uses libraries styles/v7.css. Side effects: changes the web page (DOM).
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'renewables'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. Domain terms in the code: the REPD register, battery storage (BESS), wind. README: "Thin `index.html` with separate CSS and JavaScript modules."
Inputs & outputs
In: form fields (user input). Out: web page.
Downstream impact
Used directly by 75 files: GlobalGrid2050 — PipelineNews Intelligence Page (globalgrid2050, https://globalgrid2050.com/pipelinenews_intelligence/202609050309/); Testcode — Pipeline Page (globalgrid2050, https://globalgrid2050.com/testcode/202609060345/pipeline/); Check V7 2 Project Model (globalgrid2050); UK Renewables Pipeline — V8 Page (globalgrid2050, https://globalgrid2050.com/uk_renewables_pipeline/v8/); and 71 more. Reached from 114 other entry points, including GlobalGrid2050 Historical Builds (globalgrid2050, https://globalgrid2050.com/historical_builds.html); GlobalGrid2050 Homepage Before Four Nests (globalgrid2050, https://globalgrid2050.com/homepage-before-four-nests-20260925.html); Grid Engine — Compute Against Charging Page (globalgrid2050, https://globalgrid2050.com/grid_engine/202609060324-compute-against-charging/). It is itself an entry point, published at https://globalgrid2050.com/uk_renewables_pipeline/v7/.
What it achieves
UK Solar + Storage Daily V7.1. Its code works with 1 MW and 100 MW.
Why it matters
Loaded by the PipelineNews Intelligence page at https://globalgrid2050.com/pipelinenews_intelligence/202609050309/ and 70 other pages. Also imported by Compile V8 Fast, Compile Index and Estate Menu, from PipelineNews and Spiders. Checked by Check V7 2 Project Model.
Application
globalgrid2050 · uk_renewables_pipeline/v7 · page
Uses
Mobile (stylesheet), Dashboard V6 Live (link), Dashboard V5 Live (link), Dashboard V4 Live (link), Dashboard V2 2026 08 22 (link), Dashboard (link), GlobalGrid2050 — Renewable Energy Planning Database (REPD) Grid Atlas v8 Page (link), UK Renewables Pipeline — V7 (script src), styles/v7.css, https://cdn.jsdelivr.net/npm/chart.js
Used by
linked from GlobalGrid2050 — PipelineNews Intelligence Page (link), linked from Testcode — Pipeline Page (link), named by URL in Check V7 2 Project Model (estate URL), linked from UK Renewables Pipeline — V8 Page (link), linked from UK Renewables Pipeline — V9 4 Page (link), linked from UK Renewables Pipeline — V9 5 1 Page (link), linked from UK Renewables Pipeline — V9 5 Page (link), linked from UK Renewables Pipeline — V9 6 1 Page (link), and 67 more
Produces
none declared
Defines here
none
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 uk_renewables_pipeline/v7/index.html:1-125 · blob 9f62650fdcb1ffff76c0dd78e84f04a327d92fec · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: output · effects: dom · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <title>GlobalGrid2050 | UK Solar + Storage Daily V7.1</title>
  <link rel="stylesheet" href="styles/v7.css">
  <link rel="stylesheet" href="styles/mobile.css">
  <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body>
  <aside class="sidebar">
    <div class="brand">
      <b>GLOBALGRID2050</b>
      <small>UK SOLAR + STORAGE DAILY · V7.1</small>
    </div>
    <nav class="nav">
      <a class="active" href="#">V7.1 NEWSPAPER</a>
      <a href="../dashboard_v6_live.html">V6</a>
      <a href="../dashboard_v5_live.html">V5</a>
      <a href="../dashboard_v4_live.html">V4</a>
      <a href="../dashboard_v3_live_2026-08-22.html">V3</a>
      <a href="../dashboard_v2_2026-08-22.html">V2</a>
      <a href="../dashboard.html">V1 LEGACY</a>
      <a href="../../index.html">DIRECTORY</a>
      <a href="../../repd_grid_atlasv8/">MAP ATLAS</a>
      <a href="#" id="export">EXPORT CSV</a>
    </nav>
  </aside>
  <main class="main">
    <div class="header">
      <h1>UK RENEWABLES PIPELINE V7.1</h1>
      <div class="status">● MODULAR V5 PARITY · DAILY NEWSPAPER + LIVE REPD</div>
    </div>
    <div class="meta">
      <strong>V7.1 LIVE · 22 August 2026</strong>
      <span>Modular V5 product baseline; project and news logic unchanged.</span>
      <span>Newspaper universe: solar &gt;49 MWp · BESS &gt;100 MW.</span>
      <a href="https://www.gov.uk/government/publications/renewable-energy-planning-database-quarterly-extract" target="_blank" rel="noopener">Official REPD source</a>
    </div>

    <section class="newspaper">
      <div class="masthead">
        <h2>GLOBALGRID2050 <span>ENERGY DAILY</span></h2>
        <div class="strap">
          <span>UK utility-scale solar + battery intelligence</span>
          <span id="newsMeta">loading daily edition…</span>
        </div>
      </div>
      <div class="news-tools" id="newsTools">
        <button class="active" data-news="ALL">ALL</button>
        <button data-news="SOLAR">SOLAR</button>
        <button data-news="BESS">BESS</button>
        <button data-news="CONSENT">CONSENT</button>
        <button data-news="CONSTRUCTION">CONSTRUCTION</button>
        <button data-news="OPERATIONAL">OPERATIONAL</button>
        <button data-news="FINANCE">FINANCE / M&amp;A</button>
        <input id="newsSearch" placeholder="SEARCH HEADLINES / PROJECT / OPERATOR">
      </div>
      <div class="paper">
        <div class="stories" id="stories">
          <div class="news-empty">Loading today’s major-project newspaper…</div>
        </div>
      </div>
    </section>

    <h2 class="section-title">REPD PIPELINE ANALYTICS</h2>
    <div class="gauges">
      <div class="card">
        <h3>FILTERED CAPACITY (MW)</h3>
        <div class="chart"><canvas id="g1"></canvas><div class="value" id="v1">0</div></div>
      </div>
      <div class="card">
        <h3>FILTERED PROJECTS (&gt;1MW)</h3>
        <div class="chart"><canvas id="g2"></canvas><div class="value" id="v2">0</div></div>
      </div>
      <div class="card">
        <h3>LARGEST SINGLE SITE (MW)</h3>
        <div class="chart"><canvas id="g3"></canvas><div class="value" id="v3">0</div></div>
      </div>
    </div>

    <div class="filters" id="tech">
      <button class="btn active" data-tech="All">ALL TECH</button>
      <button class="btn" data-tech="Solar">SOLAR</button>
      <button class="btn" data-tech="Battery Storage">BATTERY</button>
      <button class="btn" data-tech="Onshore Wind">ONSHORE</button>
      <button class="btn" data-tech="Offshore Wind">OFFSHORE</button>
    </div>
    <div class="filters" id="status">
      <button class="btn active" data-status="All">ALL STATUS</button>
      <button class="btn" data-status="Operational">OPERATIONAL</button>
      <button class="btn" data-status="Under Construction">CONSTRUCTING</button>
      <button class="btn" data-status="Awaiting Construction">AWAITING</button>
      <button class="btn" data-status="Application Submitted">SUBMITTED</button>
    </div>
    <div class="filters">
      <select id="county"><option value="All">🌍 ALL COUNTIES</option></select>
      <input id="search" class="asset-search" placeholder="🔍 SEARCH OPERATOR OR SITE..." autocomplete="off">
    </div>
    <div class="meta">
      <strong>STATUS DISCIPLINE</strong>
      <span><b>REPD STATUS</b> is the official dataset field. <b>NEWS SIGNAL</b> is headline-derived intelligence only and never changes or confirms REPD status.</span>
    </div>
    <div class="tablewrap">
      <table>
        <thead>
          <tr>
            <th>SITE NAME</th>
            <th class="hide-mobile">COUNTY</th>
            <th class="hide-mobile">OPERATOR</th>
            <th>TECHNOLOGY</th>
            <th>REPD STATUS</th>
            <th>CAPACITY (MW)</th>
            <th>NEWS SIGNAL</th>
            <th>NEWS</th>
          </tr>
        </thead>
        <tbody id="tbody"></tbody>
      </table>
    </div>
  </main>
  <script type="module" src="scripts/app.js"></script>
</body>
</html>

UK Renewables Pipeline — V7

A JavaScript module in the scripts folder of GlobalGrid2050.

otherglobalgrid2050 / uk_renewables_pipeline/v7/scripts/app.js · lines 1–28 of 28 · Entry point

Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'renewables'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Downstream impact
Used directly by 1 file: UK Renewables Pipeline — V7 Page (globalgrid2050, https://globalgrid2050.com/uk_renewables_pipeline/v7/). Reached from 186 other entry points, including GlobalGrid2050 Historical Builds (globalgrid2050, https://globalgrid2050.com/historical_builds.html); GlobalGrid2050 Homepage Before Four Nests (globalgrid2050, https://globalgrid2050.com/homepage-before-four-nests-20260925.html); GlobalGrid2050 — PipelineNews Intelligence Page (globalgrid2050, https://globalgrid2050.com/pipelinenews_intelligence/202609050309/).
What it achieves
No statement of purpose was found in the file, a README line naming it, or its name. Described from its file name only (a candidate, not yet checked against the code).
Why it matters
Loaded by the page of the same name at https://globalgrid2050.com/uk_renewables_pipeline/v7/.
Application
globalgrid2050 · uk_renewables_pipeline/v7/scripts · JavaScript module
Uses
Gauges (import), Newspaper (import), Project Table (import), Projects (import), Plugin Host (import)
Used by
loaded by UK Renewables Pipeline — V7 Page (script src)
Produces
none declared
Defines here
none
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 uk_renewables_pipeline/v7/scripts/app.js:1-28 · blob 3a6f9cc0d1f3868569e42b7dba29279aaacdabc6 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: unknown · effects: none found · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
import { initialiseGauges } from "./plugins/gauges.js";
import { bindNewspaper, loadNews } from "./plugins/newspaper.js";
import { refreshProjectTable } from "./plugins/project-table.js";
import { bindProjectControls, loadProjects } from "./plugins/projects.js";
import { startPlugins } from "./core/plugin-host.js";

startPlugins([
  {
    id: "gauges",
    start: initialiseGauges,
  },
  {
    id: "newspaper",
    dependsOn: ["gauges"],
    start() {
      bindNewspaper(refreshProjectTable);
      loadNews();
    },
  },
  {
    id: "projects",
    dependsOn: ["gauges", "newspaper"],
    start() {
      bindProjectControls();
      loadProjects();
    },
  },
]);

State

A JavaScript module in the core folder of GlobalGrid2050 covering Renewable Energy Planning Database (REPD) master, major project news and wind.

otherglobalgrid2050 / uk_renewables_pipeline/v7/scripts/core/state.js · lines 1–25 of 25

Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'renewables'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. Domain terms in the code: wind.
Inputs & outputs
In: JSON file repd_master.json; JSON file major_project_news_v5.json.
Downstream impact
Used directly by 2 files: Gauges (globalgrid2050); Projects (globalgrid2050). Reached from 188 other entry points, including GlobalGrid2050 Historical Builds (globalgrid2050, https://globalgrid2050.com/historical_builds.html); GlobalGrid2050 Homepage Before Four Nests (globalgrid2050, https://globalgrid2050.com/homepage-before-four-nests-20260925.html); GlobalGrid2050 — PipelineNews Intelligence Page (globalgrid2050, https://globalgrid2050.com/pipelinenews_intelligence/202609050309/).
What it achieves
No statement of purpose was found in the file, a README line naming it, or its name.
Why it matters
Imported by Gauges and Projects.
Application
globalgrid2050 · uk_renewables_pipeline/v7/scripts/core · JavaScript module
Uses
none found
Used by
imported by Gauges (import), imported by Projects (import)
Produces
state, COLORS, DATA_SOURCES
Defines here
none
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 uk_renewables_pipeline/v7/scripts/core/state.js:1-25 · blob 58cbc2ddbadcfe5b2e045ae59976ad23e406098a · GitHub at these lines
State
achieves: name · context: readme_derived · stage: unknown · effects: none found · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
export const state = {
  all: [],
  filtered: [],
  tech: "All",
  status: "All",
  county: "All",
  search: "",
  charts: { capacity: null, projects: null, largest: null },
  newsItems: [],
  newsMode: "ALL",
  newsQuery: "",
};

export const COLORS = Object.freeze({
  Solar: "#ffff00",
  "Battery Storage": "#ffae00",
  "Onshore Wind": "#00ffff",
  "Offshore Wind": "#0066ff",
});

export const DATA_SOURCES = Object.freeze({
  repd: "../../dist/repd_master.json",
  newsPages: "../../dist/major_project_news_v5.json",
  newsGitHub: "https://raw.githubusercontent.com/Ventusltd/globalgrid2050/main/dist/major_project_news_v5.json",
});

Canonical Project Export

A JavaScript module in the plugins folder of GlobalGrid2050 that joins refs (`joinRefs`) and builds canonical project CSV (`buildCanonicalProjectCsv`). It joins refs (`joinRefs`) and builds canonical project CSV (`buildCanonicalProjectCsv`).

transformglobalgrid2050 / uk_renewables_pipeline/v7/scripts/plugins/canonical-project-export.js · lines 1–125 of 125 · pattern neutraliseSpreadsheetFormula (shared by 2 files)

What it does
It calculates its inputs. Defines 6 functions or classes, including invariant, joinRefs, neutraliseSpreadsheetFormula, quoteCsvCell, isoDate.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'renewables'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Inputs & outputs
Coordinate systems named: OSGB36 / EPSG:27700 (British National Grid).
Downstream impact
Used directly by 2 files: Projects (globalgrid2050); Check V8 1 Mvp (globalgrid2050). Reached from 187 other entry points, including GlobalGrid2050 Historical Builds (globalgrid2050, https://globalgrid2050.com/historical_builds.html); GlobalGrid2050 Homepage Before Four Nests (globalgrid2050, https://globalgrid2050.com/homepage-before-four-nests-20260925.html); GlobalGrid2050 — PipelineNews Intelligence Page (globalgrid2050, https://globalgrid2050.com/pipelinenews_intelligence/202609050309/).
What it achieves
Defines `invariant`, `joinRefs`, `neutraliseSpreadsheetFormula` and 3 more.
Why it matters
Imported by Projects. Checked by Check V8 1 Mvp.
Application
globalgrid2050 · uk_renewables_pipeline/v7/scripts/plugins · JavaScript module
Uses
Canonical Project Table (import)
Used by
imported by Projects (import), imported by Check V8 1 Mvp (import)
Produces
neutraliseSpreadsheetFormula, quoteCsvCell, buildCanonicalProjectCsv
Defines here
invariant, joinRefs, neutraliseSpreadsheetFormula, quoteCsvCell, isoDate, buildCanonicalProjectCsv
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 uk_renewables_pipeline/v7/scripts/plugins/canonical-project-export.js:1-125 · blob 1b06e9ad97590690d032b05b00e1ec63472b882a · GitHub at these lines
State
achieves: name · context: readme_derived · stage: transform · effects: none found · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
import { buildCanonicalProjectTableView } from "./canonical-project-table.js";

const CSV_BOM = "\ufeff";
const CSV_MIME_TYPE = "text/csv;charset=utf-8";

function invariant(condition, message) {
  if (!condition) throw new Error(`V7.2 canonical export: ${message}`);
}

function joinRefs(values) {
  return values.join("|");
}

const VALUE_GETTERS = Object.freeze({
  site_name: ({ project }) => project.name,
  repd_ref: ({ project }) => project.repd_ref,
  gg_project_id: ({ project }) => project.gg_project_id,
  gg_development_id: ({ project }) => project.gg_development_id,
  identity_status: ({ project }) => project.identity_status,
  identity_confidence: ({ project }) => project.identity_confidence,
  technology: ({ project }) => project.technology_label,
  repd_technology: ({ project }) => project.repd_technology,
  official_capacity: ({ project }) => project.capacity_mw,
  capacity_unit: ({ project }) => project.capacity_unit,
  official_status: ({ project }) => project.status,
  derived_lifecycle: ({ project }) => project.lifecycle,
  derived_lifecycle_view: ({ project }) => project.lifecycle_view,
  operator: ({ project }) => project.operator,
  county: ({ project }) => project.county,
  region: ({ project }) => project.region,
  country: ({ project }) => project.country,
  planning_authority: ({ project }) => project.planning_authority,
  planning_reference: ({ project }) => project.planning_application_reference,
  repd_record_updated: ({ project }) => project.repd_record_updated,
  planning_application_submitted: ({ project }) => project.planning_application_submitted,
  planning_application_withdrawn: ({ project }) => project.planning_application_withdrawn,
  planning_permission_granted: ({ project }) => project.planning_permission_granted,
  planning_permission_refused: ({ project }) => project.planning_permission_refused,
  planning_permission_expired: ({ project }) => project.planning_permission_expired,
  under_construction: ({ project }) => project.under_construction,
  operational: ({ project }) => project.operational,
  repd_old_ref: ({ project }) => project.repd_old_ref,
  direct_related_repd_refs: ({ project }) => joinRefs(project.direct_related_repd_refs),
  planning_sibling_repd_refs: ({ project }) => joinRefs(project.planning_sibling_repd_refs),
  development_repd_refs: ({ project }) => joinRefs(project.development_repd_refs),
  relationships_json: ({ project }) => JSON.stringify(project.relationships),
  geometry_status: ({ project }) => project.geometry_status,
  easting: ({ project }) => project.easting,
  northing: ({ project }) => project.northing,
  source_crs: ({ metadata }) => metadata.geometry_policy.source_crs,
  longitude: ({ project }) => project.longitude,
  latitude: ({ project }) => project.latitude,
  output_crs: ({ metadata }) => metadata.geometry_policy.output_crs,
  coordinate_transform: ({ metadata }) => metadata.geometry_policy.transform,
  coordinate_use: ({ metadata }) => metadata.geometry_policy.use,
  source_dataset: ({ metadata }) => metadata.source_provenance.dataset,
  source_row: ({ project }) => project.source_row,
  projects_sha256: ({ metadata }) => metadata.projects_sha256,
  source_identity_sha256: ({ metadata }) => metadata.source_identity_sha256,
  source_coordinate_fixture_sha256: ({ metadata }) => metadata.source_coordinate_fixture_sha256,
  source_workbook_sha256: ({ metadata }) => metadata.source_workbook_sha256,
  reconciliation: ({ metadata }) => metadata.source_provenance.reconciliation,
  legacy_news_signal: ({ tableRow }) => tableRow.primary.legacyNews.label,
  legacy_news_note: ({ tableRow }) => tableRow.primary.legacyNews.note,
});

export function neutraliseSpreadsheetFormula(value) {
  if (typeof value !== "string") return value;
  return /^(?:[=+\-@]|\s+[=+\-@]|\t|\r|\n)/u.test(value) ? `'${value}` : value;
}

export function quoteCsvCell(value) {
  const safe = neutraliseSpreadsheetFormula(value ?? "");
  return `"${String(safe).replaceAll('"', '""')}"`;
}

function isoDate(value) {
  if (value === undefined) return new Date().toISOString().slice(0, 10);
  const parsed = typeof value === "string" && /^\d{4}-\d{2}-\d{2}$/.test(value)
    ? new Date(`${value}T00:00:00Z`)
    : null;
  invariant(
    parsed && Number.isFinite(parsed.getTime()) && parsed.toISOString().slice(0, 10) === value,
    "date must be a valid YYYY-MM-DD value",
  );
  return value;
}

export function buildCanonicalProjectCsv(state, { legacySignalResolver, date } = {}) {
  const snapshot = Object.freeze({
    filtered: state?.filtered,
    contract: state?.contract,
    metadata: state?.metadata,
  });
  const table = buildCanonicalProjectTableView(state, { legacySignalResolver });
  invariant(table.available, "validated canonical project model is unavailable");
  invariant(
    state.filtered === snapshot.filtered
      && state.contract === snapshot.contract
      && state.metadata === snapshot.metadata,
    "canonical state changed while the export was being built",
  );
  invariant(snapshot.contract.interface.export.scope === "current filtered rows only", "filtered export contract is absent");
  invariant(snapshot.contract.interface.export.zero_results === "header only", "zero-result export contract is absent");
  const columns = snapshot.contract.interface.export.columns;
  invariant(Array.isArray(columns) && columns.length > 0, "export columns are absent");
  invariant(columns.every((column) => typeof VALUE_GETTERS[column.id] === "function"), "export contains an unknown column");
  invariant(snapshot.filtered.length === table.rows.length, "table and filtered export row counts disagree");

  const lines = [columns.map((column) => quoteCsvCell(column.label)).join(",")];
  snapshot.filtered.forEach((project, index) => {
    const context = { project, metadata: snapshot.metadata, tableRow: table.rows[index] };
    lines.push(columns.map((column) => quoteCsvCell(VALUE_GETTERS[column.id](context))).join(","));
  });
  const content = `${CSV_BOM}${lines.join("\r\n")}`;
  const filename = `globalgrid2050_uk_renewables_pipeline_v7_2_${isoDate(date)}.csv`;
  return Object.freeze({
    content,
    filename,
    mimeType: CSV_MIME_TYPE,
    rowCount: snapshot.filtered.length,
    columnCount: columns.length,
    encoding: "UTF-8 with BOM",
  });
}