GLOBALGRID2050 / EXPLORE CODE

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

Canonical Project Table and 5 more files

A JavaScript module in the plugins folder of GlobalGrid2050 that works with the Renewable Energy Planning Database (REPD) register.

686 lines of JavaScript and HTML from globalgrid2050, in 6 files. Topic: Electricity markets and data pipelines. Section 963 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. Canonical Project Table transform · globalgrid2050 / uk_renewables_pipeline/v7/scripts/plugins/canonical-project-table.js lines 1–283
  2. Gauges render · globalgrid2050 / uk_renewables_pipeline/v7/scripts/plugins/gauges.js lines 1–48
  3. Projects render · globalgrid2050 / uk_renewables_pipeline/v7/scripts/plugins/projects.js lines 1–71
  4. UK Renewables Pipeline — V8 Page render · globalgrid2050 / uk_renewables_pipeline/v8/index.html lines 1–132
  5. UK Renewables Pipeline — V8 other · globalgrid2050 / uk_renewables_pipeline/v8/scripts/app.js lines 1–31
  6. Projects interaction · globalgrid2050 / uk_renewables_pipeline/v8/scripts/plugins/projects.js lines 1–121

Canonical Project Table

A JavaScript module in the plugins folder of GlobalGrid2050 that works with the Renewable Energy Planning Database (REPD) register.

transformglobalgrid2050 / uk_renewables_pipeline/v7/scripts/plugins/canonical-project-table.js · lines 1–283 of 283 · pattern buildCanonicalProjectTableView (shared by 3 files)

What it does
It calculates the REPD register. Defines 13 functions or classes, including invariant, deepFreeze, hasValidatedModel, isCanonicalOrder, displayOfficial.
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.
Inputs & outputs
Coordinate systems named: OSGB36 / EPSG:27700 (British National Grid).
Downstream impact
Used directly by 3 files: Canonical Project Export (globalgrid2050); 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
It builds canonical news search URL (`buildCanonicalNewsSearchUrl`), validates published metadata (`validatePublishedMetadata`) and builds canonical project table view (`buildCanonicalProjectTableView`). Defines `invariant`, `deepFreeze`, `hasValidatedModel` and 10 more.
Why it matters
Imported by Canonical Project Export and Projects. Checked by Check V8 1 Mvp.
Application
globalgrid2050 · uk_renewables_pipeline/v7/scripts/plugins · JavaScript module
Uses
none found
Used by
imported by Canonical Project Export (import), imported by Projects (import), imported by Check V8 1 Mvp (import)
Produces
buildCanonicalNewsSearchUrl, buildCanonicalProjectTableView
Defines here
invariant, deepFreeze, hasValidatedModel, isCanonicalOrder, displayOfficial, displayCapacity, sameFlatRecord, buildCanonicalNewsSearchUrl, legacyNewsFor, validatePublishedMetadata, evidenceFor, rowFor, buildCanonicalProjectTableView
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-table.js:1-283 · blob a581ade3fd318c51cbaeeb03c6c82efa400b5b4e · 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
const CAPACITY_BASIS = "official_repd_record_capacity_not_development_deduplicated";
const NO_RELATIONSHIPS = "none recorded";
const LEGACY_NEWS_AUTHORITY = "external legacy intelligence — unverified";

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

function deepFreeze(value) {
  if (!value || typeof value !== "object" || Object.isFrozen(value)) return value;
  Object.values(value).forEach(deepFreeze);
  return Object.freeze(value);
}

function hasValidatedModel(state) {
  return Boolean(
    state?.contract
    && state?.metadata
    && Array.isArray(state.all)
    && state.all.length > 0
    && Array.isArray(state.filtered),
  );
}

function isCanonicalOrder(projects) {
  return projects.every((project, index) => {
    if (index === 0) return true;
    const previous = projects[index - 1];
    return previous.capacity_mw > project.capacity_mw
      || (
        previous.capacity_mw === project.capacity_mw
        && previous.gg_project_id.localeCompare(project.gg_project_id) <= 0
      );
  });
}

function displayOfficial(value, missingValueLabel) {
  return value === null || value === undefined || value === "" ? missingValueLabel : String(value);
}

