In this section
- Federation Radial Uniform render · data-federation-map-for-globalgrid2050-all-repos / dashboard/sandbox/federation_radial_uniform.html lines 1–203
- Spider Full Po Test test · data-federation-map-for-globalgrid2050-all-repos / dashboard/sandbox/spider_full_po_test.html lines 1–208
- Federation docs-config · data-federation-map-for-globalgrid2050-all-repos / federation.yaml lines 1–27
- Live Sandbox — Blank Canvas Page render · data-federation-map-for-globalgrid2050-all-repos / live_sandbox/blank_canvas/index.html lines 1–128
Federation Radial Uniform
A web page in the sandbox folder of Data Federation Map for GlobalGrid2050 All Repos covering solar and uses data from Elexon Balancing Mechanism Reporting Service (BMRS). Published at https://ventusltd.github.io/data-federation-map-for-globalgrid2050-all-repos/dashboard/sandbox/federation_radial_uniform.html.
Set aside from the main view: 93% of its lines are the same as dashboard/sandbox/spider_full_po_test.html (data-federation-map-for-globalgrid2050-all-repos), which stays. (near-copy-of, proposed by families.py). 92% of lines shared with Spider Full Po Test; read that one first. All set-aside files, with reasons. Nothing was deleted.
Evidence
- line-jaccard 0.9268 to data-federation-map-for-globalgrid2050-all-repos@fffd624e77d820ebc04ab25f9d97871b254be61c dashboard/sandbox/spider_full_po_test.html:1-208 b286439c0858f06abbc2337169020509aad514ce
- sha256 0928d953e99308e74b1ca73d8cc9a76dc7719e265a72cc1f71370267cd319442
- target sha256 d9f6f19448a02be502ca3a7bcf7100ec27a599249d91ef4a119789ea9ff3a141
- group of 3 (identity.json near-copy edges >= 0.9)
- canonical rule: reachable, newest stamp, core repo, most lines
renderdata-federation-map-for-globalgrid2050-all-repos / dashboard/sandbox/federation_radial_uniform.html · lines 1–203 of 203 · Entry point · pattern applyRootLinks (shared by 10 files)
- What it does
- It draws solar. Defines 14 functions or classes, including applyRootLinks, S, rebuildSelect, actionable, openUrl. Side effects: changes the web page (DOM); makes network requests; uses storage (browser storage, DuckDB or Parquet).
- Why it exists in the grid workflow
- Domain stage experimental (path word 'sandbox'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow. Domain terms in the code: solar.
- Inputs & outputs
- In: data source: Elexon BMRS; JSON file nodes.json; JSON file edges.json; DuckDB queries; form fields (user input). Out: web page; SVG drawing.
- Downstream impact
- Used directly by 89 files: GlobalGrid2050 Historical Builds (globalgrid2050, https://globalgrid2050.com/historical_builds.html); Homepage Versions — GlobalGrid2050 Page (globalgrid2050, https://globalgrid2050.com/homepage_versions/202608291526-globalgrid2050/); Homepage V001 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v001.html); Homepage V002 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v002.html); and 85 more. Reached from 36 other entry points, including GlobalGrid2050 Homepage Before Four Nests (globalgrid2050, https://globalgrid2050.com/homepage-before-four-nests-20260925.html); Homepage V091 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v091.html); Homepage V093 (globalgrid2050, https://globalgrid2050.com/homepage_versions/homepage_v093.html). It is itself an entry point, published at https://ventusltd.github.io/data-federation-map-for-globalgrid2050-all-repos/dashboard/sandbox/federation_radial_uniform.html.
- What it achieves
- It applies root links (`applyRootLinks`), rebuilds select (`rebuildSelect`) and opens URL (`openUrl`). Ventus Global Grid 2050. It responds to change and click events.
- Why it matters
- Feeds the GlobalGrid2050 Historical Builds map page in GlobalGrid2050 (solar) at https://globalgrid2050.com/historical_builds.html and 88 other pages.
- Application
- data-federation-map-for-globalgrid2050-all-repos · dashboard/sandbox · page
- Uses
- Live Sandbox — Federation Control Ledger Page (estate URL)
- Used by
- named by URL in GlobalGrid2050 Historical Builds (estate URL), named by URL in Homepage Versions — GlobalGrid2050 Page (estate URL), named by URL in Homepage V001 (estate URL), named by URL in Homepage V002 (estate URL), named by URL in Homepage V003 (estate URL), named by URL in Homepage V004 (estate URL), named by URL in Homepage V005 (estate URL), named by URL in Homepage V006 (estate URL), and 81 more
- Produces
- applyRootLinks, S, rebuildSelect, actionable, openUrl, handleTap, drillInto, popTo, neighbours, goLabel, distribute, reshapeNodes
- Defines here
- applyRootLinks, S, rebuildSelect, actionable, openUrl, handleTap, drillInto, popTo, neighbours, goLabel, distribute, reshapeNodes, loadJSON, loadRoot
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- data-federation-map-for-globalgrid2050-all-repos@fffd624e77d820ebc04ab25f9d97871b254be61c dashboard/sandbox/federation_radial_uniform.html:1-203 · blob a2987eef6958e09efa4f0c4f38ac85989a9468d1 · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom, network, storage · domain stage: experimental · users: none · canonical: duplicate_candidate
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Ventus Global Grid 2050 · The Spider Sandbox</title>
<style>
:root{
--bg:#0b0d12;--panel:#12151c;--panel2:#151923;--line:#262b36;--text:#eef2fb;--muted:#9aa3b5;--cyan:#00e5ff;
--e-data:#00e5ff;--e-governance:#b47cff;--e-archive:#7da0c8;--e-external:#5f76a4;--e-repo:#b8ccff;--e-workflow:#00ffff;
--safe-x:clamp(12px,2.3vw,28px);--shell:1040px;--card:220px;--gap:14px;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
body{background:radial-gradient(1200px 700px at 50% -10%,rgba(0,229,255,.06),transparent 60%),var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;height:100dvh;overflow:hidden;display:flex;flex-direction:column}
button,select{font:inherit}
.top{border-bottom:1px solid var(--line);background:rgba(11,13,18,.92);backdrop-filter:blur(16px)}
.bar,.controls,.crumbs,.hint{width:min(var(--shell),calc(100vw - var(--safe-x)*2));margin:0 auto}
.bar{display:flex;align-items:center;gap:10px 14px;flex-wrap:wrap;padding:max(env(safe-area-inset-top),12px) 0 10px}
.brand{display:flex;flex-direction:column;line-height:1.05;min-width:190px}
.brand .ey{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.6rem;letter-spacing:.22em;text-transform:uppercase;color:var(--cyan)}
.brand h1{margin:2px 0 0;font-size:1rem;font-weight:650}
.pick{display:flex;align-items:center;gap:8px;flex:1 1 280px;min-width:0}
.pick label,.grouplabel{font-family:ui-monospace,monospace;font-size:.58rem;letter-spacing:.16em;text-transform:uppercase;color:var(--muted);flex:none}
select{flex:1 1 auto;min-width:0;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:10px;padding:9px 32px 9px 12px;font-size:.85rem;cursor:pointer;appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);background-position:calc(100% - 16px) center,calc(100% - 11px) center;b … [line shortened here: 459 characters; full line on GitHub]
select:focus-visible,button:focus-visible{outline:none;border-color:var(--cyan);box-shadow:0 0 0 2px rgba(0,229,255,.18)}
.count{font-family:ui-monospace,monospace;font-size:.72rem;color:var(--muted);margin-left:auto;white-space:nowrap}
.count b{color:var(--text);font-weight:600}
.controls{display:flex;align-items:center;gap:8px 14px;flex-wrap:wrap;padding:8px 0 4px}
.seg{display:inline-flex;border:1px solid var(--line);border-radius:999px;overflow:hidden;flex:none;background:rgba(18,21,28,.7)}
.seg button{border:0;background:transparent;color:var(--muted);font-size:.72rem;padding:7px 13px;cursor:pointer;white-space:nowrap}
.seg button[aria-pressed="true"]{background:rgba(0,229,255,.16);color:var(--text)}
.seg button.gh[aria-pressed="true"]{background:rgba(184,204,255,.18)}
.seg button.ext[aria-pressed="true"]{background:rgba(95,118,164,.28)}
.seg button:disabled{opacity:.4;cursor:not-allowed}
.viewbtn{border:1px solid rgba(255,255,255,.55);background:rgba(255,255,255,.08);color:#fff;border-radius:999px;padding:6px 12px;cursor:pointer;font-size:.86rem;line-height:1;display:inline-flex;align-items:center;gap:7px}
.viewbtn[aria-pressed="true"]{border-color:var(--cyan);background:rgba(0,229,255,.16);box-shadow:0 0 22px rgba(0,229,255,.12)}
.srctag{margin-left:auto;font-family:ui-monospace,monospace;font-size:.56rem;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);border:1px solid var(--line);border-radius:999px;padding:2px 8px}
.srctag.live{color:var(--cyan);border-color:rgba(0,229,255,.4)}
.crumbs{display:flex;align-items:center;gap:6px;padding:2px 0 0;font-family:ui-monospace,monospace;font-size:.66rem;color:var(--muted);min-height:18px}
.crumbs a{color:var(--cyan);cursor:pointer;text-decoration:none}
.crumbs .sep{opacity:.5}
.hint{padding:4px 0 8px;font-family:ui-monospace,monospace;font-size:.62rem;color:var(--muted)}
.hint b{color:var(--text);font-weight:600}
.stage{flex:1;min-height:0;position:relative;overflow:hidden}
.overlay{position:absolute;inset:0}
.overlay.column{overflow-y:auto;overflow-x:hidden;padding:16px var(--safe-x) max(env(safe-area-inset-bottom),22px)}
.shell{width:min(var(--shell),100%);margin:0 auto;display:flex;flex-direction:column;gap:12px}
.card{border:1px solid var(--line);border-radius:14px;background:linear-gradient(160deg,rgba(255,255,255,.055),rgba(255,255,255,.014));padding:10px 12px;display:flex;flex-direction:column;gap:6px;min-height:74px;box-shadow:0 16px 44px rgba(0,0,0,.12)}
.card .row{display:flex;align-items:center;gap:7px}
.badge{font-family:ui-monospace,monospace;font-size:.55rem;letter-spacing:.07em;border:1px solid var(--line);border-radius:6px;padding:2px 5px;color:var(--muted);flex:none}
.name{font-size:.85rem;font-weight:650;line-height:1.15;overflow-wrap:anywhere}
.dot{width:9px;height:9px;border-radius:50%;flex:none;margin-left:auto;box-shadow:0 0 8px currentColor}
.reason{font-size:.68rem;color:var(--muted);line-height:1.25}
.relrow{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.reltag{font-family:ui-monospace,monospace;font-size:.55rem;letter-spacing:.05em;text-transform:uppercase;padding:1px 7px;border-radius:999px;border:1px solid currentColor}
.arrow{font-family:ui-monospace,monospace;font-size:.62rem;color:var(--muted)}
.go{font-family:ui-monospace,monospace;font-size:.6rem;color:var(--cyan);margin-left:auto}
.is-center{border-color:var(--cyan);box-shadow:0 0 0 1px rgba(0,229,255,.22),0 0 26px rgba(0,229,255,.12)}
.is-center .name{font-size:.95rem}
.contents{align-self:flex-start;margin-top:3px;font-family:ui-monospace,monospace;font-size:.62rem;color:var(--cyan);border:1px solid rgba(0,229,255,.4);border-radius:999px;padding:4px 10px;background:rgba(0,229,255,.08);cursor:pointer}
.inert{opacity:.34}
.sect{font-family:ui-monospace,monospace;font-size:.6rem;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);margin:16px 2px 4px}
.branch{position:relative;padding-left:20px;display:flex;flex-direction:column;gap:9px}
.branch::before{content:"";position:absolute;left:7px;top:-6px;bottom:14px;width:2px;background:var(--line)}
.twig{position:relative;cursor:pointer}
.twig::before{content:"";position:absolute;left:-13px;top:28px;width:13px;height:2px;background:var(--twig,var(--line))}
.twig .card{border-left:3px solid var(--twig,var(--line))}
.empty{color:var(--muted);font-size:.78rem;padding:6px 2px}
.overlay.spider{overflow:auto;cursor:grab;background:radial-gradient(circle at center,rgba(0,229,255,.045),transparent 45%)}
.overlay.spider.dragging{cursor:grabbing;user-select:none}
.spiderCanvas{position:relative;min-width:100%;min-height:100%}
.spiderGrid{position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),linear-gradient(90deg,rgba(255,255,255,.03) 1px, transparent 1px);background-size:80px 80px;mask-image:radial-gradient(circle at center,black,transparent 78%);pointer-events:none}
.wires{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
.spoke{stroke-width:1.8;fill:none;opacity:.88}
.place{position:absolute;transform:translate(-50%,-50%);width:var(--card);cursor:pointer}
.place.center{width:250px;cursor:default}
.legend{position:sticky;left:14px;bottom:10px;display:flex;flex-wrap:wrap;gap:5px 12px;width:max-content;max-width:70%;pointer-events:none;padding:4px 0 10px 14px}
.legend span{display:flex;align-items:center;gap:6px;font-family:ui-monospace,monospace;font-size:.58rem;letter-spacing:.05em;text-transform:uppercase;color:var(--muted)}
.legend i{width:15px;height:0;border-top:2px solid;display:inline-block}
.maphint{position:sticky;top:12px;left:14px;width:max-content;max-width:min(560px,calc(100vw - 32px));font-family:ui-monospace,monospace;font-size:.62rem;color:var(--muted);background:rgba(18,21,28,.8);border:1px solid var(--line);border-radius:999px;padding:5px 10px;backdrop-filter:blur(10px);z-index:5}
@media (max-width:680px){:root{--safe-x:14px}.brand{min-width:100%}.bar{gap:8px}.count{width:100%;margin-left:0}.controls{gap:7px 10px}.seg button{padding:7px 10px;font-size:.68rem}.viewbtn{padding:6px 10px}.srctag{margin-left:0}.shell{gap:10px}.card{border-radius:12px}.name{font-size:.82rem}}
</style>
</head>
<body>
<div class="top">
<div class="bar">
<div class="brand"><span class="ey">Ventus · Global Grid 2050</span><h1>The Spider Sandbox</h1></div>
<div class="pick"><label for="focus">Focus</label><select id="focus"></select></div>
<div class="count" id="count"></div>
</div>
<div class="controls">
<span class="grouplabel">Show</span>
<div class="seg" id="relSeg" role="group" aria-label="Relationship direction">
<button data-mode="both" aria-pressed="true">Both</button>
<button data-mode="out" aria-pressed="false">Outgoing</button>
<button data-mode="in" aria-pressed="false">Incoming</button>
</div>
<button class="viewbtn" id="spiderToggle" aria-pressed="false" title="Toggle optional spider view">🕷 <span id="viewLabel">Spider</span></button>
<span class="grouplabel">Tap does</span>
<div class="seg" id="actSeg" role="group" aria-label="Tap action">
<button data-act="explore" aria-pressed="true">Explore</button>
<button class="gh" data-act="github" aria-pressed="false">GitHub</button>
<button class="ext" data-act="external" aria-pressed="false">External</button>
<button data-act="status" aria-pressed="false" disabled title="Enables when the page reads live scanner data">Status</button>
</div>
<span class="srctag" id="srcTag" title="Data source for this view">snapshot</span>
</div>
<div class="crumbs" id="crumbs"></div>
<div class="hint" id="hint"></div>
</div>
<div class="stage" id="stage"><div class="overlay column" id="overlay"></div></div>
<script>
const GH_BASE="https://github.com/Ventusltd/data-federation-map-for-globalgrid2050-all-repos";
const LIVE_PAGE="https://ventusltd.github.io/data-federation-map-for-globalgrid2050-all-repos/live_sandbox/federation_control_ledger/";
const EXT_HOME={"DuckDB":"https://duckdb.org","Parquet":"https://parquet.apache.org","GitHub Actions":"https://github.com/features/actions","Elexon BMRS API":"https://bmrs.elexon.co.uk","GitHub Pages":"https://pages.github.com"};
const PAGE_HOME={"globalgrid2050":"https://globalgrid2050.com/","globalgrid2050-hompage":"https://globalgrid2050.com/","data-federation-map-for-globalgrid2050-all-repos":LIVE_PAGE};
const ROOT_NODES=[
{label:"data-federation-map-for-globalgrid2050-all-repos",type:"data",rag:"green",reason:"active federation repository",child:"data-federation"},
{label:"data-gb-electricity",type:"data",rag:"red",reason:"contract finding surfaced"},
{label:"data-interconnectors",type:"data",rag:"red",reason:"contract finding surfaced"},
{label:"gb-electricity-ui",type:"ui",rag:"red",reason:"depends on verified data repos"},
{label:"globalgrid2050",type:"source_archive",rag:"blue",reason:"source archive"},
{label:"globalgrid2050-hompage",type:"homepage",rag:"green",reason:"homepage dependency surfaced"},
{label:"pandapower",type:"unknown",rag:"grey",reason:"not fully classified"},
{label:"Podcast-transcripts",type:"unknown",rag:"amber",reason:"workflow finding"},
{label:"pv-arc-protection-circuit",type:"unknown",rag:"amber",reason:"workflow finding"},
{label:"Solar-PV-Hybrid-and-off-grid",type:"unknown",rag:"amber",reason:"workflow finding"},
{label:"solar-repowering-whitepaper",type:"unknown",rag:"amber",reason:"workflow finding"},
{label:"youengineer-code-review",type:"ui",rag:"amber",reason:"reference UI pattern source"},
{label:"DuckDB",type:"external",rag:"blue",reason:"proof query engine"},
{label:"Parquet",type:"external",rag:"blue",reason:"columnar proof store"},
{label:"Elexon BMRS API",type:"external",rag:"blue",reason:"external electricity source"},
{label:"GitHub Actions",type:"external",rag:"blue",reason:"static build runner"},
];
const ROOT_EDGES=[
[0,12,"external"],[0,13,"external"],[0,5,"governance"],[0,15,"external"],[0,14,"external"],
[1,4,"archive"],[1,5,"governance"],[1,14,"external"],[1,15,"external"],[1,12,"external"],[1,13,"external"],
[2,4,"archive"],[2,5,"governance"],[2,14,"external"],[2,13,"external"],[2,1,"repo"],[2,3,"repo"],[2,15,"external"],[2,12,"external"],
[3,1,"data"],[3,2,"data"],[3,5,"governance"],[3,15,"external"],
[4,14,"external"],[4,15,"external"],
[5,14,"external"],[5,0,"data"],[5,1,"data"],[5,2,"data"],[5,3,"repo"],[5,4,"archive"],[5,12,"external"],[5,13,"external"],[5,15,"external"],
[6,15,"external"],
];
function applyRootLinks(nodes){nodes.forEach(n=>{n.gh=n.type==="external"?null:`https://github.com/Ventusltd/${n.label}`;n.ext=EXT_HOME[n.label]||PAGE_HOME[n.label]||null;});return nodes;}
applyRootLinks(ROOT_NODES);
const CHILD_NODES=[
{label:"data-federation repo",type:"data",rag:"green",reason:"root of this child scope",gh:GH_BASE+"/tree/main"},
{label:"live dashboard page",type:"ui",rag:"green",reason:"GitHub Pages browser UI in this repo",gh:GH_BASE+"/tree/main/live_sandbox/federation_control_ledger",ext:LIVE_PAGE},
{label:"index.html",type:"ui",rag:"green",reason:"page shell for the board",gh:GH_BASE+"/blob/main/live_sandbox/federation_control_ledger/index.html"},
{label:"app.js",type:"ui",rag:"green",reason:"board renderer and interaction logic",gh:GH_BASE+"/blob/main/live_sandbox/federation_control_ledger/app.js"},
{label:"style.css",type:"ui",rag:"green",reason:"board visual system",gh:GH_BASE+"/blob/main/live_sandbox/federation_control_ledger/style.css"},
{label:"data cartridge folder",type:"data",rag:"green",reason:"manifest, nodes, edges, layers, sectors",gh:GH_BASE+"/tree/main/live_sandbox/federation_control_ledger/data"},
{label:"data/manifest.json",type:"data",rag:"amber",reason:"root cartridge manifest; key still flagged",gh:GH_BASE+"/blob/main/live_sandbox/federation_control_ledger/data/manifest.json"},
{label:"data/nodes.json",type:"data",rag:"green",reason:"repo and source nodes for the board",gh:GH_BASE+"/blob/main/live_sandbox/federation_control_ledger/data/nodes.json"},
{label:"data/edges.json",type:"data",rag:"green",reason:"relationship lines for the board",gh:GH_BASE+"/blob/main/live_sandbox/federation_control_ledger/data/edges.json"},
{label:"reports folder",type:"unknown",rag:"green",reason:"scan reports and evidence",gh:GH_BASE+"/tree/main/reports"},
{label:"FEDERATION_MAP_LATEST.md",type:"unknown",rag:"green",reason:"latest human-readable scan report",gh:GH_BASE+"/blob/main/reports/FEDERATION_MAP_LATEST.md"},
{label:"every-drop-is-the-ocean",type:"unknown",rag:"green",reason:"canonical doctrine and addenda",gh:GH_BASE+"/tree/main/every-drop-is-the-ocean"},
{label:"GitHub Pages",type:"external",rag:"blue",reason:"static public hosting",ext:LIVE_PAGE},
{label:"GitHub Actions",type:"external",rag:"blue",reason:"future scanner and validation runner",ext:EXT_HOME["GitHub Actions"],gh:GH_BASE+"/actions"},
];
const CHILD_EDGES=[[0,1,"repo"],[1,2,"repo"],[1,3,"repo"],[1,4,"repo"],[1,5,"data"],[3,5,"data"],[5,6,"data"],[5,7,"data"],[5,8,"data"],[0,9,"governance"],[9,10,"governance"],[0,11,"governance"],[1,12,"external"],[0,13,"external"],[3,13,"external"]];
const SCOPES={"root":{label:"Federation",nodes:ROOT_NODES,edges:ROOT_EDGES},"data-federation":{label:"data-federation internals",nodes:CHILD_NODES,edges:CHILD_EDGES}};
const RAG={green:"#00ff88",amber:"#ffcc00",red:"#ff5555",blue:"#3aa0ff",grey:"#9298a6"};
const ECSS={data:"#00e5ff",governance:"#b47cff",archive:"#7da0c8",external:"#5f76a4",repo:"#b8ccff",workflow:"#00ffff"};
const BADGE={data:"DB",ui:"UI",homepage:"WEB",source_archive:"SRC",unknown:"REPO",external:"EXT"};
const REL={data:"data",governance:"governance",archive:"archive",external:"external",repo:"repo ref",workflow:"workflow"};
const SVGNS="http://www.w3.org/2000/svg";
let mode="both", action="explore", view="column", current=0, scopeKey="root", stack=[];
const sel=document.getElementById("focus"), overlay=document.getElementById("overlay"), elCount=document.getElementById("count"), elCrumbs=document.getElementById("crumbs"), elHint=document.getElementById("hint"), spiderToggle=document.getElementById("spiderToggle"), viewLabel=document.getElementById("viewLabel");
function S(){return SCOPES[scopeKey];}
function rebuildSelect(){sel.innerHTML="";S().nodes.forEach((n,i)=>{const o=document.createElement("option");o.value=i;o.textContent=n.label;sel.appendChild(o);});sel.value=current;}
sel.addEventListener("change",()=>{current=+sel.value;draw();});
document.querySelectorAll("#relSeg button").forEach(b=>b.addEventListener("click",()=>{mode=b.dataset.mode;document.querySelectorAll("#relSeg button").forEach(x=>x.setAttribute("aria-pressed",String(x===b)));draw();}));
document.querySelectorAll("#actSeg button").forEach(b=>b.addEventListener("click",()=>{if(b.disabled)return;action=b.dataset.act;document.querySelectorAll("#actSeg button").forEach(x=>x.setAttribute("aria-pressed",String(x===b)));draw();}));
spiderToggle.addEventListener("click",()=>{view=view==="spider"?"column":"spider";spiderToggle.setAttribute("aria-pressed",String(view==="spider"));viewLabel.textContent=view==="spider"?"Column":"Spider";draw();});
let rt;new ResizeObserver(()=>{clearTimeout(rt);rt=setTimeout(draw,80);}).observe(document.getElementById("stage"));
function actionable(n){return action==="explore" ? true : action==="github" ? !!n.gh : action==="external" ? !!n.ext : false;}
function openUrl(u){if(u)window.open(u,"_blank","noopener");}
function handleTap(i){const n=S().nodes[i];if(action==="explore"){current=i;sel.value=i;draw();}else if(action==="github"){openUrl(n.gh);}else if(action==="external"){openUrl(n.ext);}}
function drillInto(childKey){stack.push({key:scopeKey,current});scopeKey=childKey;current=0;mode="both";document.querySelectorAll("#relSeg button").forEach(x=>x.setAttribute("aria-pressed",String(x.dataset.mode==="both")));rebuildSelect();draw();}
function popTo(idx){const target=stack[idx];stack=stack.slice(0,idx);scopeKey=target.key;current=target.current;rebuildSelect();draw();}
function neighbours(idx){const out=[],inc=[];S().edges.forEach(([f,t,ty])=>{if(f===idx)out.push({other:t,type:ty});if(t===idx)inc.push({other:f,type:ty});});return {out,inc};}
function cardInner(node,opts={}){const center=opts.center, rel=opts.rel, dim=opts.dim;let relHTML="";if(rel){const c=ECSS[rel.type]||ECSS.repo;relHTML=`<div class="relrow"><span class="arrow">${rel.dir==="out"?"depends on →":"← depended on by"}</span><span class="reltag" style="color:${c}">${REL[rel.type]||rel.type}</span>${opts.go?`<span class="go">${opts.go}</span>`:""}</div>`;}let contents="";i … [line shortened here: 903 characters; full line on GitHub]
function goLabel(n){return action==="github"&&n.gh?"open ↗":action==="external"&&n.ext?"open ↗":"";}
function setHint(){const base={explore:"<b>Explore</b> — tap a card to re-centre. Use the spider only when you choose it.",github:"<b>GitHub</b> — tap a repo to open it. Cards with no repo are dimmed.",external:"<b>External</b> — tap an external system to open it. Others are dimmed."};elHint.innerHTML=(base[action]||"")+(view==="spider"?" <b>Spider view</b> — scroll or drag the large canvas … [line shortened here: 408 characters; full line on GitHub]
function setCrumbs(){elCrumbs.innerHTML="";const trail=[...stack.map((s,i)=>({label:SCOPES[s.key].label,idx:i})),{label:S().label,idx:-1}];trail.forEach((c,k)=>{if(k)elCrumbs.insertAdjacentHTML("beforeend",`<span class="sep">›</span>`);if(c.idx===-1){const s=document.createElement("strong");s.textContent=c.label;s.style.color="var(--text)";elCrumbs.appendChild(s);}else{const a=document.createEleme … [line shortened here: 504 characters; full line on GitHub]
function draw(){const nodes=S().nodes,focus=nodes[current];let {out,inc}=neighbours(current);let lo=mode==="in"?[]:out,li=mode==="out"?[]:inc;elCount.innerHTML=`<b>${out.length}</b> dependencies · <b>${inc.length}</b> dependents`;setHint();setCrumbs();overlay.innerHTML="";overlay.className="overlay "+view;if(view==="spider")drawSpider(focus,lo,li);else drawColumn(focus,lo,li);overlay.q … [line shortened here: 523 characters; full line on GitHub]
function drawColumn(focus,out,inc){const nodes=S().nodes;const shell=document.createElement("div");shell.className="shell";shell.innerHTML=`<div class="focuswrap">${cardInner(focus,{center:true})}</div>`;const section=(title,items,dir)=>{const s=document.createElement("div");s.innerHTML=`<div class="sect">${title}</div>`;if(!items.length){const e=document.createElement("div");e.className="empty";e … [line shortened here: 1,032 characters; full line on GitHub]
function marker(defs,type){const m=document.createElementNS(SVGNS,"marker");m.id="arr-"+type;m.setAttribute("viewBox","0 0 10 10");m.setAttribute("refX","9");m.setAttribute("refY","5");m.setAttribute("markerWidth","8");m.setAttribute("markerHeight","8");m.setAttribute("orient","auto");const p=document.createElementNS(SVGNS,"path");p.setAttribute("d","M0,0 L10,5 L0,10 z");p.setAttribute("fill",ECSS … [line shortened here: 457 characters; full line on GitHub]
function distribute(items,side,cx,cy,gap,xGap){const n=items.length;if(!n)return[];return items.map((it,k)=>{const y=cy+(k-(n-1)/2)*gap;const stagger=(n>5&&k%2?90:0);const x=cx+side*(xGap+stagger);return{...it,dir:side>0?"out":"in",x,y};});}
function drawSpider(focus,out,inc){const stage=document.getElementById("stage");const sw=stage.clientWidth,sh=stage.clientHeight;const maxSide=Math.max(out.length,inc.length,1);const gap=176;const xGap=Math.max(420,260+maxSide*38);const cw=Math.max(sw,Math.ceil(680+xGap*2+maxSide*120));const ch=Math.max(sh,Math.ceil(520+gap*(maxSide+1)));const cx=cw/2,cy=ch/2;const pts=[...distribute(out,1,cx,cy,g … [line shortened here: 2,486 characters; full line on GitHub]
function enableDragPan(el){let down=false,sx=0,sy=0,sl=0,st=0;el.onpointerdown=e=>{if(e.target.closest("button,select"))return;down=true;sx=e.clientX;sy=e.clientY;sl=el.scrollLeft;st=el.scrollTop;el.classList.add("dragging");el.setPointerCapture(e.pointerId);};el.onpointermove=e=>{if(!down)return;el.scrollLeft=sl-(e.clientX-sx);el.scrollTop=st-(e.clientY-sy);};el.onpointerup=e=>{down=false;el.clas … [line shortened here: 549 characters; full line on GitHub]
const DATA_BASE="../../live_sandbox/federation_control_ledger/data/";
const CHILD_KEY="data-federation";
function reshapeNodes(fc){return (fc.features||[]).map(f=>{const p=f.properties||{};const cm=p.child_manifest||null;return {label:p.label||f.id,type:p.repo_type||p.scope_type||"unknown",rag:p.rag||p.status||"grey",reason:p.status_reason||"",child:(cm&&/data-federation/.test(cm))?CHILD_KEY:null};});}
async function loadJSON(path){const r=await fetch(DATA_BASE+path,{cache:"no-cache"});if(!r.ok)throw new Error(path+" "+r.status);return r.json();}
async function loadRoot(){try{const [nf,ef]=await Promise.all([loadJSON("nodes.json"),loadJSON("edges.json")]);const nodes=reshapeNodes(nf);if(!nodes.length)throw new Error("empty");applyRootLinks(nodes);SCOPES.root.nodes=nodes;SCOPES.root.edges=(ef.edges||[]).map(e=>[e[0],e[1],e[2]]);return "live";}catch(e){return "snapshot";}}
(async()=>{const src=await loadRoot();const tag=document.getElementById("srcTag");if(tag){tag.textContent=src;tag.classList.toggle("live",src==="live");}rebuildSelect();draw();})();
</script>
</body>
</html>Spider Full Po Test
A test that checks Federation Radial and Live Sandbox — Federation Control Ledger Page using data from Elexon Balancing Mechanism Reporting Service (BMRS).
testdata-federation-map-for-globalgrid2050-all-repos / dashboard/sandbox/spider_full_po_test.html · lines 1–208 of 208 · Entry point · pattern applyRootLinks (shared by 10 files)
- What it does
- It tests solar. Defines 14 functions or classes, including applyRootLinks, S, rebuildSelect, actionable, openUrl. Side effects: changes the web page (DOM); makes network requests; uses storage (browser storage, DuckDB or Parquet).
- Why it exists in the grid workflow
- Domain stage experimental (path word 'sandbox'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow. Domain terms in the code: solar.
- Inputs & outputs
- In: data source: Elexon BMRS; JSON file nodes.json; JSON file edges.json; DuckDB queries; form fields (user input). Out: SVG drawing.
- Downstream impact
- Used directly by 109 files: Menu Bar (code-generator, https://ventusltd.github.io/code-generator/apps/substation-finder/Si/); Substation Intelligence (code-generator, https://ventusltd.github.io/code-generator/apps/substation-finder/Si/); Substation Intelligence V9 63 (code-generator, https://ventusltd.github.io/code-generator/apps/substation-finder/Si/); Substation Intelligence (globalgrid2050); and 105 more. Reached from 187 other entry points, including Code Generator — Substation Finder Page (code-generator, https://ventusltd.github.io/code-generator/apps/substation-finder/); 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/). It is itself an entry point, published at https://ventusltd.github.io/data-federation-map-for-globalgrid2050-all-repos/dashboard/sandbox/spider_full_po_test.html.
- What it achieves
- It applies root links (`applyRootLinks`), rebuilds select (`rebuildSelect`) and opens URL (`openUrl`). Ventus Global Grid 2050.
- Why it matters
- Loaded by the PipelineNews Intelligence page in GlobalGrid2050 at https://globalgrid2050.com/pipelinenews_intelligence/202609050309/ and 96 other pages. Also imported by 12 files, including Menu Bar, Substation Intelligence and Substation Intelligence V9 63, from Code Generator, GlobalGrid2050, GridAtlas and others.
- Application
- data-federation-map-for-globalgrid2050-all-repos · dashboard/sandbox · test
- Uses
- Federation Radial (stylesheet), Live Sandbox — Federation Control Ledger Page (estate URL)
- Used by
- named by URL in Menu Bar (estate URL), named by URL in Substation Intelligence (estate URL), named by URL in Substation Intelligence V9 63 (estate URL), named by URL in Substation Intelligence (estate URL), named by URL in Substation Intelligence V9 63 (estate URL), named by URL in Substation Intelligence (estate URL), named by URL in Menu Bar (estate URL), named by URL in Regional Native (estate URL), and 101 more
- Produces
- applyRootLinks, S, rebuildSelect, actionable, openUrl, handleTap, drillInto, popTo, neighbours, goLabel, distribute, reshapeNodes
- Defines here
- applyRootLinks, S, rebuildSelect, actionable, openUrl, handleTap, drillInto, popTo, neighbours, goLabel, distribute, reshapeNodes, loadJSON, loadRoot
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- data-federation-map-for-globalgrid2050-all-repos@fffd624e77d820ebc04ab25f9d97871b254be61c dashboard/sandbox/spider_full_po_test.html:1-208 · blob b286439c0858f06abbc2337169020509aad514ce · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom, network, storage · domain stage: experimental · users: none · canonical: supporting_data
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Ventus Global Grid 2050 · The Spider Sandbox</title>
<style>
:root{
--bg:#0b0d12;--panel:#12151c;--panel2:#151923;--line:#262b36;--text:#eef2fb;--muted:#9aa3b5;--cyan:#00e5ff;
--e-data:#00e5ff;--e-governance:#b47cff;--e-archive:#7da0c8;--e-external:#5f76a4;--e-repo:#b8ccff;--e-workflow:#00ffff;
--safe-x:clamp(12px,2.3vw,28px);--shell:1040px;--card:220px;--gap:14px;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
body{background:radial-gradient(1200px 700px at 50% -10%,rgba(0,229,255,.06),transparent 60%),var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;height:100dvh;overflow:hidden;display:flex;flex-direction:column}
button,select{font:inherit}
.top{border-bottom:1px solid var(--line);background:rgba(11,13,18,.92);backdrop-filter:blur(16px)}
.bar,.controls,.crumbs,.hint{width:min(var(--shell),calc(100vw - var(--safe-x)*2));margin:0 auto}
.bar{display:flex;align-items:center;gap:10px 14px;flex-wrap:wrap;padding:max(env(safe-area-inset-top),12px) 0 10px}
.brand{display:flex;flex-direction:column;line-height:1.05;min-width:190px}
.brand .ey{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.6rem;letter-spacing:.22em;text-transform:uppercase;color:var(--cyan)}
.brand h1{margin:2px 0 0;font-size:1rem;font-weight:650}
.pick{display:flex;align-items:center;gap:8px;flex:1 1 280px;min-width:0}
.pick label,.grouplabel{font-family:ui-monospace,monospace;font-size:.58rem;letter-spacing:.16em;text-transform:uppercase;color:var(--muted);flex:none}
select{flex:1 1 auto;min-width:0;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:10px;padding:9px 32px 9px 12px;font-size:.85rem;cursor:pointer;appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);background-position:calc(100% - 16px) center,calc(100% - 11px) center;b … [line shortened here: 459 characters; full line on GitHub]
select:focus-visible,button:focus-visible{outline:none;border-color:var(--cyan);box-shadow:0 0 0 2px rgba(0,229,255,.18)}
.count{font-family:ui-monospace,monospace;font-size:.72rem;color:var(--muted);margin-left:auto;white-space:nowrap}
.count b{color:var(--text);font-weight:600}
.controls{display:flex;align-items:center;gap:8px 14px;flex-wrap:wrap;padding:8px 0 4px}
.seg{display:inline-flex;border:1px solid var(--line);border-radius:999px;overflow:hidden;flex:none;background:rgba(18,21,28,.7)}
.seg button{border:0;background:transparent;color:var(--muted);font-size:.72rem;padding:7px 13px;cursor:pointer;white-space:nowrap}
.seg button[aria-pressed="true"]{background:rgba(0,229,255,.16);color:var(--text)}
.seg button.gh[aria-pressed="true"]{background:rgba(184,204,255,.18)}
.seg button.ext[aria-pressed="true"]{background:rgba(95,118,164,.28)}
.seg button:disabled{opacity:.4;cursor:not-allowed}
.viewbtn{border:1px solid rgba(255,255,255,.55);background:rgba(255,255,255,.08);color:#fff;border-radius:999px;padding:6px 12px;cursor:pointer;font-size:.86rem;line-height:1;display:inline-flex;align-items:center;gap:7px}
.viewbtn[aria-pressed="true"]{border-color:var(--cyan);background:rgba(0,229,255,.16);box-shadow:0 0 22px rgba(0,229,255,.12)}
.srctag{margin-left:auto;font-family:ui-monospace,monospace;font-size:.56rem;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);border:1px solid var(--line);border-radius:999px;padding:2px 8px}
.srctag.live{color:var(--cyan);border-color:rgba(0,229,255,.4)}
.crumbs{display:flex;align-items:center;gap:6px;padding:2px 0 0;font-family:ui-monospace,monospace;font-size:.66rem;color:var(--muted);min-height:18px}
.crumbs a{color:var(--cyan);cursor:pointer;text-decoration:none}
.crumbs .sep{opacity:.5}
.hint{padding:4px 0 8px;font-family:ui-monospace,monospace;font-size:.62rem;color:var(--muted)}
.hint b{color:var(--text);font-weight:600}
.stage{flex:1;min-height:0;position:relative;overflow:hidden}
.overlay{position:absolute;inset:0}
.overlay.column{overflow-y:auto;overflow-x:hidden;padding:16px var(--safe-x) max(env(safe-area-inset-bottom),22px)}
.shell{width:min(var(--shell),100%);margin:0 auto;display:flex;flex-direction:column;gap:12px}
.card{border:1px solid var(--line);border-radius:14px;background:linear-gradient(160deg,rgba(255,255,255,.055),rgba(255,255,255,.014));padding:10px 12px;display:flex;flex-direction:column;gap:6px;min-height:74px;box-shadow:0 16px 44px rgba(0,0,0,.12)}
.card .row{display:flex;align-items:center;gap:7px}
.badge{font-family:ui-monospace,monospace;font-size:.55rem;letter-spacing:.07em;border:1px solid var(--line);border-radius:6px;padding:2px 5px;color:var(--muted);flex:none}
.name{font-size:.85rem;font-weight:650;line-height:1.15;overflow-wrap:anywhere}
.dot{width:9px;height:9px;border-radius:50%;flex:none;margin-left:auto;box-shadow:0 0 8px currentColor}
.reason{font-size:.68rem;color:var(--muted);line-height:1.25}
.relrow{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.reltag{font-family:ui-monospace,monospace;font-size:.55rem;letter-spacing:.05em;text-transform:uppercase;padding:1px 7px;border-radius:999px;border:1px solid currentColor}
.arrow{font-family:ui-monospace,monospace;font-size:.62rem;color:var(--muted)}
.go{font-family:ui-monospace,monospace;font-size:.6rem;color:var(--cyan);margin-left:auto}
.is-center{border-color:var(--cyan);box-shadow:0 0 0 1px rgba(0,229,255,.22),0 0 26px rgba(0,229,255,.12)}
.is-center .name{font-size:.95rem}
.contents{align-self:flex-start;margin-top:3px;font-family:ui-monospace,monospace;font-size:.62rem;color:var(--cyan);border:1px solid rgba(0,229,255,.4);border-radius:999px;padding:4px 10px;background:rgba(0,229,255,.08);cursor:pointer}
.inert{opacity:.34}
.sect{font-family:ui-monospace,monospace;font-size:.6rem;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);margin:16px 2px 4px}
.branch{position:relative;padding-left:20px;display:flex;flex-direction:column;gap:9px}
.branch::before{content:"";position:absolute;left:7px;top:-6px;bottom:14px;width:2px;background:var(--line)}
.twig{position:relative;cursor:pointer}
.twig::before{content:"";position:absolute;left:-13px;top:28px;width:13px;height:2px;background:var(--twig,var(--line))}
.twig .card{border-left:3px solid var(--twig,var(--line))}
.empty{color:var(--muted);font-size:.78rem;padding:6px 2px}
.overlay.spider{overflow:auto;cursor:grab;background:radial-gradient(circle at center,rgba(0,229,255,.045),transparent 45%)}
.overlay.spider.dragging{cursor:grabbing;user-select:none}
.spiderCanvas{position:relative;min-width:100%;min-height:100%}
.spiderGrid{position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),linear-gradient(90deg,rgba(255,255,255,.03) 1px, transparent 1px);background-size:80px 80px;mask-image:radial-gradient(circle at center,black,transparent 78%);pointer-events:none}
.wires{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
.spoke{stroke-width:1.8;fill:none;opacity:.88}
.place{position:absolute;transform:translate(-50%,-50%);width:var(--card);cursor:pointer}
.place.center{width:250px;cursor:default}
.legend{position:sticky;left:14px;bottom:10px;display:flex;flex-wrap:wrap;gap:5px 12px;width:max-content;max-width:70%;pointer-events:none;padding:4px 0 10px 14px}
.legend span{display:flex;align-items:center;gap:6px;font-family:ui-monospace,monospace;font-size:.58rem;letter-spacing:.05em;text-transform:uppercase;color:var(--muted)}
.legend i{width:15px;height:0;border-top:2px solid;display:inline-block}
.maphint{position:sticky;top:12px;left:14px;width:max-content;max-width:min(560px,calc(100vw - 32px));font-family:ui-monospace,monospace;font-size:.62rem;color:var(--muted);background:rgba(18,21,28,.8);border:1px solid var(--line);border-radius:999px;padding:5px 10px;backdrop-filter:blur(10px);z-index:5}
@media (max-width:680px){:root{--safe-x:14px}.brand{min-width:100%}.bar{gap:8px}.count{width:100%;margin-left:0}.controls{gap:7px 10px}.seg button{padding:7px 10px;font-size:.68rem}.viewbtn{padding:6px 10px}.srctag{margin-left:0}.shell{gap:10px}.card{border-radius:12px}.name{font-size:.82rem}}
</style>
<link rel="stylesheet" href="../federation_radial.css" />
</head>
<body>
<div class="top">
<div class="bar">
<div class="brand"><span class="ey">Ventus · Global Grid 2050</span><h1>The Spider Sandbox</h1></div>
<div class="pick"><label for="focus">Focus</label><select id="focus"></select></div>
<div class="count" id="count"></div>
</div>
<div class="controls">
<span class="grouplabel">Show</span>
<div class="seg" id="relSeg" role="group" aria-label="Relationship direction">
<button data-mode="both" aria-pressed="true">Both</button>
<button data-mode="out" aria-pressed="false">Outgoing</button>
<button data-mode="in" aria-pressed="false">Incoming</button>
</div>
<button class="viewbtn" id="spiderToggle" aria-pressed="false" title="Toggle optional spider view"><span class="spider-glyph" aria-hidden="true">🕷</span><span id="viewLabel">Spider</span></button>
<span class="grouplabel">Tap does</span>
<div class="seg" id="actSeg" role="group" aria-label="Tap action">
<button data-act="explore" aria-pressed="true">Explore</button>
<button class="gh" data-act="github" aria-pressed="false">GitHub</button>
<button class="ext" data-act="external" aria-pressed="false">External</button>
<button data-act="status" aria-pressed="false" disabled title="Enables when the page reads live scanner data">Status</button>
</div>
<span class="srctag" id="srcTag" title="Data source for this view">snapshot</span>
</div>
<div class="crumbs" id="crumbs"></div>
<div class="hint" id="hint"></div>
</div>
<div class="stage" id="stage"><div class="overlay column" id="overlay"></div></div>
<script>
const GH_BASE="https://github.com/Ventusltd/data-federation-map-for-globalgrid2050-all-repos";
const LIVE_PAGE="https://ventusltd.github.io/data-federation-map-for-globalgrid2050-all-repos/live_sandbox/federation_control_ledger/";
const EXT_HOME={"DuckDB":"https://duckdb.org","Parquet":"https://parquet.apache.org","GitHub Actions":"https://github.com/features/actions","Elexon BMRS API":"https://bmrs.elexon.co.uk","GitHub Pages":"https://pages.github.com"};
const PAGE_HOME={"globalgrid2050":"https://globalgrid2050.com/","globalgrid2050-hompage":"https://globalgrid2050.com/","data-federation-map-for-globalgrid2050-all-repos":LIVE_PAGE};
const ROOT_NODES=[
{label:"data-federation-map-for-globalgrid2050-all-repos",type:"data",rag:"green",reason:"active federation repository",child:"data-federation"},
{label:"data-gb-electricity",type:"data",rag:"red",reason:"contract finding surfaced"},
{label:"data-interconnectors",type:"data",rag:"red",reason:"contract finding surfaced"},
{label:"gb-electricity-ui",type:"ui",rag:"red",reason:"depends on verified data repos"},
{label:"globalgrid2050",type:"source_archive",rag:"blue",reason:"source archive"},
{label:"globalgrid2050-hompage",type:"homepage",rag:"green",reason:"homepage dependency surfaced"},
{label:"pandapower",type:"unknown",rag:"grey",reason:"not fully classified"},
{label:"Podcast-transcripts",type:"unknown",rag:"amber",reason:"workflow finding"},
{label:"pv-arc-protection-circuit",type:"unknown",rag:"amber",reason:"workflow finding"},
{label:"Solar-PV-Hybrid-and-off-grid",type:"unknown",rag:"amber",reason:"workflow finding"},
{label:"solar-repowering-whitepaper",type:"unknown",rag:"amber",reason:"workflow finding"},
{label:"youengineer-code-review",type:"ui",rag:"amber",reason:"reference UI pattern source"},
{label:"DuckDB",type:"external",rag:"blue",reason:"proof query engine"},
{label:"Parquet",type:"external",rag:"blue",reason:"columnar proof store"},
{label:"Elexon BMRS API",type:"external",rag:"blue",reason:"external electricity source"},
{label:"GitHub Actions",type:"external",rag:"blue",reason:"static build runner"},
];
const ROOT_EDGES=[
[0,12,"external"],[0,13,"external"],[0,5,"governance"],[0,15,"external"],[0,14,"external"],
[1,4,"archive"],[1,5,"governance"],[1,14,"external"],[1,15,"external"],[1,12,"external"],[1,13,"external"],
[2,4,"archive"],[2,5,"governance"],[2,14,"external"],[2,13,"external"],[2,1,"repo"],[2,3,"repo"],[2,15,"external"],[2,12,"external"],
[3,1,"data"],[3,2,"data"],[3,5,"governance"],[3,15,"external"],
[4,14,"external"],[4,15,"external"],
[5,14,"external"],[5,0,"data"],[5,1,"data"],[5,2,"data"],[5,3,"repo"],[5,4,"archive"],[5,12,"external"],[5,13,"external"],[5,15,"external"],
[6,15,"external"],
];
function applyRootLinks(nodes){nodes.forEach(n=>{n.gh=n.type==="external"?null:`https://github.com/Ventusltd/${n.label}`;n.ext=EXT_HOME[n.label]||PAGE_HOME[n.label]||null;});return nodes;}
applyRootLinks(ROOT_NODES);
const CHILD_NODES=[
{label:"data-federation repo",type:"data",rag:"green",reason:"root of this child scope",gh:GH_BASE+"/tree/main"},
{label:"live dashboard page",type:"ui",rag:"green",reason:"GitHub Pages browser UI in this repo",gh:GH_BASE+"/tree/main/live_sandbox/federation_control_ledger",ext:LIVE_PAGE},
{label:"index.html",type:"ui",rag:"green",reason:"page shell for the board",gh:GH_BASE+"/blob/main/live_sandbox/federation_control_ledger/index.html"},
{label:"app.js",type:"ui",rag:"green",reason:"board renderer and interaction logic",gh:GH_BASE+"/blob/main/live_sandbox/federation_control_ledger/app.js"},
{label:"style.css",type:"ui",rag:"green",reason:"board visual system",gh:GH_BASE+"/blob/main/live_sandbox/federation_control_ledger/style.css"},
{label:"data cartridge folder",type:"data",rag:"green",reason:"manifest, nodes, edges, layers, sectors",gh:GH_BASE+"/tree/main/live_sandbox/federation_control_ledger/data"},
{label:"data/manifest.json",type:"data",rag:"amber",reason:"root cartridge manifest; key still flagged",gh:GH_BASE+"/blob/main/live_sandbox/federation_control_ledger/data/manifest.json"},
{label:"data/nodes.json",type:"data",rag:"green",reason:"repo and source nodes for the board",gh:GH_BASE+"/blob/main/live_sandbox/federation_control_ledger/data/nodes.json"},
{label:"data/edges.json",type:"data",rag:"green",reason:"relationship lines for the board",gh:GH_BASE+"/blob/main/live_sandbox/federation_control_ledger/data/edges.json"},
{label:"reports folder",type:"unknown",rag:"green",reason:"scan reports and evidence",gh:GH_BASE+"/tree/main/reports"},
{label:"FEDERATION_MAP_LATEST.md",type:"unknown",rag:"green",reason:"latest human-readable scan report",gh:GH_BASE+"/blob/main/reports/FEDERATION_MAP_LATEST.md"},
{label:"every-drop-is-the-ocean",type:"unknown",rag:"green",reason:"canonical doctrine and addenda",gh:GH_BASE+"/tree/main/every-drop-is-the-ocean"},
{label:"GitHub Pages",type:"external",rag:"blue",reason:"static public hosting",ext:LIVE_PAGE},
{label:"GitHub Actions",type:"external",rag:"blue",reason:"future scanner and validation runner",ext:EXT_HOME["GitHub Actions"],gh:GH_BASE+"/actions"},
];
const CHILD_EDGES=[[0,1,"repo"],[1,2,"repo"],[1,3,"repo"],[1,4,"repo"],[1,5,"data"],[3,5,"data"],[5,6,"data"],[5,7,"data"],[5,8,"data"],[0,9,"governance"],[9,10,"governance"],[0,11,"governance"],[1,12,"external"],[0,13,"external"],[3,13,"external"]];
const SCOPES={"root":{label:"Federation",nodes:ROOT_NODES,edges:ROOT_EDGES},"data-federation":{label:"data-federation internals",nodes:CHILD_NODES,edges:CHILD_EDGES}};
const RAG={green:"#00ff88",amber:"#ffcc00",red:"#ff5555",blue:"#3aa0ff",grey:"#9298a6"};
const ECSS={data:"#00e5ff",governance:"#b47cff",archive:"#7da0c8",external:"#5f76a4",repo:"#b8ccff",workflow:"#00ffff"};
const BADGE={data:"DB",ui:"UI",homepage:"WEB",source_archive:"SRC",unknown:"REPO",external:"EXT"};
const REL={data:"data",governance:"governance",archive:"archive",external:"external",repo:"repo ref",workflow:"workflow"};
const SVGNS="http://www.w3.org/2000/svg";
let mode="both", action="explore", view="column", current=0, scopeKey="root", stack=[];
const sel=document.getElementById("focus"), overlay=document.getElementById("overlay"), elCount=document.getElementById("count"), elCrumbs=document.getElementById("crumbs"), elHint=document.getElementById("hint"), spiderToggle=document.getElementById("spiderToggle"), viewLabel=document.getElementById("viewLabel");
function S(){return SCOPES[scopeKey];}
function rebuildSelect(){sel.innerHTML="";S().nodes.forEach((n,i)=>{const o=document.createElement("option");o.value=i;o.textContent=n.label;sel.appendChild(o);});sel.value=current;}
sel.addEventListener("change",()=>{current=+sel.value;draw();});
document.querySelectorAll("#relSeg button").forEach(b=>b.addEventListener("click",()=>{mode=b.dataset.mode;document.querySelectorAll("#relSeg button").forEach(x=>x.setAttribute("aria-pressed",String(x===b)));draw();}));
document.querySelectorAll("#actSeg button").forEach(b=>b.addEventListener("click",()=>{if(b.disabled)return;action=b.dataset.act;document.querySelectorAll("#actSeg button").forEach(x=>x.setAttribute("aria-pressed",String(x===b)));draw();}));
spiderToggle.addEventListener("click",()=>{view=view==="spider"?"column":"spider";spiderToggle.setAttribute("aria-pressed",String(view==="spider"));viewLabel.textContent=view==="spider"?"Column":"Spider";draw();});
let rt;new ResizeObserver(()=>{clearTimeout(rt);rt=setTimeout(draw,80);}).observe(document.getElementById("stage"));
function actionable(n){return action==="explore" ? true : action==="github" ? !!n.gh : action==="external" ? !!n.ext : false;}
function openUrl(u){if(u)window.open(u,"_blank","noopener");}
function handleTap(i){const n=S().nodes[i];if(action==="explore"){current=i;sel.value=i;draw();}else if(action==="github"){openUrl(n.gh);}else if(action==="external"){openUrl(n.ext);}}
function drillInto(childKey){stack.push({key:scopeKey,current});scopeKey=childKey;current=0;mode="both";document.querySelectorAll("#relSeg button").forEach(x=>x.setAttribute("aria-pressed",String(x.dataset.mode==="both")));rebuildSelect();draw();}
function popTo(idx){const target=stack[idx];stack=stack.slice(0,idx);scopeKey=target.key;current=target.current;rebuildSelect();draw();}
function neighbours(idx){const out=[],inc=[];S().edges.forEach(([f,t,ty])=>{if(f===idx)out.push({other:t,type:ty});if(t===idx)inc.push({other:f,type:ty});});return {out,inc};}
function cardInner(node,opts={}){const center=opts.center, rel=opts.rel, dim=opts.dim;let relHTML="";if(rel){const c=ECSS[rel.type]||ECSS.repo;relHTML=`<div class="relrow"><span class="arrow">${rel.dir==="out"?"depends on →":"← depended on by"}</span><span class="reltag" style="color:${c}">${REL[rel.type]||rel.type}</span>${opts.go?`<span class="go">${opts.go}</span>`:""}</div>`;}let contents="";i … [line shortened here: 959 characters; full line on GitHub]
function goLabel(n){return action==="github"&&n.gh?"open ↗":action==="external"&&n.ext?"open ↗":"";}
function setHint(){const base={explore:"<b>Explore</b> — tap a card to re-centre. Use the spider only when you choose it.",github:"<b>GitHub</b> — tap a repo to open it. Cards with no repo are dimmed.",external:"<b>External</b> — tap an external system to open it. Others are dimmed."};elHint.innerHTML=(base[action]||"")+(view==="spider"?" <b>Spider view</b> — scroll or drag the large canvas … [line shortened here: 408 characters; full line on GitHub]
function setCrumbs(){elCrumbs.innerHTML="";const trail=[...stack.map((s,i)=>({label:SCOPES[s.key].label,idx:i})),{label:S().label,idx:-1}];trail.forEach((c,k)=>{if(k)elCrumbs.insertAdjacentHTML("beforeend",`<span class="sep">›</span>`);if(c.idx===-1){const s=document.createElement("strong");s.textContent=c.label;s.style.color="var(--text)";elCrumbs.appendChild(s);}else{const a=document.createEleme … [line shortened here: 504 characters; full line on GitHub]
function draw(){const nodes=S().nodes,focus=nodes[current];let {out,inc}=neighbours(current);let lo=mode==="in"?[]:out,li=mode==="out"?[]:inc;elCount.innerHTML=`<b>${out.length}</b> dependencies · <b>${inc.length}</b> dependents`;setHint();setCrumbs();overlay.innerHTML="";overlay.className="overlay "+view;if(view==="spider")drawSpider(focus,lo,li);else drawColumn(focus,lo,li);overlay.q … [line shortened here: 523 characters; full line on GitHub]
function drawColumn(focus,out,inc){const nodes=S().nodes;const shell=document.createElement("div");shell.className="shell";shell.innerHTML=`<div class="focuswrap">${cardInner(focus,{center:true,dim:!actionable(focus),go:goLabel(focus)})}</div>`;const section=(title,items,dir)=>{const s=document.createElement("div");s.innerHTML=`<div class="sect">${title}</div>`;if(!items.length){const e=document.c … [line shortened here: 1,162 characters; full line on GitHub]
function marker(defs,type){const m=document.createElementNS(SVGNS,"marker");m.id="arr-"+type;m.setAttribute("viewBox","0 0 10 10");m.setAttribute("refX","9");m.setAttribute("refY","5");m.setAttribute("markerWidth","8");m.setAttribute("markerHeight","8");m.setAttribute("orient","auto");const p=document.createElementNS(SVGNS,"path");p.setAttribute("d","M0,0 L10,5 L0,10 z");p.setAttribute("fill",ECSS … [line shortened here: 457 characters; full line on GitHub]
function distribute(items,side,cx,cy,gap,xGap){const n=items.length;if(!n)return[];return items.map((it,k)=>{const y=cy+(k-(n-1)/2)*gap;const stagger=(n>5&&k%2?90:0);const x=cx+side*(xGap+stagger);return{...it,dir:side>0?"out":"in",x,y};});}
function drawSpider(focus,out,inc){const stage=document.getElementById("stage");const sw=stage.clientWidth,sh=stage.clientHeight;const maxSide=Math.max(out.length,inc.length,1);const gap=176;const xGap=Math.max(420,260+maxSide*38);const cw=Math.max(sw,Math.ceil(680+xGap*2+maxSide*120));const ch=Math.max(sh,Math.ceil(520+gap*(maxSide+1)));const cx=cw/2,cy=ch/2;const pts=[...distribute(out,1,cx,cy,g … [line shortened here: 2,606 characters; full line on GitHub]
function enableDragPan(el){let down=false,sx=0,sy=0,sl=0,st=0;el.onpointerdown=e=>{if(e.target.closest("button,select"))return;down=true;sx=e.clientX;sy=e.clientY;sl=el.scrollLeft;st=el.scrollTop;el.classList.add("dragging");el.setPointerCapture(e.pointerId);};el.onpointermove=e=>{if(!down)return;el.scrollLeft=sl-(e.clientX-sx);el.scrollTop=st-(e.clientY-sy);};el.onpointerup=e=>{down=false;el.clas … [line shortened here: 549 characters; full line on GitHub]
const DATA_BASE="../../live_sandbox/federation_control_ledger/data/";
const CHILD_KEY="data-federation";
function reshapeNodes(fc){return (fc.features||[]).map(f=>{const p=f.properties||{};const cm=p.child_manifest||null;return {label:p.label||f.id,type:p.repo_type||p.scope_type||"unknown",rag:p.rag||p.status||"grey",reason:p.status_reason||"",child:(cm&&/data-federation/.test(cm))?CHILD_KEY:null};});}
async function loadJSON(path){const r=await fetch(DATA_BASE+path,{cache:"no-cache"});if(!r.ok)throw new Error(path+" "+r.status);return r.json();}
async function loadRoot(){try{const [nf,ef]=await Promise.all([loadJSON("nodes.json"),loadJSON("edges.json")]);const nodes=reshapeNodes(nf);if(!nodes.length)throw new Error("empty");applyRootLinks(nodes);SCOPES.root.nodes=nodes;SCOPES.root.edges=(ef.edges||[]).map(e=>[e[0],e[1],e[2]]);return "live";}catch(e){return "snapshot";}}
const CONTENTS_BASE="../../data/federation_map/contents/provenance=declared/repo=Ventusltd__globalgrid2050/";
const MONO_GH="https://github.com/Ventusltd/globalgrid2050";
const CONTENTS_KEY="globalgrid2050-contents";
async function loadContents(){try{const get=p=>fetch(CONTENTS_BASE+p,{cache:"no-cache"}).then(r=>{if(!r.ok)throw new Error(p+" "+r.status);return r.json();});const [mf,nf,ef]=await Promise.all([get("manifest.json"),get("nodes.json"),get("edges.json")]);if(!Array.isArray(nf)||!nf.length)throw new Error("empty nodes");BADGE.eye_app="EYE";BADGE.sense_app="SENSE";BADGE.served_surface="PAGE";REL.contai … [line shortened here: 1,115 characters; full line on GitHub]
(async()=>{const src=await loadRoot();await loadContents();const tag=document.getElementById("srcTag");if(tag){tag.textContent=src;tag.classList.toggle("live",src==="live");}rebuildSelect();draw();})();
</script>
</body>
</html>Federation
A configuration file in Data Federation Map for GlobalGrid2050 All Repos.
docs-configdata-federation-map-for-globalgrid2050-all-repos / federation.yaml · lines 1–27 of 27 · Not reached from any entry point (candidate for review)
- What it does
- It loads data. Side effects: uses storage (browser storage, DuckDB or Parquet).
- Why it exists in the grid workflow
- Domain stage site_feasibility (topic 'maps-gis'): substation-to-site feasibility (terrain, LiDAR and connection evidence before design), a journey named in Ventus Ltd's brief.
- What it achieves
- Authoritative backend metadata map for the GlobalGrid2050 repository federation.
- Why it matters
- No other file in the estate was found to import it.
- Application
- data-federation-map-for-globalgrid2050-all-repos · / · configuration
- Uses
- none found
- Used by
- none found
- 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
- data-federation-map-for-globalgrid2050-all-repos@fffd624e77d820ebc04ab25f9d97871b254be61c federation.yaml:1-27 · blob 132de2a868ec6a5af3d96d1f98bf47582bb4c28e · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: ingest · effects: storage · domain stage: site_feasibility · users: IPP_developer, landowner_planner · canonical: unreached_review
schemaVersion: globalgrid2050.federation_manifest.v1
repo: Ventusltd/data-federation-map-for-globalgrid2050-all-repos
role: data
owner: Ventus Ltd
purpose: Authoritative backend metadata map for the GlobalGrid2050 repository federation.
status: active
dataProducts:
- name: federation_map_nodes
format: parquet/zstd
grain: one row per discovered repository or external source node per scan
key: scanId + nodeId
path: data/federation_map/current/nodes.parquet
- name: federation_map_edges
format: parquet/zstd
grain: one row per dependency edge per evidence source per scan
key: scanId + edgeId
path: data/federation_map/current/edges.parquet
dependencies:
- repo: Ventusltd/globalgrid2050-hompage
type: governance_dependency
purpose: Reads the data discipline manual and supplies homepage visual consumer context.
cardinality: many-to-one
workflows:
- file: .github/workflows/gridbot_federation_map_weekly.yml
purpose: Weekly and manual all-repos metadata scan.
schedule: weekly
dispatchable: trueLive Sandbox — Blank Canvas Page
A web page covering the Renewable Energy Planning Database (REPD) register and uses data from Elexon Balancing Mechanism Reporting Service (BMRS). Published at https://ventusltd.github.io/data-federation-map-for-globalgrid2050-all-repos/live_sandbox/blank_canvas/.
renderdata-federation-map-for-globalgrid2050-all-repos / live_sandbox/blank_canvas/index.html · lines 1–128 of 128 · Entry point · pattern detect (shared by 2 files)
- What it does
- It draws the REPD register. Defines 11 functions or classes, including escapeHtml, detect, fallback, link, tabsFor. Side effects: changes the web page (DOM); uses storage (browser storage, DuckDB or Parquet).
- Why it exists in the grid workflow
- Domain stage experimental (path word 'sandbox'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow. Domain terms in the code: the REPD register.
- Inputs & outputs
- In: data source: Elexon BMRS; browser storage (getItem); form fields (user input). Out: browser storage (setItem); web page.
- Downstream impact
- It is itself an entry point, published at https://ventusltd.github.io/data-federation-map-for-globalgrid2050-all-repos/live_sandbox/blank_canvas/.
- What it achieves
- It is built from the escape HTML helper (`escapeHtml`), the detect step (`detect`) and the fallback step (`fallback`). Single Target Workspace. It responds to submit events.
- Why it matters
- No other file in the estate was found to import it; it is an entry point.
- Application
- data-federation-map-for-globalgrid2050-all-repos · live_sandbox/blank_canvas · page
- Uses
- GlobalGrid2050 — Renewable Energy Planning Database (REPD) Grid Atlas v8 Page (estate URL)
- Used by
- none found
- Produces
- escapeHtml, detect, fallback, link, tabsFor, targetPanel, oldPanel, portPanel, render, activate, load
- Defines here
- escapeHtml, detect, fallback, link, tabsFor, targetPanel, oldPanel, portPanel, render, activate, load
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- data-federation-map-for-globalgrid2050-all-repos@fffd624e77d820ebc04ab25f9d97871b254be61c live_sandbox/blank_canvas/index.html:1-128 · blob d9568d92b6363a4520e0c52ba3cbbd7e064becda · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom, storage · domain stage: experimental · users: none · canonical: supporting_data
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Single Target Workspace | GlobalGrid2050</title>
<style>
:root{--bg:#070a0f;--panel:#101722;--panel2:#121d2a;--line:#2b3444;--text:#f6f8ff;--muted:#9aa7ba;--cyan:#00e5ff;--cyan2:#67f8ff;--amber:#ffcc66;--red:#ff6666;--soft:rgba(0,229,255,.14)}
*{box-sizing:border-box} html,body{margin:0;width:100%;min-height:100%;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;overflow:hidden}
main{width:100vw;height:100vh;height:100dvh;display:grid;grid-template-rows:auto auto 1fr;gap:10px;padding:12px;background:radial-gradient(circle at 50% 42%,rgba(0,229,255,.08),transparent 34%),var(--bg)}
header{border:1px solid var(--line);border-radius:16px;background:rgba(16,23,34,.86);padding:12px 14px} h1{margin:0;font-size:clamp(1.2rem,3vw,1.9rem);line-height:1.05}.hint{margin:6px 0 0;color:var(--muted);font-size:.9rem}.composer{border:1px solid var(--line);border-radius:16px;background:rgba(16,23,34,.86);padding:12px}.row{display:flex;gap:8px}.row input{flex:1;min-width:0;border:1px soli … [line shortened here: 926 characters; full line on GitHub]
.workspace{min-height:0;overflow:auto;border:1px solid var(--line);border-radius:18px;background:rgba(7,10,15,.78);padding:14px;display:none}.workspace.show{display:block}.target-card{border:1px solid rgba(0,229,255,.55);border-radius:18px;background:linear-gradient(135deg,rgba(0,229,255,.16),rgba(16,23,34,.94));padding:14px;margin-bottom:12px}.label{margin:0 0 5px;color:var(--cyan2);font-size … [line shortened here: 1,857 characters; full line on GitHub]
@media(max-width:700px){main{padding:8px}.row{flex-direction:column}button,a.button{width:100%;text-align:center}.topline{display:block}.clearline button{width:auto}.panel{min-height:220px}}
</style>
</head>
<body>
<main>
<header>
<h1>Single Target Workspace</h1>
<p class="hint">Work on one page, repo or file at a time. Only tabs belonging to the selected target appear.</p>
</header>
<section class="composer">
<form class="row" id="linkForm">
<input id="linkInput" type="url" inputmode="url" placeholder="https://globalgrid2050.com/uk_energy_tracking_v6/generation_history/" autocomplete="off" />
<button type="submit">Load target</button>
</form>
<div class="clearline"><button class="ghost" id="sampleGeneration" type="button">Load Generation History example</button><button class="ghost" id="sampleRepd" type="button">Load REPD Grid Atlas example</button><button class="ghost" id="clearLink" type="button">Clear</button></div>
</section>
<section class="workspace" id="workspace" aria-label="Selected target workspace">
<article class="target-card">
<p class="label">Selected target only</p>
<div class="topline"><div><p class="title" id="targetTitle"></p><p class="url" id="targetUrl"></p></div><div class="actions"><a class="button" id="openTarget" href="#" target="_blank" rel="noopener">Open target</a></div></div>
</article>
<nav class="tabbar" id="tabbar" aria-label="Target-specific tabs"></nav>
<section class="panel" id="panel"></section>
</section>
</main>
<script>
const form=document.getElementById('linkForm');
const input=document.getElementById('linkInput');
const workspace=document.getElementById('workspace');
const targetTitle=document.getElementById('targetTitle');
const targetUrl=document.getElementById('targetUrl');
const openTarget=document.getElementById('openTarget');
const tabbar=document.getElementById('tabbar');
const panel=document.getElementById('panel');
const key='gg2050-single-target-workspace';
const KNOWN=[
{
id:'generation-history',
match:'/uk_energy_tracking_v6/generation_history',
title:'UK Energy Tracking V6 · Generation History',
kind:'Legacy app page / port target',
oldPage:'https://globalgrid2050.com/uk_energy_tracking_v6/generation_history/',
sourceRepo:{label:'globalgrid2050 legacy source archive',url:'https://github.com/Ventusltd/globalgrid2050'},
newBuild:{label:'gb-electricity-ui new build target',url:'https://github.com/Ventusltd/gb-electricity-ui'},
data:[
{label:'data-gb-electricity',url:'https://github.com/Ventusltd/data-gb-electricity',size:'not measured yet',note:'expected primary data dependency for GB electricity charts'},
{label:'Elexon / historical generation source files',url:'https://bmrs.elexon.co.uk/',size:'not measured yet',note:'upstream source family, exact extracted footprint still needs scanner'}
],
checklist:['Find old page source files','Identify current JSON/CSV data files','Measure data dependency size','Map old chart fields to new UI component','Build new equivalent beside old page','Retire old tab only after visual parity']
},
{
id:'repd-grid-atlas-v8',
match:'/repd_grid_atlasv8',
title:'REPD Grid Atlas v8',
kind:'Priority app page / incomplete port',
oldPage:'https://globalgrid2050.com/repd_grid_atlasv8/',
sourceRepo:{label:'globalgrid2050 legacy source archive',url:'https://github.com/Ventusltd/globalgrid2050'},
newBuild:{label:'new UI repo target to confirm',url:'https://github.com/Ventusltd/data-federation-map-for-globalgrid2050-all-repos'},
data:[
{label:'REPD / GIS source data',url:'https://www.gov.uk/government/publications/renewable-energy-planning-database-monthly-extract',size:'not measured yet',note:'old atlas data dependency to be measured and normalised'},
{label:'map / topology assets',url:'https://globalgrid2050.com/repd_grid_atlasv8/',size:'not measured yet',note:'old page assets need inventory'}
],
checklist:['Open old atlas','Find source page files','Measure GIS/data asset size','Choose new UI home','Port minimum visual equivalent','Add analytics after parity']
}
];
function escapeHtml(v){return String(v||'').replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c]));}
function detect(url){return KNOWN.find(x=>url.includes(x.match)) || null;}
function fallback(url){let title=url;try{const u=new URL(url);title=(u.hostname+u.pathname).replace(/\/$/,'');}catch(e){}return {id:'custom',title,kind:'Custom selected target',oldPage:url,sourceRepo:null,newBuild:null,data:[],checklist:['Identify owning repo','Identify data dependencies','Measure dependency size','Choose new build location','Port only this target']};}
function link(label,url){return url?`<a class="button" href="${escapeHtml(url)}" target="_blank" rel="noopener">${escapeHtml(label)}</a>`:'';}
function tabsFor(target){
const tabs=[
{id:'target',label:'Target',html:targetPanel(target)},
{id:'old',label:'Old page',html:oldPanel(target)},
{id:'owner',label:'Belongs to',html:ownerPanel(target)},
{id:'data',label:'Data deps',html:dataPanel(target)},
{id:'new',label:'New build',html:newPanel(target)},
{id:'port',label:'Port checklist',html:portPanel(target)}
];
return tabs.filter(t=>t.html);
}
function targetPanel(t){return `<div class="grid"><div class="box"><h3>What this is</h3><p><strong>${escapeHtml(t.title)}</strong></p><p>${escapeHtml(t.kind)}</p></div><div class="box"><h3>Rule</h3><p>Only this selected target and its direct dependencies are shown. Nothing else appears unless it belongs to this target.</p></div></div>`;}
function oldPanel(t){return `<div class="grid"><div class="box"><h3>Old live page</h3><p>${escapeHtml(t.oldPage)}</p><div class="actions">${link('Open old page',t.oldPage)}</div></div></div>`;}
function ownerPanel(t){if(!t.sourceRepo)return `<div class="box"><h3>Owning repo</h3><p class="empty">Not assigned yet. This is the next classification step.</p></div>`;return `<div class="grid"><div class="box"><h3>Owning / source repo</h3><p><strong>${escapeHtml(t.sourceRepo.label)}</strong></p><p>This is where the old target appears to belong until scanner evidence says otherwise.</p><div c … [line shortened here: 473 characters; full line on GitHub]
function dataPanel(t){if(!t.data.length)return `<div class="box"><h3>Data dependencies</h3><p class="empty">No dependencies declared yet. Add them only when this target needs them.</p><span class="size-pill">size unknown</span></div>`;return `<div class="grid">${t.data.map(d=>`<div class="box"><h3>${escapeHtml(d.label)}</h3><p>${escapeHtml(d.note)}</p><p><span class="size-pill">${escapeHtml(d. … [line shortened here: 503 characters; full line on GitHub]
function newPanel(t){if(!t.newBuild)return `<div class="box"><h3>New build</h3><p class="empty">No new build target assigned yet.</p></div>`;return `<div class="grid"><div class="box"><h3>New build location</h3><p><strong>${escapeHtml(t.newBuild.label)}</strong></p><p>Build the replacement beside the old page until it reaches visual and data parity.</p><div class="actions">${link('Open new bui … [line shortened here: 618 characters; full line on GitHub]
function portPanel(t){return `<div class="grid"><div class="box"><h3>Steps for this target only</h3>${t.checklist.map(x=>`<p>□ ${escapeHtml(x)}</p>`).join('')}</div></div>`;}
function render(url){
if(!url){workspace.classList.remove('show');return;}
const target=detect(url)||fallback(url);
targetTitle.textContent=target.title;
targetUrl.textContent=url;
openTarget.href=url;
workspace.classList.add('show');
const tabs=tabsFor(target);
tabbar.innerHTML=tabs.map((t,i)=>`<button type="button" data-tab="${t.id}" class="${i===0?'active':''}">${escapeHtml(t.label)}</button>`).join('');
function activate(id){const tab=tabs.find(x=>x.id===id)||tabs[0];panel.innerHTML=tab.html;tabbar.querySelectorAll('button').forEach(b=>b.classList.toggle('active',b.dataset.tab===tab.id));}
tabbar.querySelectorAll('button').forEach(b=>b.onclick=()=>activate(b.dataset.tab));
activate(tabs[0].id);
}
function load(value){const url=value.trim();if(!url)return;localStorage.setItem(key,url);input.value=url;render(url);}
form.addEventListener('submit',e=>{e.preventDefault();load(input.value);});
document.getElementById('clearLink').onclick=()=>{localStorage.removeItem(key);input.value='';render('');input.focus();};
document.getElementById('sampleGeneration').onclick=()=>load('https://globalgrid2050.com/uk_energy_tracking_v6/generation_history/');
document.getElementById('sampleRepd').onclick=()=>load('https://globalgrid2050.com/repd_grid_atlasv8/');
const saved=localStorage.getItem(key)||'';input.value=saved;render(saved);input.focus();
</script>
</body>
</html>