In this section
- Dashboard render · globalgrid2050 / uk_renewables_pipeline/dashboard.html lines 418–820
- Dashboard V2 2026 08 22 render · globalgrid2050 / uk_renewables_pipeline/dashboard_v2_2026-08-22.html lines 1–29
- Dashboard V4 Live render · globalgrid2050 / uk_renewables_pipeline/dashboard_v4_live.html lines 1–38
- Dashboard V5 Live render · globalgrid2050 / uk_renewables_pipeline/dashboard_v5_live.html lines 1–68
Dashboard
A web page in the UK renewables pipeline folder of GlobalGrid2050 that draws Renewable Energy Planning Database (REPD) master, solar, wind and battery storage (BESS). Published at https://globalgrid2050.com/uk_renewables_pipeline/dashboard.html.
renderglobalgrid2050 / uk_renewables_pipeline/dashboard.html · lines 418–820 of 820 (continued from section 960) · Entry point · pattern populateFilters (shared by 2 files)
- What it does
- It draws REPD master, solar, wind and battery storage (BESS). Defines 8 functions or classes, including initGauges, updateGauges, updateTable, applyFilters, populateFilters. 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: solar, wind, battery storage (BESS).
- Inputs & outputs
- In: JSON file repd_master.json; form fields (user input). Out: web page; canvas drawing.
- Downstream impact
- Used directly by 82 files: GlobalGrid2050 — Solar Battery Energy Storage System (BESS) Topology V6 Page (globalgrid2050, https://globalgrid2050.com/solar-bess-topology-v6/); GlobalGrid2050 — Solar Battery Energy Storage System (BESS) Topology V7 Page (globalgrid2050, https://globalgrid2050.com/solar-bess-topology-v7/); GlobalGrid2050 — PipelineNews Intelligence Page (globalgrid2050, https://globalgrid2050.com/pipelinenews_intelligence/202609050309/); Testcode — Pipeline Page (globalgrid2050, https://globalgrid2050.com/testcode/202609060345/pipeline/); and 78 more. Reached from 130 other entry points, including Iterations — 43 Registry Growth Page (galaxies-wafers, https://ventusltd.github.io/galaxies-wafers/iterations/43-registry-growth/); Iterations — 47 Federation Honesty Page (galaxies-wafers, https://ventusltd.github.io/galaxies-wafers/iterations/47-federation-honesty/); Demonstration Videos (globalgrid2050, https://globalgrid2050.com/solar-bess-topology-v7/docs/demonstration-videos.html). It is itself an entry point, published at https://globalgrid2050.com/uk_renewables_pipeline/dashboard.html.
- What it achieves
- It updates gauges (`updateGauges`), updates table (`updateTable`) and applies filters (`applyFilters`). UK Renewables Pipeline. Its code works with 1 MW. It responds to click, change and input events.
- Why it matters
- Loaded by the Solar Battery Energy Storage System (BESS) Topology V6 page at https://globalgrid2050.com/solar-bess-topology-v6/ and 76 other pages. Also imported by 5 files, including Performance Audit, Mobile UI Invariants and Compile V8 Fast, from PipelineNews.
- Application
- globalgrid2050 · uk_renewables_pipeline · page
- Uses
- GlobalGrid2050 — Renewable Energy Planning Database (REPD) Grid Atlas v8 Page (link), https://cdn.jsdelivr.net/npm/chart.js
- Used by
- linked from GlobalGrid2050 — Solar Battery Energy Storage System (BESS) Topology V6 Page (link), linked from GlobalGrid2050 — Solar Battery Energy Storage System (BESS) Topology V7 Page (link), linked from GlobalGrid2050 — PipelineNews Intelligence Page (link), linked from Testcode — Pipeline Page (link), embedded by Dashboard V2 2026 08 22 (iframe), linked from Dashboard V4 Live (link), linked from Dashboard V5 Live (link), linked from Dashboard V6 Live (link), and 74 more, mentioned in Standalone (comment link)
- Produces
- initGauges, updateGauges, updateTable, applyFilters, populateFilters, csvEscape, exportFilteredCSV, titleCase
- Defines here
- initGauges, updateGauges, updateTable, applyFilters, populateFilters, csvEscape, exportFilteredCSV, titleCase
- 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.html:418-820 · blob e2d99e37d6388d3f498a79696773238ad689574b · 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
<div class="ventus-main">GlobalGrid2050</div>
<div class="ventus-sub">Renewables Pipeline</div>
</div>
<div class="user-profile">
<div class="avatar">GG</div>
<div class="user-info">
<p>System Admin</p>
<span>SYSTEM ACCESS</span>
</div>
</div>
<nav class="nav-menu">
<a href="#" class="nav-item active">UK REPD DASH</a>
<a href="../index.html" class="nav-item">DIRECTORY</a>
<a href="https://globalgrid2050.com/repd_grid_atlasv8/" class="nav-item">MAP ATLAS</a>
<a href="#" class="nav-item" id="btn-export-csv">EXPORT CSV</a>
</nav>
</aside>
<main class="main-content">
<div class="header">
<h1>Analytics Dashboard</h1>
<div class="status-box">
<div class="live-dot"></div>
Live REPD Source
</div>
</div>
<div class="gauges-container">
<div class="gauge-card">
<h3>Filtered Capacity (MW)</h3>
<div class="chart-wrapper">
<canvas id="gaugeTotal"></canvas>
<div class="gauge-value" id="valTotal">0</div>
</div>
</div>
<div class="gauge-card">
<h3>Filtered Projects (>1MW)</h3>
<div class="chart-wrapper">
<canvas id="gaugeCount"></canvas>
<div class="gauge-value" id="valCount">0</div>
</div>
</div>
<div class="gauge-card">
<h3>Largest Single Site (MW)</h3>
<div class="chart-wrapper">
<canvas id="gaugeMax"></canvas>
<div class="gauge-value" id="valMax">0</div>
</div>
</div>
</div>
<div class="filters-container" id="tech-filters">
<button class="btn tech-btn active" data-tech="All">ALL TECH</button>
<button class="btn tech-btn" data-tech="Solar">SOLAR</button>
<button class="btn tech-btn" data-tech="Battery Storage">BATTERY</button>
<button class="btn tech-btn" data-tech="Onshore Wind">ONSHORE</button>
<button class="btn tech-btn" data-tech="Offshore Wind">OFFSHORE</button>
</div>
<div class="filters-container" id="status-filters">
<button class="btn status-btn active" data-status="All">ALL STATUS</button>
<button class="btn status-btn" data-status="Operational">OPERATIONAL</button>
<button class="btn status-btn" data-status="Under Construction">CONSTRUCTING</button>
<button class="btn status-btn" data-status="Awaiting Construction">AWAITING</button>
<button class="btn status-btn" data-status="Application Submitted">SUBMITTED</button>
</div>
<div class="filters-container" style="margin-bottom: 25px;">
<select id="county-dropdown" class="btn dropdown-btn">
<option value="All">🌍 ALL COUNTIES</option>
</select>
<input type="text" id="universal-search" list="operator-list" class="btn search-input" placeholder="🔍 SEARCH OPERATOR OR SITE..." autocomplete="off">
<datalist id="operator-list">
</datalist>
</div>
<div class="table-wrapper">
<table>
<thead>
<tr>
<th>Site Name</th>
<th class="hide-mobile">County</th>
<th class="hide-mobile">Operator</th>
<th>Technology</th>
<th>Status</th>
<th>Capacity (MW)</th>
<th>News</th>
</tr>
</thead>
<tbody id="table-body">
</tbody>
</table>
</div>
</main>
<script>
let allData = [];
let currentFilteredData = [];
let currentTech = 'All';
let currentStatus = 'All';
let currentCounty = 'All';
let currentSearch = '';
let chartTotal, chartCount, chartMax;
const techColors = {
'Solar': 'var(--tech-solar)',
'Battery Storage': 'var(--tech-battery)',
'Onshore Wind': 'var(--tech-onshore)',
'Offshore Wind': 'var(--tech-offshore)'
};
function initGauges() {
const commonOptions = {
responsive: true,
maintainAspectRatio: false,
circumference: 180,
rotation: 270,
cutout: '80%',
plugins: { tooltip: { enabled: false }, legend: { display: false } }
};
const ctxTotal = document.getElementById('gaugeTotal').getContext('2d');
chartTotal = new Chart(ctxTotal, { type: 'doughnut', data: { datasets: [{ data: [0, 1], backgroundColor: ['#ff00ff', '#222'], borderWidth: 0 }] }, options: commonOptions });
const ctxCount = document.getElementById('gaugeCount').getContext('2d');
chartCount = new Chart(ctxCount, { type: 'doughnut', data: { datasets: [{ data: [0, 1], backgroundColor: ['#00ffff', '#222'], borderWidth: 0 }] }, options: commonOptions });
const ctxMax = document.getElementById('gaugeMax').getContext('2d');
chartMax = new Chart(ctxMax, { type: 'doughnut', data: { datasets: [{ data: [0, 1], backgroundColor: ['#00ff88', '#222'], borderWidth: 0 }] }, options: commonOptions });
}
function updateGauges(filteredData) {
const totalMW = filteredData.reduce((sum, item) => sum + item.Capacity_MW, 0);
const count = filteredData.length;
const maxMW = count > 0 ? Math.max(...filteredData.map(d => d.Capacity_MW)) : 0;
document.getElementById('valTotal').innerText = totalMW.toLocaleString(undefined, {maximumFractionDigits: 0});
document.getElementById('valCount').innerText = count.toLocaleString();
document.getElementById('valMax').innerText = maxMW.toLocaleString(undefined, {maximumFractionDigits: 1});
const globalTotal = allData.reduce((sum, item) => sum + item.Capacity_MW, 0) || 100000;
const globalCount = allData.length || 1000;
const globalMax = Math.max(...allData.map(d => d.Capacity_MW)) || 5000;
chartTotal.data.datasets[0].data = [totalMW, Math.max(globalTotal - totalMW, 0)];
chartTotal.update();
chartCount.data.datasets[0].data = [count, Math.max(globalCount - count, 0)];
chartCount.update();
chartMax.data.datasets[0].data = [maxMW, Math.max(globalMax - maxMW, 0)];
chartMax.update();
}
function updateTable(filteredData) {
const tbody = document.getElementById('table-body');
tbody.innerHTML = '';
filteredData.forEach(item => {
const tr = document.createElement('tr');
const bgColor = techColors[item['Tech Category']] || '#888';
const fontColor = item['Tech Category'] === 'Offshore Wind' ? '#fff' : '#000';
const searchQuery = encodeURIComponent(`${item['Site Name']} ${item['Tech Category']}`);
const newsUrl = `https://www.google.com/search?q=${searchQuery}&tbm=nws`;
let subtextArray = [];
if (item['County']) subtextArray.push(item['County']);
if (item['Operator']) subtextArray.push(item['Operator']);
let subtext = subtextArray.length > 0 ? subtextArray.join(' | ') : '';
let countyDisplay = item['County'] || '-';
let opDisplay = item['Operator'] || '-';
tr.innerHTML = `
<td class="site-name">
${item['Site Name']}
${subtext ? `<div class="mobile-extra">${subtext}</div>` : ''}
</td>
<td class="hide-mobile" style="color: #888; font-size: 11px;">${countyDisplay}</td>
<td class="hide-mobile">${opDisplay}</td>
<td><span class="tech-badge" style="background:${bgColor}; color:${fontColor}">${item['Tech Category']}</span></td>
<td style="font-size:10px">${item['Status']}</td>
<td class="val-mw">${item.Capacity_MW.toFixed(1)}</td>
<td style="text-align:center;">
<a href="${newsUrl}" target="_blank" class="news-link" title="Search Google News for ${item['Site Name']}">📰</a>
</td>
`;
tbody.appendChild(tr);
});
}
function applyFilters() {
let filtered = allData;
if (currentTech !== 'All') {
filtered = filtered.filter(d => d['Tech Category'] === currentTech);
}
if (currentStatus !== 'All') {
filtered = filtered.filter(d => d['Status'].includes(currentStatus));
}
if (currentCounty !== 'All') {
filtered = filtered.filter(d => d['County'] === currentCounty);
}
// Universal Search filter (Matches Operator OR Site Name)
if (currentSearch !== '') {
filtered = filtered.filter(d =>
d['Operator'].includes(currentSearch) ||
d['Site Name'].toUpperCase().includes(currentSearch)
);
}
currentFilteredData = filtered;
updateGauges(filtered);
updateTable(filtered);
}
function populateFilters(countiesSet, operatorsSet) {
const countyDropdown = document.getElementById('county-dropdown');
const operatorList = document.getElementById('operator-list');
const sortedCounties = Array.from(countiesSet).sort();
const sortedOperators = Array.from(operatorsSet).sort();
// Populate County Dropdown
sortedCounties.forEach(county => {
const option = document.createElement('option');
option.value = county;
option.text = `📍 ${county}`;
countyDropdown.appendChild(option);
});
// Populate Operator Datalist for Autocomplete
sortedOperators.forEach(op => {
const option = document.createElement('option');
option.value = op; // This allows them to type "EDF" and autocomplete to "EDF ENERGY"
operatorList.appendChild(option);
});
}
function csvEscape(value) {
if (value === null || value === undefined) return '""';
const text = String(value).replace(/"/g, '""');
return `"${text}"`;
}
function exportFilteredCSV(event) {
if (event) event.preventDefault();
const rows = currentFilteredData && currentFilteredData.length ? currentFilteredData : allData;
const headers = ["Site Name", "County", "Operator", "Technology", "Status", "Capacity MW"];
const csvRows = [headers.map(csvEscape).join(",")];
rows.forEach(item => {
csvRows.push([
item["Site Name"],
item["County"],
item["Operator"],
item["Tech Category"],
item["Status"],
Number(item.Capacity_MW || 0).toFixed(3)
].map(csvEscape).join(","));
});
const csv = "\ufeff" + csvRows.join("\n");
const blob = new Blob([csv], { type: "text/csv;charset=utf-8;" });
const url = URL.createObjectURL(blob);
const link = document.createElement("a");
const date = new Date().toISOString().slice(0, 10);
const tech = String(currentTech || "All").replace(/[^a-z0-9]+/gi, "_").toLowerCase();
const status = String(currentStatus || "All").replace(/[^a-z0-9]+/gi, "_").toLowerCase();
link.href = url;
link.download = `globalgrid2050_uk_renewables_pipeline_${tech}_${status}_${date}.csv`;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
URL.revokeObjectURL(url);
}
// Listeners
document.querySelectorAll('.tech-btn').forEach(btn => {
btn.addEventListener('click', (e) => {
document.querySelectorAll('.tech-btn').forEach(b => b.classList.remove('active'));
e.target.classList.add('active');
currentTech = e.target.getAttribute('data-tech');
applyFilters();
});
});
document.querySelectorAll('.status-btn').forEach(btn => {
btn.addEventListener('click', (e) => {
document.querySelectorAll('.status-btn').forEach(b => b.classList.remove('active'));
e.target.classList.add('active');
currentStatus = e.target.getAttribute('data-status');
applyFilters();
});
});
document.getElementById('btn-export-csv')?.addEventListener('click', exportFilteredCSV);
document.getElementById('county-dropdown').addEventListener('change', (e) => {
currentCounty = e.target.value;
applyFilters();
});
// Trigger filter immediately as the user types
document.getElementById('universal-search').addEventListener('input', (e) => {
currentSearch = e.target.value.trim().toUpperCase();
applyFilters();
});
function titleCase(str) {
if (!str) return '';
return str.toLowerCase().split(' ').map(function(word) {
return (word.charAt(0).toUpperCase() + word.slice(1));
}).join(' ');
}
window.onload = () => {
initGauges();
// CACHE BUSTER ACTIVE
fetch('../dist/repd_master.json?v=' + new Date().getTime())
.then(response => response.json())
.then(geojson => {
let parsedData = [];
let uniqueCounties = new Set();
let uniqueOperators = new Set();
(geojson.features || []).forEach(f => {
const props = f.properties || {};
const tech = props.tech || '';
const raw_tech = String(props.raw_tech || '').toLowerCase();
const capacityMW = parseFloat(props.capacity) || 0;
// 1MW MINIMUM FILTER
if (capacityMW < 1.0) return;
let cat = 'Other';
if (tech === 'solar' || tech === 'solar_roof') {
cat = 'Solar';
} else if (tech === 'bess') {
cat = 'Battery Storage';
} else if (tech === 'wind') {
cat = raw_tech.includes('offshore') ? 'Offshore Wind' : 'Onshore Wind';
}
let rawCounty = props.county || props.County || props.lpa || props.local_planning_authority || props.region || '';
let cleanCounty = titleCase(String(rawCounty).trim());
if (cleanCounty.toLowerCase() === 'nan' || cleanCounty.toLowerCase() === 'none') {
cleanCounty = '';
}
if (cleanCounty && cleanCounty !== '') {
uniqueCounties.add(cleanCounty);
}
let rawOperator = props.operator || props.Operator || '';
let cleanOperator = String(rawOperator).trim().toUpperCase();
if (cleanOperator === 'NAN' || cleanOperator === 'NONE') {
cleanOperator = '';
}
if (cleanOperator && cleanOperator !== '' && cleanOperator !== 'UNKNOWN') {
uniqueOperators.add(cleanOperator);
}
if (cat !== 'Other') {
parsedData.push({
'Site Name': props.name || 'Unknown Site',
'County': cleanCounty,
'Operator': cleanOperator,
'Tech Category': cat,
'Status': titleCase(props.status || 'Unknown'),
'Capacity_MW': capacityMW
});
}
});
parsedData.sort((a, b) => b.Capacity_MW - a.Capacity_MW);
allData = parsedData;
// Populate filters
populateFilters(uniqueCounties, uniqueOperators);
// Run initial filter
applyFilters();
})
.catch(err => {
console.error("Error loading REPD data:", err);
document.getElementById('table-body').innerHTML = `<tr><td colspan="7" style="text-align:center;color:var(--error);">Error loading ../dist/repd_master.json. Are you running a local server?</td></tr>`;
});
};
</script>
</body>
</html>Dashboard V2 2026 08 22
A web page in the UK renewables pipeline folder of GlobalGrid2050 covering solar and battery storage (BESS). Published at https://globalgrid2050.com/uk_renewables_pipeline/dashboard_v2_2026-08-22.html.
renderglobalgrid2050 / uk_renewables_pipeline/dashboard_v2_2026-08-22.html · lines 1–29 of 29 · Entry point
- What it does
- It draws solar and battery storage (BESS). 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: solar, battery storage (BESS).
- Inputs & outputs
- 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/); Dashboard V4 Live (globalgrid2050, https://globalgrid2050.com/uk_renewables_pipeline/dashboard_v4_live.html); Dashboard V5 Live (globalgrid2050, https://globalgrid2050.com/uk_renewables_pipeline/dashboard_v5_live.html); and 71 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_v2_2026-08-22.html.
- What it achieves
- UK Renewables Pipeline V2. Its code works with 50 MW, 300 MW and 500 MW.
- Why it matters
- Loaded by the PipelineNews Intelligence page at https://globalgrid2050.com/pipelinenews_intelligence/202609050309/ and 72 other pages. Also imported by Compile V8 Fast and Compile Index, from PipelineNews.
- Application
- globalgrid2050 · uk_renewables_pipeline · page
- Uses
- Dashboard (iframe)
- Used by
- linked from GlobalGrid2050 — PipelineNews Intelligence Page (link), linked from Testcode — Pipeline Page (link), linked from Dashboard V4 Live (link), linked from Dashboard V5 Live (link), linked from Dashboard V6 Live (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), 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/dashboard_v2_2026-08-22.html:1-29 · blob cb953a67332d3d29355945fb58a513e30c681013 · 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 Renewables Pipeline V2</title>
<style>
*{box-sizing:border-box}body{margin:0;background:#000;color:#fff;font:13px 'Courier New',monospace}header{padding:16px 20px;border-bottom:1px solid #333}h1{margin:0;color:#00ffff;font-size:18px}.meta{margin-top:7px;color:#a6adbb;font-size:11px}.meta a{color:#66ccff}.news{margin-top:14px;border:1px solid #39444c}.news h2{margin:0;padding:10px 12px;color:#ffff00;font-size:14px;border-bottom:1px soli … [line shortened here: 1,145 characters; full line on GitHub]
</style>
</head>
<body>
<header>
<h1>GLOBALGRID2050 · UK RENEWABLES PIPELINE V2</h1>
<div class="meta">Updated 22 August 2026 · July 2026 DESNZ REPD · <a href="https://www.gov.uk/government/publications/renewable-energy-planning-database-quarterly-extract">Official source</a> · V1 retained unchanged</div>
<section class="news">
<h2>⚡ MAJOR PROJECT NEWS — SOLAR + STORAGE <span>Solar ≥50MW priority · BESS ≥300MW · curated 22 Aug 2026</span></h2>
<div class="grid">
<a class="story solar" href="https://www.gov.uk/government/news/beacon-fen-energy-park-development-consent-decision-announced" target="_blank"><b>SOLAR + BESS · 21 AUG 2026</b><h3>Beacon Fen Energy Park wins development consent</h3><p><strong>400MW solar + up to 600MVA BESS.</strong> Major Lincolnshire energy park approved.</p></a>
<a class="story bess" href="https://www.solarpowerportal.co.uk/battery-storage/1gwh-coalburn-1-battery-energy-storage-enters-operationsscotland" target="_blank"><b>BESS · 13 AUG 2026</b><h3>Coalburn 1 enters commercial operation</h3><p><strong>500MW / 1,000MWh.</strong> CIP and Alcemi Scottish battery now operational.</p></a>
<a class="story solar" href="https://www.gov.uk/government/news/one-earth-solar-farm-development-consent-decision-announced" target="_blank"><b>SOLAR · 8 JUL 2026</b><h3>One Earth Solar Farm granted development consent</h3><p><strong>>50MW solar + BESS.</strong> Nottinghamshire/Lincolnshire NSIP approved.</p></a>
<a class="story solar" href="https://www.gov.uk/government/news/dean-moor-solar-farm-development-consent-decision-announced" target="_blank"><b>SOLAR · 2 JUL 2026</b><h3>Dean Moor Solar Farm granted development consent</h3><p><strong>>50MW solar.</strong> Utility-scale scheme receives DESNZ approval.</p></a>
<a class="story bess" href="https://www.solarpowerportal.co.uk/energy-storage/battery-storage" target="_blank"><b>BESS · 31 JUL 2026</b><h3>Eku Energy acquires major UK battery project</h3><p><strong>300MW / 600MWh.</strong> Large-scale UK storage acquisition.</p></a>
<a class="story bess" href="https://www.solarpowerportal.co.uk/energy-storage/battery-storage" target="_blank"><b>BESS · 20 JUL 2026</b><h3>West Burton C reaches financial close</h3><p><strong>500MW BESS.</strong> Fidra Energy advances major battery project.</p></a>
</div>
</section>
</header>
<iframe src="dashboard.html" title="UK Renewables Pipeline dashboard"></iframe>
</body>
</html>Dashboard V4 Live
A web page in the UK renewables pipeline folder of GlobalGrid2050 that draws major project news, Renewable Energy Planning Database (REPD) master, solar and battery storage (BESS). Published at https://globalgrid2050.com/uk_renewables_pipeline/dashboard_v4_live.html.
renderglobalgrid2050 / uk_renewables_pipeline/dashboard_v4_live.html · lines 1–38 of 38 · Entry point · pattern title (shared by 5 files)
- What it does
- It draws major project news, REPD master, solar and battery storage (BESS). Defines esc, apply, title, loadNews. 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: solar, battery storage (BESS).
- Inputs & outputs
- In: JSON file major_project_news_v4.json; JSON file repd_master.json; form fields (user input). Out: downloaded file globalgrid2050_uk_renewables_pipeline_v4_; web page.
- Downstream impact
- Used directly by 74 files: GlobalGrid2050 — PipelineNews Intelligence Page (globalgrid2050, https://globalgrid2050.com/pipelinenews_intelligence/202609050309/); Testcode — Pipeline Page (globalgrid2050, https://globalgrid2050.com/testcode/202609060345/pipeline/); Dashboard V5 Live (globalgrid2050, https://globalgrid2050.com/uk_renewables_pipeline/dashboard_v5_live.html); Dashboard V6 Live (globalgrid2050, https://globalgrid2050.com/uk_renewables_pipeline/dashboard_v6_live.html); and 70 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_v4_live.html.
- What it achieves
- It loads news (`loadNews`) and is built from the esc step (`esc`) and the apply step (`apply`). UK Renewables Pipeline V4 Live. Its code works with 100 MW, 30 MW and 1 MW.
- Why it matters
- Loaded by the PipelineNews Intelligence page at https://globalgrid2050.com/pipelinenews_intelligence/202609050309/ and 71 other pages. Also imported by Compile V8 Fast and Compile Index, from PipelineNews.
- Application
- globalgrid2050 · uk_renewables_pipeline · page
- Uses
- 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 Dashboard V5 Live (link), linked from Dashboard V6 Live (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), and 66 more
- Produces
- esc, apply, title, loadNews
- Defines here
- esc, apply, title, loadNews
- 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_v4_live.html:1-38 · blob f356b37b1c6202150f3a5bb404a57ee329212f70 · 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 Renewables Pipeline V4 Live</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
:root{--bg:#000;--panel:#0b0e14;--line:#2f343d;--soft:#222;--text:#fff;--muted:#a6adbb;--accent:#00ffff;--ok:#00ff88;--solar:#ffff00;--bess:#ffae00;--on:#00ffff;--off:#0066ff}*{box-sizing:border-box;font-family:'Courier New',monospace;margin:0;padding:0}body{background:var(--bg);color:var(--text);display:flex;height:100vh;overflow:hidden;font-size:13px}.sidebar{width:250px;background:#0a0a0a;borde … [line shortened here: 4,081 characters; full line on GitHub]
</style>
</head>
<body>
<aside class="sidebar"><div class="brand"><b>GLOBALGRID2050</b><small>RENEWABLES PIPELINE V4 LIVE</small></div><nav class="nav"><a class="active" href="#">UK REPD DASH 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="#" … [line shortened here: 441 characters; full line on GitHub]
<main class="main">
<div class="header"><h1>ANALYTICS DASHBOARD V4</h1><div class="status">● LIVE REPD + MAJOR NEWS</div></div>
<div class="meta"><strong>V4 LIVE · 22 August 2026</strong><span>V1/V2/V3 data behaviour preserved.</span><span>Major news eligibility: solar ≥30MW · BESS ≥100MW.</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="highlights"><h2>⚡ MAJOR PROJECT NEWS — SOLAR + STORAGE <span id="newsMeta">loading matched headlines…</span></h2><div class="stories" id="stories"><div class="news-empty">Loading major-project news…</div></div></section>
<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 (>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><d … [line shortened here: 450 characters; full line on GitHub]
<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="search" placeholder="🔍 SEARCH OPERATOR OR SITE..." autocomplete="off"></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>STATUS</th><th>CAPACITY (MW)</th><th>NEWS</th></tr></thead><tbody id="tbody"></tbody></table></div>
</main>
<script>
let all=[],filtered=[],tech='All',status='All',county='All',search='',c1,c2,c3;const colors={'Solar':'#ffff00','Battery Storage':'#ffae00','Onshore Wind':'#00ffff','Offshore Wind':'#0066ff'};
function esc(v){return String(v??'').replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c]))}
function charts(){const o={responsive:true,maintainAspectRatio:false,circumference:180,rotation:270,cutout:'80%',plugins:{tooltip:{enabled:false},legend:{display:false}}};c1=new Chart(document.getElementById('g1'),{type:'doughnut',data:{datasets:[{data:[0,1],backgroundColor:['#ff00ff','#222'],borderWidth:0}]},options:o});c2=new Chart(document.getElementById('g2'),{type:'doughnut',data:{datasets:[{ … [line shortened here: 627 characters; full line on GitHub]
function gauges(d){const total=d.reduce((s,x)=>s+x.mw,0),n=d.length,max=n?Math.max(...d.map(x=>x.mw)):0,gt=all.reduce((s,x)=>s+x.mw,0)||1,gm=all.length?Math.max(...all.map(x=>x.mw)):1;document.getElementById('v1').textContent=total.toLocaleString(undefined,{maximumFractionDigits:0});document.getElementById('v2').textContent=n.toLocaleString();document.getElementById('v3').textContent=max.toLocaleS … [line shortened here: 637 characters; full line on GitHub]
function table(d){const tb=document.getElementById('tbody');tb.innerHTML='';d.forEach(x=>{const tr=document.createElement('tr'),q=encodeURIComponent(x.name+' '+x.cat),sub=[x.county,x.op].filter(Boolean).join(' | '),fc=x.cat==='Offshore Wind'?'#fff':'#000';tr.innerHTML=`<td class="site">${esc(x.name)}${sub?`<div class="mobile-extra">${esc(sub)}</div>`:''}</td><td class="hide-mobile">${esc(x.county| … [line shortened here: 765 characters; full line on GitHub]
function apply(){filtered=all.filter(x=>(tech==='All'||x.cat===tech)&&(status==='All'||x.status.includes(status))&&(county==='All'||x.county===county)&&(!search||x.op.includes(search)||x.name.toUpperCase().includes(search)));gauges(filtered);table(filtered)}
function title(s){return s?s.toLowerCase().split(' ').map(w=>w.charAt(0).toUpperCase()+w.slice(1)).join(' '):''}
function renderNews(payload){const box=document.getElementById('stories'),meta=document.getElementById('newsMeta'),items=Array.isArray(payload.items)?payload.items:[];const eligible=payload.eligible_projects==null?'REPD shortlist':Number(payload.eligible_projects).toLocaleString()+' eligible sites';meta.textContent=`solar ≥30MW · BESS ≥100MW · ${eligible} · updated ${String(payload.updated||'').sl … [line shortened here: 1,125 characters; full line on GitHub]
async function loadNews(){try{const r=await fetch('../dist/major_project_news_v4.json?v='+Date.now());if(!r.ok)throw new Error('news '+r.status);renderNews(await r.json())}catch(e){document.getElementById('stories').innerHTML='<div class="news-empty">Major-news feed unavailable. REPD dashboard remains live.</div>';document.getElementById('newsMeta').textContent='feed unavailable'} }
document.querySelectorAll('#tech .btn').forEach(b=>b.onclick=()=>{document.querySelectorAll('#tech .btn').forEach(x=>x.classList.remove('active'));b.classList.add('active');tech=b.dataset.tech;apply()});document.querySelectorAll('#status .btn').forEach(b=>b.onclick=()=>{document.querySelectorAll('#status .btn').forEach(x=>x.classList.remove('active'));b.classList.add('active');status=b.dataset.sta … [line shortened here: 1,179 characters; full line on GitHub]
window.onload=()=>{charts();loadNews();fetch('../dist/repd_master.json?v='+Date.now()).then(r=>{if(!r.ok)throw new Error('REPD '+r.status);return r.json()}).then(g=>{const cs=new Set();(g.features||[]).forEach(f=>{const p=f.properties||{},mw=parseFloat(p.capacity)||0;if(mw<1)return;const raw=String(p.raw_tech||'').toLowerCase();let cat='Other';if(p.tech==='solar'||p.tech==='solar_roof')cat='Solar' … [line shortened here: 1,273 characters; full line on GitHub]
</script>
</body>
</html>Dashboard V5 Live
A web page in the UK renewables pipeline folder of GlobalGrid2050 that draws major project news, Renewable Energy Planning Database (REPD) master, solar and battery storage (BESS). Published at https://globalgrid2050.com/uk_renewables_pipeline/dashboard_v5_live.html.
renderglobalgrid2050 / uk_renewables_pipeline/dashboard_v5_live.html · lines 1–68 of 68 · Entry point · pattern title (shared by 5 files)
- What it does
- It draws major project news, REPD master, solar and battery storage (BESS). Defines 9 functions or classes, including esc, normProject, apply, title, financeEvent. 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: solar, battery storage (BESS).
- Inputs & outputs
- In: JSON file major_project_news_v5.json; JSON file repd_master.json; form fields (user input). Out: downloaded file globalgrid2050_uk_renewables_pipeline_v5_; web page.
- Downstream impact
- Used directly by 74 files: GlobalGrid2050 — PipelineNews Intelligence Page (globalgrid2050, https://globalgrid2050.com/pipelinenews_intelligence/202609050309/); Testcode — Pipeline Page (globalgrid2050, https://globalgrid2050.com/testcode/202609060345/pipeline/); Dashboard V6 Live (globalgrid2050, https://globalgrid2050.com/uk_renewables_pipeline/dashboard_v6_live.html); UK Renewables Pipeline — V7 Page (globalgrid2050, https://globalgrid2050.com/uk_renewables_pipeline/v7/); and 70 more. Reached from 116 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_v5_live.html.
- What it achieves
- It fetches news payload (`fetchNewsPayload`) and loads news (`loadNews`). UK Solar + Storage Daily V5. 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 Performance Audit, Compile V8 Fast and Compile Index, from PipelineNews.
- Application
- globalgrid2050 · uk_renewables_pipeline · page
- Uses
- 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 Dashboard V6 Live (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), and 66 more
- Produces
- esc, normProject, apply, title, financeEvent, validNewsPayload, newsPayloadTime, fetchNewsPayload, loadNews
- Defines here
- esc, normProject, apply, title, financeEvent, validNewsPayload, newsPayloadTime, fetchNewsPayload, loadNews
- 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_v5_live.html:1-68 · blob ac33daf67dba8951527b06761ab587003a19f60e · 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 V5</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
:root{--bg:#000;--panel:#0b0e14;--line:#2f343d;--soft:#222;--text:#fff;--muted:#a6adbb;--accent:#00ffff;--ok:#00ff88;--solar:#ffff00;--bess:#ffae00;--off:#0066ff}*{box-sizing:border-box;font-family:'Courier New',monospace;margin:0;padding:0}html,body{background:var(--bg);color:var(--text)}body{display:flex;height:100vh;overflow:hidden;font-size:13px}::-webkit-scrollbar{width:10px;height:10px}::-we … [line shortened here: 6,244 characters; full line on GitHub]
</style>
</head>
<body>
<aside class="sidebar"><div class="brand"><b>GLOBALGRID2050</b><small>UK SOLAR + STORAGE DAILY · V5</small></div><nav class="nav"><a class="active" href="#">V5 NEWSPAPER</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_g … [line shortened here: 479 characters; full line on GitHub]
<main class="main">
<div class="header"><h1>UK RENEWABLES PIPELINE V5</h1><div class="status">● DAILY NEWSPAPER + LIVE REPD</div></div>
<div class="meta"><strong>V5 LIVE · 22 August 2026</strong><span>V1–V4 behaviour retained.</span><span>Newspaper universe: solar >49 MWp · BESS >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&A</button><input id="newsSearch" pla … [line shortened here: 455 characters; full line on GitHub]
<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 (>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><d … [line shortened here: 450 characters; full line on GitHub]
<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>
let all=[],filtered=[],tech='All',status='All',county='All',search='',c1,c2,c3,newsItems=[],newsMode='ALL',newsQuery='';
const colors={'Solar':'#ffff00','Battery Storage':'#ffae00','Onshore Wind':'#00ffff','Offshore Wind':'#0066ff'};
function esc(v){return String(v??'').replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c]))}
function normProject(v){return String(v||'').toLowerCase().replace(/&/g,' and ').replace(/[^a-z0-9]+/g,' ').replace(/\s+/g,' ').trim()}
function signalForProject(name){const n=normProject(name),hit=newsItems.find(i=>normProject(i.project)===n);if(!hit)return {label:'—',cls:'none',note:'no matched headline'};const e=String(hit.event||'PROJECT UPDATE').toUpperCase();if(e==='CONSENT')return {label:'APPROVED*',cls:'approved',note:`headline ${hit.published||''}`};if(e==='OPERATIONAL')return {label:'OPERATIONAL*',cls:'operational',note: … [line shortened here: 773 characters; full line on GitHub]
function charts(){const o={responsive:true,maintainAspectRatio:false,circumference:180,rotation:270,cutout:'80%',plugins:{tooltip:{enabled:false},legend:{display:false}}};c1=new Chart(document.getElementById('g1'),{type:'doughnut',data:{datasets:[{data:[0,1],backgroundColor:['#ff00ff','#222'],borderWidth:0}]},options:o});c2=new Chart(document.getElementById('g2'),{type:'doughnut',data:{datasets:[{ … [line shortened here: 627 characters; full line on GitHub]
function gauges(d){const total=d.reduce((s,x)=>s+x.mw,0),n=d.length,max=n?Math.max(...d.map(x=>x.mw)):0,gt=all.reduce((s,x)=>s+x.mw,0)||1,gm=all.length?Math.max(...all.map(x=>x.mw)):1;document.getElementById('v1').textContent=total.toLocaleString(undefined,{maximumFractionDigits:0});document.getElementById('v2').textContent=n.toLocaleString();document.getElementById('v3').textContent=max.toLocaleS … [line shortened here: 637 characters; full line on GitHub]
function table(d){const tb=document.getElementById('tbody');tb.innerHTML='';d.forEach(x=>{const tr=document.createElement('tr'),q=encodeURIComponent(x.name+' '+x.cat),sub=[x.county,x.op].filter(Boolean).join(' | '),fc=x.cat==='Offshore Wind'?'#fff':'#000',sig=signalForProject(x.name);tr.innerHTML=`<td class="site">${esc(x.name)}${sub?`<div class="mobile-extra">${esc(sub)}</div>`:''}</td><td class= … [line shortened here: 927 characters; full line on GitHub]
function apply(){filtered=all.filter(x=>(tech==='All'||x.cat===tech)&&(status==='All'||x.status.includes(status))&&(county==='All'||x.county===county)&&(!search||x.op.includes(search)||x.name.toUpperCase().includes(search)));gauges(filtered);table(filtered)}
function title(s){return s?s.toLowerCase().split(' ').map(w=>w.charAt(0).toUpperCase()+w.slice(1)).join(' '):''}
function financeEvent(e){return ['FINANCIAL CLOSE','ACQUISITION'].includes(String(e||'').toUpperCase())}
function newsMatch(i){const e=String(i.event||'').toUpperCase(),t=String(i.technology||'').toUpperCase();if(newsMode==='SOLAR'&&t!=='SOLAR')return false;if(newsMode==='BESS'&&t!=='BESS')return false;if(newsMode==='CONSENT'&&e!=='CONSENT')return false;if(newsMode==='CONSTRUCTION'&&e!=='CONSTRUCTION')return false;if(newsMode==='OPERATIONAL'&&e!=='OPERATIONAL')return false;if(newsMode==='FINANCE'&&!f … [line shortened here: 589 characters; full line on GitHub]
function drawNews(){const box=document.getElementById('stories'),rows=newsItems.filter(newsMatch);if(!rows.length){box.innerHTML='<div class="news-empty">No headlines match this newspaper filter.</div>';return}box.innerHTML=rows.map(i=>{const cls=i.technology==='bess'?'bess':'solar',cap=Number(i.capacity_mw||0),conf=Number(i.confidence||0);return `<a class="story ${cls}" href="${esc(i.url)}" targe … [line shortened here: 865 characters; full line on GitHub]
function renderNews(payload){newsItems=Array.isArray(payload.items)?payload.items:[];const eligible=payload.eligible_projects==null?'REPD universe pending first refresh':Number(payload.eligible_projects).toLocaleString()+' eligible projects';document.getElementById('newsMeta').textContent=`${newsItems.length} headlines · ${eligible} · ${String(payload.updated||'').slice(0,10)}`;drawNews();if(all.l … [line shortened here: 422 characters; full line on GitHub]
function validNewsPayload(p){return p&&Array.isArray(p.items)&&Number.isFinite(Number(p.headline_count??p.items.length))}
function newsPayloadTime(p){const t=Date.parse(String(p&&p.updated||''));return Number.isFinite(t)?t:0}
async function fetchNewsPayload(label,url){const r=await fetch(url,{cache:'no-store'});if(!r.ok)throw new Error(label+' '+r.status);const data=await r.json();if(!validNewsPayload(data))throw new Error(label+' invalid payload');return {label,data}}
async function loadNews(){
const stamp=Date.now();
const sources=[
['Pages','../dist/major_project_news_v5.json?v='+stamp],
['GitHub main','https://raw.githubusercontent.com/Ventusltd/globalgrid2050/main/dist/major_project_news_v5.json?v='+stamp]
];
const settled=await Promise.allSettled(sources.map(([label,url])=>fetchNewsPayload(label,url)));
const good=settled.filter(x=>x.status==='fulfilled').map(x=>x.value);
if(!good.length){document.getElementById('stories').innerHTML='<div class="news-empty">Daily newspaper feed unavailable. REPD analytics below remain live.</div>';document.getElementById('newsMeta').textContent='feed unavailable';return}
good.sort((a,b)=>newsPayloadTime(b.data)-newsPayloadTime(a.data)||((b.data.items||[]).length-(a.data.items||[]).length));
const best=good[0];
renderNews(best.data);
const meta=document.getElementById('newsMeta');
meta.textContent += ' · '+best.label;
}
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.news;drawNews()});document.getElementById('newsSearch').oninput=e=>{newsQuery=e.target.value.trim().toUpperCase();drawNews()};
document.querySelectorAll('#tech .btn').forEach(b=>b.onclick=()=>{document.querySelectorAll('#tech .btn').forEach(x=>x.classList.remove('active'));b.classList.add('active');tech=b.dataset.tech;apply()});document.querySelectorAll('#status .btn').forEach(b=>b.onclick=()=>{document.querySelectorAll('#status .btn').forEach(x=>x.classList.remove('active'));b.classList.add('active');status=b.dataset.sta … [line shortened here: 1,286 characters; full line on GitHub]
window.onload=()=>{charts();loadNews();fetch('../dist/repd_master.json?v='+Date.now()).then(r=>{if(!r.ok)throw new Error('REPD '+r.status);return r.json()}).then(g=>{const cs=new Set();(g.features||[]).forEach(f=>{const p=f.properties||{},mw=parseFloat(p.capacity)||0;if(mw<1)return;const raw=String(p.raw_tech||'').toLowerCase();let cat='Other';if(p.tech==='solar'||p.tech==='solar_roof')cat='Solar' … [line shortened here: 1,273 characters; full line on GitHub]
</script>
</body>
</html>