function displayCapacity(project) {
  return `${new Intl.NumberFormat("en-GB", { maximumFractionDigits: 2 }).format(project.capacity_mw)} ${project.capacity_unit}`;
}

function sameFlatRecord(left, right) {
  if (!left || !right || typeof left !== "object" || typeof right !== "object") return false;
  const keys = Object.keys(left).sort();
  return keys.join("\n") === Object.keys(right).sort().join("\n")
    && keys.every((key) => left[key] === right[key]);
}

export function buildCanonicalNewsSearchUrl(project) {
  const url = new URL("https://www.google.com/search");
  url.searchParams.set("q", `${project.name} ${project.technology_label} UK`);
  url.searchParams.set("tbm", "nws");
  return url.href;
}

function legacyNewsFor(project, resolver) {
  if (typeof resolver !== "function") {
    return {
      authority: LEGACY_NEWS_AUTHORITY,
      verified: false,
      status: "not_evaluated_in_isolated_v7_2",
      label: "not evaluated",
      note: "Trusted project-event binding is V7.3 scope",
    };
  }
  try {
    const result = resolver(project);
    const label = typeof result?.label === "string" && result.label.trim()
      ? result.label.trim()
      : "no matched legacy headline";
    const note = typeof result?.note === "string" && result.note.trim()
      ? result.note.trim()
      : "No legacy-news note supplied";
    return {
      authority: LEGACY_NEWS_AUTHORITY,
      verified: false,
      status: label === "no matched legacy headline" ? "no_match" : "legacy_match_unverified",
      label,
      note,
    };
  } catch {
    return {
      authority: LEGACY_NEWS_AUTHORITY,
      verified: false,
      status: "legacy_news_unavailable",
      label: "legacy news unavailable",
      note: "Legacy news resolver failed",
    };
  }
}

function validatePublishedMetadata(state) {
  const expected = state.contract.canonical_universe.published_snapshot;
  const actual = state.metadata;
  invariant(expected && typeof expected === "object", "published snapshot contract is absent");
  for (const field of [
    "projects_sha256",
    "source_identity_sha256",
    "source_coordinate_fixture_sha256",
    "source_workbook_sha256",
  ]) {
    invariant(actual[field] === expected[field], `${field} is not the contracted published value`);
  }
  invariant(sameFlatRecord(actual.source_provenance, expected.source_provenance), "source provenance is not the contracted published value");
  invariant(sameFlatRecord(actual.geometry_policy, expected.geometry_policy), "geometry policy is not the contracted published value");
}

function evidenceFor(project, state, inScopeRefs, missingValueLabel) {
  const milestoneFields = state.contract.interface.official_milestone_fields;
  const milestones = Object.fromEntries(milestoneFields.map((field) => [
    field,
    {
      value: project[field],
      display: displayOfficial(project[field], missingValueLabel),
      authority: "official REPD field",
    },
  ]));
  const relationships = project.relationships.map((relationship) => ({
    repdRef: relationship.repd_ref,
    type: relationship.type,
    sourceField: relationship.source_field,
    targetInCurrentUniverse: inScopeRefs.has(relationship.repd_ref),
  }));
  const metadata = state.metadata;
  return {
    identity: {
      ggDevelopmentId: project.gg_development_id,
      status: project.identity_status,
      confidence: project.identity_confidence,
    },
    officialPlanning: {
      authority: project.planning_authority,
      repdRecordUpdated: {
        value: project.repd_record_updated,
        display: displayOfficial(project.repd_record_updated, missingValueLabel),
      },
      milestones,
    },
    lifecycle: {
      value: project.lifecycle,
      view: project.lifecycle_view,
      derived: true,
      note: "Derived lifecycle; does not replace the official REPD status",
    },
    relationships: {
      items: relationships,
      display: relationships.length ? null : NO_RELATIONSHIPS,
      directRelatedRepdRefs: [...project.direct_related_repd_refs],
      planningSiblingRepdRefs: [...project.planning_sibling_repd_refs],
      developmentRepdRefs: [...project.development_repd_refs],
      outOfScopeTargetsRemainContextOnly: true,
    },
    geometry: {
      status: project.geometry_status,
      easting: project.easting,
      northing: project.northing,
      longitude: project.longitude,
      latitude: project.latitude,
      coordinateSource: project.coordinate_source,
      policy: { ...metadata.geometry_policy },
      contextOnly: true,
    },
    provenance: {
      kind: "published snapshot metadata",
      dataset: metadata.source_provenance.dataset,
      sourcePath: state.source,
      sourceRow: project.source_row,
      projectsSha256: metadata.projects_sha256,
      sourceIdentitySha256: metadata.source_identity_sha256,
      sourceCoordinateFixtureSha256: metadata.source_coordinate_fixture_sha256,
      sourceWorkbookSha256: metadata.source_workbook_sha256,
      canonicalIdentitySourceXlsxSha256: metadata.source_provenance.canonical_identity_source_xlsx_sha256,
      coordinateWorkbookCopySha256: metadata.source_provenance.coordinate_workbook_copy_sha256,
      reconciliation: metadata.source_provenance.reconciliation,
      note: "Published snapshot metadata; not recomputed by the browser",
    },
  };
}

function rowFor(project, state, inScopeRefs, resolver, missingValueLabel) {
  const legacyNews = legacyNewsFor(project, resolver);
  return {
    key: project.gg_project_id,
    primary: {
      project: project.name,
      location: [project.county, project.region, project.country].filter(Boolean).join(", "),
      operator: project.operator,
      technology: project.technology_label,
      officialStatus: project.status,
      capacity: {
        value: project.capacity_mw,
        unit: project.capacity_unit,
        display: displayCapacity(project),
        authority: "official REPD record",
      },
      repdRef: project.repd_ref,
      ggProjectId: project.gg_project_id,
      planningReference: displayOfficial(project.planning_application_reference, missingValueLabel),
      legacyNews,
      news: {
        label: "Search news",
        url: buildCanonicalNewsSearchUrl(project),
        role: "external search context; not canonical evidence",
      },
    },
    evidence: evidenceFor(project, state, inScopeRefs, missingValueLabel),
  };
}

export function buildCanonicalProjectTableView(state, { legacySignalResolver } = {}) {
  if (!hasValidatedModel(state)) {
    return deepFreeze({
      available: false,
      status: state?.status || "idle",
      error: state?.error || null,
      columns: [],
      evidenceFields: [],
      rows: null,
      rowCount: null,
      missingValueLabel: null,
      capacityBasis: CAPACITY_BASIS,
    });
  }

  const snapshot = Object.freeze({
    all: state.all,
    filtered: state.filtered,
    contract: state.contract,
    metadata: state.metadata,
    source: state.source,
    status: state.status,
    error: state.error,
  });
  validatePublishedMetadata(snapshot);
  const primaryFields = snapshot.contract.interface.primary_table_fields;
  invariant(Array.isArray(primaryFields) && primaryFields.length === 11, "11-column table contract is absent");
  invariant(
    primaryFields.map((field) => field.label).join("\n")
      === snapshot.contract.interface.primary_table_columns.join("\n"),
    "table field labels do not match the frozen column order",
  );
  const canonicalById = new Map(snapshot.all.map((project) => [project.gg_project_id, project]));
  const inScopeRefs = new Set(snapshot.all.map((project) => project.repd_ref));
  invariant(
    snapshot.filtered.every((project) => canonicalById.get(project.gg_project_id) === project),
    "filtered rows are not exact canonical project objects",
  );
  invariant(
    new Set(snapshot.filtered.map((project) => project.gg_project_id)).size === snapshot.filtered.length,
    "filtered rows contain a duplicate canonical project",
  );
  invariant(isCanonicalOrder(snapshot.filtered), "filtered rows are not in canonical capacity/project-ID order");
  const missingValueLabel = snapshot.contract.interface.missing_value_label;
  const rows = snapshot.filtered.map((project) => rowFor(
    project,
    snapshot,
    inScopeRefs,
    legacySignalResolver,
    missingValueLabel,
  ));
  invariant(
    state.all === snapshot.all
      && state.filtered === snapshot.filtered
      && state.contract === snapshot.contract
      && state.metadata === snapshot.metadata
      && state.source === snapshot.source,
    "canonical state changed while the table view was being built",
  );
  return deepFreeze({
    available: true,
    status: snapshot.status,
    error: snapshot.error,
    columns: primaryFields.map((field) => ({ ...field })),
    evidenceFields: [...snapshot.contract.interface.evidence_fields],
    rows,
    rowCount: rows.length,
    missingValueLabel,
    capacityBasis: CAPACITY_BASIS,
  });
}

Gauges

A JavaScript module in the plugins folder of GlobalGrid2050. It is built from the initialise gauges helper (`initialiseGauges`).

renderglobalgrid2050 / uk_renewables_pipeline/v7/scripts/plugins/gauges.js · lines 1–48 of 48 · pattern initialiseGauges (shared by 7 files)

What it does
Defines initialiseGauges, updateGauges. 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.
Downstream impact
Used directly by 1 file: UK Renewables Pipeline — V7 (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 `initialiseGauges` and `updateGauges`.
Why it matters
Imported by UK Renewables Pipeline — V7.
Application
globalgrid2050 · uk_renewables_pipeline/v7/scripts/plugins · JavaScript module
Uses
State (import)
Used by
imported by UK Renewables Pipeline — V7 (import)
Produces
initialiseGauges, updateGauges
Defines here
initialiseGauges, updateGauges
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/gauges.js:1-48 · blob fb2b97bcf3a29ceef05c462afd350d5a1666a7ec · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
import { state } from "../core/state.js";

export function initialiseGauges() {
  const options = {
    responsive: true,
    maintainAspectRatio: false,
    circumference: 180,
    rotation: 270,
    cutout: "80%",
    plugins: { tooltip: { enabled: false }, legend: { display: false } },
  };

  state.charts.capacity = new Chart(document.getElementById("g1"), {
    type: "doughnut",
    data: { datasets: [{ data: [0, 1], backgroundColor: ["#ff00ff", "#222"], borderWidth: 0 }] },
    options,
  });
  state.charts.projects = new Chart(document.getElementById("g2"), {
    type: "doughnut",
    data: { datasets: [{ data: [0, 1], backgroundColor: ["#00ffff", "#222"], borderWidth: 0 }] },
    options,
  });
  state.charts.largest = new Chart(document.getElementById("g3"), {
    type: "doughnut",
    data: { datasets: [{ data: [0, 1], backgroundColor: ["#00ff88", "#222"], borderWidth: 0 }] },
    options,
  });
}

export function updateGauges(projects) {
  const total = projects.reduce((sum, project) => sum + project.mw, 0);
  const count = projects.length;
  const largest = count ? Math.max(...projects.map((project) => project.mw)) : 0;
  const globalTotal = state.all.reduce((sum, project) => sum + project.mw, 0) || 1;
  const globalLargest = state.all.length ? Math.max(...state.all.map((project) => project.mw)) : 1;

  document.getElementById("v1").textContent = total.toLocaleString(undefined, { maximumFractionDigits: 0 });
  document.getElementById("v2").textContent = count.toLocaleString();
  document.getElementById("v3").textContent = largest.toLocaleString(undefined, { maximumFractionDigits: 1 });

  const { capacity, projects: projectGauge, largest: largestGauge } = state.charts;
  capacity.data.datasets[0].data = [total, Math.max(globalTotal - total, 0)];
  projectGauge.data.datasets[0].data = [count, Math.max(state.all.length - count, 0)];
  largestGauge.data.datasets[0].data = [largest, Math.max(globalLargest - largest, 0)];
  capacity.update();
  projectGauge.update();
  largestGauge.update();
}

Projects

A JavaScript module in the plugins folder of GlobalGrid2050 that binds project controls (`bindProjectControls`) (units: MW), covering wind, the Renewable Energy Planning Database (REPD) register, solar and battery storage (BESS).

renderglobalgrid2050 / uk_renewables_pipeline/v7/scripts/plugins/projects.js · lines 1–71 of 71 · pattern normaliseProject (shared by 2 files)

What it does
It draws wind, the REPD register, solar and battery storage (BESS). Defines category, normaliseProject, loadProjects, bindProjectControls. 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: wind, the REPD register, solar, battery storage (BESS).
Downstream impact
Used directly by 1 file: UK Renewables Pipeline — V7 (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
It normalises project (`normaliseProject`) and binds project controls (`bindProjectControls`). Defines `category`, `normaliseProject`, `loadProjects` and 1 more.
Why it matters
Imported by UK Renewables Pipeline — V7.
Application
globalgrid2050 · uk_renewables_pipeline/v7/scripts/plugins · JavaScript module
Uses
State (import), Testcode — Pipeline (import), Project Export (import), Project Filters (import)
Used by
imported by UK Renewables Pipeline — V7 (import), mentioned in Standalone (comment link)
Produces
loadProjects, bindProjectControls
Defines here
category, normaliseProject, loadProjects, bindProjectControls
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/projects.js:1-71 · blob bc1a7df61832f87a0cb6f23866b345bda9b9f22a · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom, network · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
import { DATA_SOURCES, state } from "../core/state.js";
import { titleCase } from "../core/utils.js";
import { bindProjectExport } from "./project-export.js";
import { applyProjectFilters, bindProjectFilters } from "./project-filters.js";

function category(properties) {
  const rawTechnology = String(properties.raw_tech || "").toLowerCase();
  if (properties.tech === "solar" || properties.tech === "solar_roof") return "Solar";
  if (properties.tech === "bess") return "Battery Storage";
  if (properties.tech === "wind") return rawTechnology.includes("offshore") ? "Offshore Wind" : "Onshore Wind";
  return "Other";
}

function normaliseProject(feature) {
  const properties = feature.properties || {};
  const mw = parseFloat(properties.capacity) || 0;
  if (mw < 1) return null;
  const projectCategory = category(properties);
  if (projectCategory === "Other") return null;

  let county = titleCase(String(
    properties.county
    || properties.County
    || properties.lpa
    || properties.local_planning_authority
    || properties.region
    || "",
  ).trim());
  if (["nan", "none"].includes(county.toLowerCase())) county = "";

  let operator = String(properties.operator || properties.Operator || "").trim().toUpperCase();
  if (["NAN", "NONE"].includes(operator)) operator = "";

  return {
    name: properties.name || "Unknown Site",
    county,
    op: operator,
    cat: projectCategory,
    status: titleCase(properties.status || "Unknown"),
    mw,
  };
}

export async function loadProjects() {
  try {
    const response = await fetch(`${DATA_SOURCES.repd}?v=${Date.now()}`);
    if (!response.ok) throw new Error(`REPD ${response.status}`);
    const geojson = await response.json();
    const counties = new Set();
    state.all = (geojson.features || []).map(normaliseProject).filter(Boolean);
    state.all.forEach((project) => {
      if (project.county) counties.add(project.county);
    });
    state.all.sort((left, right) => right.mw - left.mw);
    [...counties].sort().forEach((county) => {
      const option = document.createElement("option");
      option.value = county;
      option.textContent = `📍 ${county}`;
      document.getElementById("county").appendChild(option);
    });
    applyProjectFilters();
  } catch (error) {
    console.error(error);
    document.getElementById("tbody").innerHTML = '<tr><td colspan="8" style="text-align:center;color:#ff6666">Error loading REPD data.</td></tr>';
  }
}

export function bindProjectControls() {
  bindProjectFilters();
  bindProjectExport();
}

UK Renewables Pipeline — V8 Page

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

renderglobalgrid2050 / uk_renewables_pipeline/v8/index.html · lines 1–132 of 132 · Entry point

What it does
It draws battery storage (BESS) and the REPD register. 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: battery storage (BESS), the REPD register. README: "Visible V8 labels and V7 fallback link in `index.html`."
Inputs & outputs
In: form fields (user input). Out: web page.
Downstream impact
Used directly by 24 files: GlobalGrid2050 — PipelineNews Intelligence Page (globalgrid2050, https://globalgrid2050.com/pipelinenews_intelligence/202609050309/); Testcode — Pipeline Page (globalgrid2050, https://globalgrid2050.com/testcode/202609060345/pipeline/); Check V8 1 Mvp (globalgrid2050); UK Renewables Pipeline — V9 4 Page (globalgrid2050, https://globalgrid2050.com/uk_renewables_pipeline/v9.4/); and 20 more. Reached from 164 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/v8/.
What it achieves
UK Solar + Storage Daily V8.1. Its code works with 99 MW.
Why it matters
Loaded by the PipelineNews Intelligence page at https://globalgrid2050.com/pipelinenews_intelligence/202609050309/ and 19 other pages. Also imported by Compile V8 Fast, Compile Index and Estate Menu, from PipelineNews and Spiders. Checked by Check V8 1 Mvp.
Application
globalgrid2050 · uk_renewables_pipeline/v8 · page
Uses
Mobile (stylesheet), V8 (stylesheet), UK Renewables Pipeline — V7 Page (link), Dashboard V6 Live (link), Dashboard V5 Live (link), Dashboard V4 Live (link), Dashboard V2 2026 08 22 (link), Dashboard (link), and 2 more, 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), referenced by Check V8 1 Mvp (new URL import.meta.url), 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), linked from UK Renewables Pipeline — V9 6 2 Page (link), and 16 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/v8/index.html:1-132 · blob 80fe6ffe8aa00cf3c549d982d939c0e7275651a9 · 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 V8.1</title>
  <link rel="stylesheet" href="styles/v7.css">
  <link rel="stylesheet" href="styles/mobile.css">
  <link rel="stylesheet" href="styles/v8.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 · V8.1 MVP</small>
    </div>
    <nav class="nav">
      <a class="active" href="#">V8.1 MVP</a>
      <a href="../v7/">V7 FALLBACK</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 SOLAR + BESS PIPELINE V8.1</h1>
      <div class="status">● CANONICAL MVP · V7 FALLBACK PRESERVED</div>
    </div>
    <div class="meta">
      <strong>V8.1 MVP · 23 August 2026</strong>
      <span>Canonical DESNZ REPD Q2 2026 spine: 766 records across 718 developments.</span>
      <span>384 solar &gt;49 MWp · 382 BESS &gt;99 MW · wind excluded.</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>Legacy V5 newspaper · project bindings unverified</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">CANONICAL REPD PIPELINE ANALYTICS</h2>
    <div class="gauges">
      <div class="card">
        <h3>FILTERED SOLAR CAPACITY (MWp)</h3>
        <div class="chart"><canvas id="g1"></canvas><div class="value" id="v1">0</div></div>
      </div>
      <div class="card">
        <h3>FILTERED BESS CAPACITY (MW)</h3>
        <div class="chart"><canvas id="g2"></canvas><div class="value" id="v2">0</div></div>
      </div>
      <div class="card">
        <h3>FILTERED PROJECT RECORDS</h3>
        <div class="chart"><canvas id="g3"></canvas><div class="value" id="v3">0</div></div>
      </div>
      <div class="card">
        <h3>LARGEST RECORD CAPACITY</h3>
        <div class="chart"><canvas id="g4"></canvas><div class="value" id="v4">0</div></div>
      </div>
    </div>

    <div class="filters" id="tech">
      <button class="btn active" data-technology="all">ALL TECH</button>
      <button class="btn" data-technology="solar">SOLAR</button>
      <button class="btn" data-technology="bess">BESS</button>
    </div>
    <div class="filters" id="status">
      <button class="btn active" data-official-status="All">ALL STATUS</button>
      <button class="btn" data-official-status="Operational">OPERATIONAL</button>
      <button class="btn" data-official-status="Under Construction">CONSTRUCTING</button>
      <button class="btn" data-official-status="Awaiting Construction">AWAITING</button>
      <button class="btn" data-official-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 PROJECT / REPD / GLOBALGRID / PLANNING..." autocomplete="off">
    </div>
    <div class="meta">
      <strong>STATUS DISCIPLINE</strong>
      <span><b>REPD STATUS AND CAPACITY</b> are official record facts. <b>LEGACY NEWS SIGNAL</b> is unverified V5 intelligence and never changes or confirms them.</span>
    </div>
    <div class="tablewrap">
      <table>
        <thead>
          <tr>
            <th>SITE NAME</th>
            <th class="hide-mobile">LOCATION</th>
            <th class="hide-mobile">OPERATOR</th>
            <th>TECHNOLOGY</th>
            <th>OFFICIAL REPD STATUS</th>
            <th>OFFICIAL CAPACITY</th>
            <th>REPD REF</th>
            <th>GLOBALGRID ID</th>
            <th>PLANNING REF</th>
            <th>LEGACY NEWS SIGNAL</th>
            <th>NEWS SEARCH</th>
          </tr>
        </thead>
        <tbody id="tbody"></tbody>
      </table>
    </div>
  </main>
  <script type="module" src="scripts/app.js"></script>
</body>
</html>

UK Renewables Pipeline — V8

A JavaScript module in the scripts folder of GlobalGrid2050.

otherglobalgrid2050 / uk_renewables_pipeline/v8/scripts/app.js · lines 1–31 of 31 · 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 — V8 Page (globalgrid2050, https://globalgrid2050.com/uk_renewables_pipeline/v8/). Reached from 185 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/v8/.
Application
globalgrid2050 · uk_renewables_pipeline/v8/scripts · JavaScript module
Uses
Gauges (import), Newspaper (import), Projects (import), Plugin Host (import)
Used by
loaded by UK Renewables Pipeline — V8 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/v8/scripts/app.js:1-31 · blob af7124a2d2687ca6279b17c788569ded5990d58e · 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 {
  bindProjectControls,
  loadProjects,
  refreshCanonicalProjects,
} from "./plugins/projects.js";
import { startPlugins } from "./core/plugin-host.js";

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

Projects

A JavaScript module in the plugins folder of GlobalGrid2050 that draws table (`drawTable`), syncs render (`syncAndRender`) and sets button filter (`setButtonFilter`).

interactionglobalgrid2050 / uk_renewables_pipeline/v8/scripts/plugins/projects.js · lines 1–121 of 121 · pattern refreshCanonicalProjects (shared by 2 files)

What it does
It draws its content. Defines 9 functions or classes, including legacySignal, drawTable, syncAndRender, populateCounties, setButtonFilter. 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.
Downstream impact
Used directly by 1 file: UK Renewables Pipeline — V8 (globalgrid2050). 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
It draws table (`drawTable`), syncs render (`syncAndRender`) and sets button filter (`setButtonFilter`). Defines `legacySignal`, `drawTable`, `syncAndRender` and 6 more.
Why it matters
Imported by UK Renewables Pipeline — V8.
Application
globalgrid2050 · uk_renewables_pipeline/v8/scripts/plugins · JavaScript module
Uses
State (import), Project State (import), Testcode — Pipeline (import), Canonical Projects (import), Canonical Project Controls (import), Canonical Project Export (import), Canonical Project Table (import), Gauges (import), and 1 more
Used by
imported by UK Renewables Pipeline — V8 (import)
Produces
loadProjects, refreshCanonicalProjects, bindProjectControls
Defines here
legacySignal, drawTable, syncAndRender, populateCounties, setButtonFilter, downloadCanonicalCsv, loadProjects, refreshCanonicalProjects, bindProjectControls
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/v8/scripts/plugins/projects.js:1-121 · blob a9a892229174115ba730cf9343c9b540a0614faf · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
import { COLORS, state } from "../core/state.js";
import {
  beginCanonicalProjectLoad,
  canonicalProjectState,
  commitCanonicalProjectModel,
  failCanonicalProjectLoad,
} from "../core/project-state.js";
import { escapeHtml } from "../core/utils.js";
import { loadCanonicalProjectModel } from "../data/canonical-projects.js";
import { createCanonicalProjectControls } from "./canonical-project-controls.js";
import { buildCanonicalProjectCsv } from "./canonical-project-export.js";
import { buildCanonicalProjectTableView } from "./canonical-project-table.js";
import { updateGauges } from "./gauges.js";
import { signalForProject } from "./newspaper.js";

const controls = createCanonicalProjectControls(canonicalProjectState);
let controlsBound = false;

function legacySignal(project) {
  const signal = signalForProject(project.name);
  return { label: signal.label, note: signal.note };
}

function drawTable() {
  const table = buildCanonicalProjectTableView(canonicalProjectState, {
    legacySignalResolver: legacySignal,
  });
  const tableBody = document.getElementById("tbody");
  if (!table.available) {
    tableBody.innerHTML = '<tr><td colspan="11" style="text-align:center;color:#ff6666">Canonical REPD project data is unavailable.</td></tr>';
    return;
  }
  tableBody.innerHTML = table.rows.map((row) => {
    const project = row.primary;
    const mobileSubline = [project.location, project.operator, project.repdRef].filter(Boolean).join(" | ");
    const colour = COLORS[project.technology] || "#888";
    return `<tr><td class="site">${escapeHtml(project.project)}${mobileSubline ? `<div class="mobile-extra">${escapeHtml(mobileSubline)}</div>` : ""}</td><td class="hide-mobile">${escapeHtml(project.location || "-")}</td><td class="hide-mobile">${escapeHtml(project.operator || "-")}</td><td><span class="badge" style="background:${colour}">${escapeHtml(project.technology)}</span></td><td>${escapeHt  … [line shortened here: 932 characters; full line on GitHub]
  }).join("");
}

function syncAndRender() {
  state.all = canonicalProjectState.all;
  state.filtered = canonicalProjectState.filtered;
  updateGauges(canonicalProjectState.filtered);
  drawTable();
}

function populateCounties() {
  const county = document.getElementById("county");
  const allCounties = county.options[0];
  county.replaceChildren(allCounties);
  canonicalProjectState.filterOptions.counties.forEach((value) => {
    const option = document.createElement("option");
    option.value = value;
    option.textContent = `📍 ${value}`;
    county.appendChild(option);
  });
}

function setButtonFilter(group, key, button) {
  document.querySelectorAll(`${group} .btn`).forEach((candidate) => candidate.classList.remove("active"));
  button.classList.add("active");
  controls.setFilter(key, button.dataset[key]);
  syncAndRender();
}

function downloadCanonicalCsv(event) {
  event.preventDefault();
  const csv = buildCanonicalProjectCsv(canonicalProjectState, {
    legacySignalResolver: legacySignal,
  });
  const url = URL.createObjectURL(new Blob([csv.content], { type: csv.mimeType }));
  const anchor = document.createElement("a");
  anchor.href = url;
  anchor.download = csv.filename.replace("v7_2", "v8_1");
  document.body.appendChild(anchor);
  anchor.click();
  anchor.remove();
  URL.revokeObjectURL(url);
}

export async function loadProjects() {
  beginCanonicalProjectLoad(canonicalProjectState);
  try {
    const model = await loadCanonicalProjectModel();
    state.canonicalModel = model;
    commitCanonicalProjectModel(canonicalProjectState, model);
    canonicalProjectState.release = "8.1";
    canonicalProjectState.phase = "live-mvp";
    populateCounties();
    syncAndRender();
  } catch (error) {
    console.error(error);
    failCanonicalProjectLoad(canonicalProjectState, error);
    drawTable();
  }
}

export function refreshCanonicalProjects() {
  if (canonicalProjectState.status === "ready") syncAndRender();
}

export function bindProjectControls() {
  if (controlsBound) return;
  controlsBound = true;
  document.querySelectorAll("#tech .btn").forEach((button) => {
    button.onclick = () => setButtonFilter("#tech", "technology", button);
  });
  document.querySelectorAll("#status .btn").forEach((button) => {
    button.onclick = () => setButtonFilter("#status", "officialStatus", button);
  });
  document.getElementById("county").onchange = (event) => {
    controls.setFilter("county", event.target.value);
    syncAndRender();
  };
  document.getElementById("search").oninput = (event) => {
    controls.setFilter("query", event.target.value);
    syncAndRender();
  };
  document.getElementById("export").onclick = downloadCanonicalCsv;
}