Plan, apply and roll back changes to a production ontology, with a blast radius report and a proof an auditor can re-check.
Rust ai-nativedescription-logicsformal-verificationinfrastructure-as-codeisabelle-languageknowledge-graphleanlean4mcpmcp-serverontologyowlowl2reasoningrustshaclsparqltheorem-proving
Add UK Zero-Emission Flight Ecosystem case study
fabio4eefcfa4a466
diff --git a/case-studies/zero-emission-aviation/README.md b/case-studies/zero-emission-aviation/README.mdnew file mode 100644index 00000000..466f13e9--- /dev/null+++ b/case-studies/zero-emission-aviation/README.md@@ -0,0 +1,84 @@+# UK Zero-Emission Flight Ecosystem — an open, computation-ready reference graph++An open, SHACL-validated knowledge graph of the UK hydrogen and electric aviation ecosystem:+organisations, airports, programmes, projects, funders, bodies, alliances and technologies, and the+relationships between them. Built by [The Tesseract Academy](https://gov.tesseract.academy) as an open+reference asset for computation-ready modelling of a fragmented innovation ecosystem.++> **Independent open reference dataset.** Compiled from public sources for demonstration of+> computation-ready ecosystem modelling. Not affiliated with, endorsed by, or a deliverable for any+> organisation named within it. Indicative maturity values are compiled from public roadmaps and+> statements, each dated, and are not an authoritative assessment. Licence: CC BY 4.0.++## Why this exists++The UK zero-emission-flight sector has strong policy signals and funding, but its data (who is building+what, who funds whom, which technologies gate which pathway) sits scattered across press releases,+programme pages and reports. That fragmentation is exactly the problem a coordination tool has to solve.+This case study shows the underlying data engineering done in the open: a typed entity model, a+controlled vocabulary, and machine-readable validation so that **only stated relationships are+represented and none are inferred**.++## What it contains (measured)++| Metric | Value |+| --- | --- |+| Entities | 42 |+| Relationships | 55 |+| RDF triples | 272 |+| SHACL violations | **0** |+| Planted dangling edge caught by validation | **yes** |++Entities by type: 15 organisations, 6 projects, 3 programmes, 3 funders, 3 bodies, 4 airports,+1 alliance, 7 technologies. Relationships span `funds`, `develops`, `partnerOf`, `memberOf`,+`usesTechnology`, `basedAt`, `demonstratesAt`, `leads`, `regulates`, `coordinates` and `feedsInto`+(the hydrogen production-to-propulsion chain).++Named entities include ATI FlyZero, Project NAPKIN, ZeroAvia, Cranfield Aerospace Solutions,+GKN Aerospace (H2GEAR, H2FlyGHT), Rolls-Royce, Airbus ZEROe, the Hydrogen in Aviation alliance,+the Jet Zero Strategy, the ATI and UKRI Future Flight Challenge, and the DfT-funded, CPC-led+Zero Emission Flight Infrastructure (ZEFI) programme.++## The validation discipline (the point)++The SHACL shapes (`shapes/zef-shapes.ttl`) enforce three things:++1. **Every entity is labelled.**+2. **Every technology carries a maturity** from a controlled list+ (Research, Development, Demonstration, Pilot, Commercial) **and a provenance string** — maturity is+ never unsourced.+3. **Referential integrity on every relationship.** The object of every ecosystem link must be a+ declared entity. This is the graph-level equivalent of "only validated, provided relationships are+ shown and none are inferred". The pipeline includes a negative test that injects a dangling edge and+ confirms the validator catches it.++## Reproduce++```bash+pip install rdflib pyshacl networkx matplotlib+python3 pipeline/build_and_validate.py+```++This builds the graph from `data/ecosystem.json`, validates it against the shapes at zero violations,+runs the negative test, and writes `graph.ttl`, `demo/graph.json`, `metrics.json` and+`assets/ecosystem-graph.png`. Open `demo/index.html` for the interactive network view.++## Files++| Path | What |+| --- | --- |+| `data/ecosystem.json` | The curated, sourced dataset (entities + relationships). |+| `ontology/zef.ttl` | The ZEF vocabulary (classes and properties). |+| `shapes/zef-shapes.ttl` | SHACL shapes (labels, maturity + provenance, referential integrity). |+| `pipeline/build_and_validate.py` | Build, validate, negative test, export graph.ttl / graph.json / PNG. |+| `graph.ttl` | The generated RDF graph. |+| `demo/index.html` | Self-contained interactive network view. |+| `assets/ecosystem-graph.png` | Static network render. |+| `metrics.json` | Machine-readable metrics. |++## How this maps to real ecosystem-coordination platforms++The same three primitives shown here (a typed stakeholder graph, a controlled-vocabulary technology+model with sourced maturity, and referential-integrity validation) are the data spine of any+"single view" coordination tool for a fragmented sector. Building them in the open, on real named+entities, is how we demonstrate the capability rather than assert it.diff --git a/case-studies/zero-emission-aviation/assets/ecosystem-graph.png b/case-studies/zero-emission-aviation/assets/ecosystem-graph.pngnew file mode 100644index 00000000..68cf3610Binary files /dev/null and b/case-studies/zero-emission-aviation/assets/ecosystem-graph.png differdiff --git a/case-studies/zero-emission-aviation/demo/graph.json b/case-studies/zero-emission-aviation/demo/graph.jsonnew file mode 100644index 00000000..da5f9e90--- /dev/null+++ b/case-studies/zero-emission-aviation/demo/graph.json@@ -0,0 +1,617 @@+{+ "nodes": [+ {+ "id": "org:zeroavia",+ "label": "ZeroAvia",+ "type": "Organisation",+ "color": "#2e75b6",+ "note": "Hydrogen-electric powertrains (ZA600, ZA2000).",+ "maturity": ""+ },+ {+ "id": "org:caes",+ "label": "Cranfield Aerospace Solutions",+ "type": "Organisation",+ "color": "#2e75b6",+ "note": "Hydrogen-electric propulsion; Britten-Norman Islander conversion.",+ "maturity": ""+ },+ {+ "id": "org:gkn",+ "label": "GKN Aerospace",+ "type": "Organisation",+ "color": "#2e75b6",+ "note": "Hydrogen propulsion programmes H2GEAR and H2FlyGHT.",+ "maturity": ""+ },+ {+ "id": "org:rolls-royce",+ "label": "Rolls-Royce",+ "type": "Organisation",+ "color": "#2e75b6",+ "note": "Hydrogen combustion gas-turbine testing.",+ "maturity": ""+ },+ {+ "id": "org:airbus",+ "label": "Airbus",+ "type": "Organisation",+ "color": "#2e75b6",+ "note": "ZEROe hydrogen concept; timeline revised in 2025 to the later 2030s.",+ "maturity": ""+ },+ {+ "id": "org:easyjet",+ "label": "easyJet",+ "type": "Organisation",+ "color": "#2e75b6",+ "note": "Airline; Hydrogen in Aviation member; hydrogen ground-test partner.",+ "maturity": ""+ },+ {+ "id": "org:britten-norman",+ "label": "Britten-Norman",+ "type": "Organisation",+ "color": "#2e75b6",+ "note": "BN-2 Islander airframe used in Project Fresson.",+ "maturity": ""+ },+ {+ "id": "org:loganair",+ "label": "Loganair",+ "type": "Organisation",+ "color": "#2e75b6",+ "note": "UK regional operator; regional decarbonisation partner.",+ "maturity": ""+ },+ {+ "id": "org:intelligent-energy",+ "label": "Intelligent Energy",+ "type": "Organisation",+ "color": "#2e75b6",+ "note": "Hydrogen fuel-cell systems.",+ "maturity": ""+ },+ {+ "id": "org:orsted",+ "label": "Orsted",+ "type": "Organisation",+ "color": "#2e75b6",+ "note": "Energy company; Hydrogen in Aviation member (green hydrogen supply).",+ "maturity": ""+ },+ {+ "id": "org:deloitte",+ "label": "Deloitte",+ "type": "Organisation",+ "color": "#2e75b6",+ "note": "Commercial and blueprint lead on Project NAPKIN.",+ "maturity": ""+ },+ {+ "id": "org:ucl-ats",+ "label": "UCL Air Transportation Systems Lab",+ "type": "Organisation",+ "color": "#2e75b6",+ "note": "Airline Behaviour Model; route/demand modelling on NAPKIN.",+ "maturity": ""+ },+ {+ "id": "org:cranfield-uni",+ "label": "Cranfield University",+ "type": "Organisation",+ "color": "#2e75b6",+ "note": "Aerospace research; hydrogen integration.",+ "maturity": ""+ },+ {+ "id": "org:southampton",+ "label": "University of Southampton",+ "type": "Organisation",+ "color": "#2e75b6",+ "note": "NAPKIN research partner.",+ "maturity": ""+ },+ {+ "id": "air:heathrow",+ "label": "Heathrow Airport",+ "type": "Airport",+ "color": "#c0642a",+ "note": "Project NAPKIN lead.",+ "maturity": ""+ },+ {+ "id": "air:london-city",+ "label": "London City Airport",+ "type": "Airport",+ "color": "#c0642a",+ "note": "NAPKIN partner.",+ "maturity": ""+ },+ {+ "id": "air:bristol",+ "label": "Bristol Airport",+ "type": "Airport",+ "color": "#c0642a",+ "note": "Airside hydrogen refuelling trial (Project Acorn); Hydrogen in Aviation member.",+ "maturity": ""+ },+ {+ "id": "air:glasgow",+ "label": "Glasgow Airport",+ "type": "Airport",+ "color": "#c0642a",+ "note": "CPC Connected Airport Living Lab.",+ "maturity": ""+ },+ {+ "id": "org:hial",+ "label": "Highlands and Islands Airports",+ "type": "Organisation",+ "color": "#2e75b6",+ "note": "Sub-regional airport operator; NAPKIN partner.",+ "maturity": ""+ },+ {+ "id": "fund:dft",+ "label": "Department for Transport",+ "type": "Funder",+ "color": "#2f9e6f",+ "note": "Jet Zero Strategy; funds ZEFI and the Jet Zero programme.",+ "maturity": ""+ },+ {+ "id": "fund:ati",+ "label": "Aerospace Technology Institute",+ "type": "Funder",+ "color": "#2f9e6f",+ "note": "Funds aerospace propulsion R&D including FlyZero and hydrogen programmes.",+ "maturity": ""+ },+ {+ "id": "fund:ukri-ffc",+ "label": "UKRI Future Flight Challenge",+ "type": "Funder",+ "color": "#2f9e6f",+ "note": "Innovate UK / UKRI programme funding new aviation systems including NAPKIN and Fresson.",+ "maturity": ""+ },+ {+ "id": "body:jetzero",+ "label": "Jet Zero Council",+ "type": "Body",+ "color": "#555555",+ "note": "Government-industry partnership on UK aviation decarbonisation.",+ "maturity": ""+ },+ {+ "id": "body:caa",+ "label": "Civil Aviation Authority",+ "type": "Body",+ "color": "#555555",+ "note": "UK aviation regulator; hydrogen aerodrome safety.",+ "maturity": ""+ },+ {+ "id": "body:cpc",+ "label": "Connected Places Catapult",+ "type": "Body",+ "color": "#555555",+ "note": "Runs the Zero Emission Flight Infrastructure (ZEFI) programme.",+ "maturity": ""+ },+ {+ "id": "alliance:hia",+ "label": "Hydrogen in Aviation (HIA)",+ "type": "Alliance",+ "color": "#c0392b",+ "note": "Industry alliance for hydrogen-powered aviation.",+ "maturity": ""+ },+ {+ "id": "prog:zefi",+ "label": "Zero Emission Flight Infrastructure (ZEFI)",+ "type": "Programme",+ "color": "#1f3864",+ "note": "DfT-funded, CPC-led programme on airport hydrogen and electric infrastructure.",+ "maturity": ""+ },+ {+ "id": "prog:flyzero",+ "label": "ATI FlyZero",+ "type": "Programme",+ "color": "#1f3864",+ "note": "2021-2022 ATI study; concluded liquid hydrogen is the primary long-term zero-carbon aviation fuel.",+ "maturity": ""+ },+ {+ "id": "prog:jetzero-strategy",+ "label": "Jet Zero Strategy",+ "type": "Programme",+ "color": "#1f3864",+ "note": "DfT 2022 strategy for net-zero UK aviation by 2050.",+ "maturity": ""+ },+ {+ "id": "proj:napkin",+ "label": "Project NAPKIN",+ "type": "Project",+ "color": "#8e44ad",+ "note": "Future Flight Challenge project; sub-regional zero-emission flight blueprint; Heathrow-led.",+ "maturity": ""+ },+ {+ "id": "proj:hyflyer2",+ "label": "HyFlyer II",+ "type": "Project",+ "color": "#8e44ad",+ "note": "ZeroAvia hydrogen-electric flight demonstration project.",+ "maturity": ""+ },+ {+ "id": "proj:h2gear",+ "label": "H2GEAR",+ "type": "Project",+ "color": "#8e44ad",+ "note": "GKN Aerospace hydrogen fuel-cell propulsion programme.",+ "maturity": ""+ },+ {+ "id": "proj:h2flyght",+ "label": "H2FlyGHT",+ "type": "Project",+ "color": "#8e44ad",+ "note": "GKN Aerospace cryogenic hydrogen and electric propulsion programme.",+ "maturity": ""+ },+ {+ "id": "proj:fresson",+ "label": "Project Fresson",+ "type": "Project",+ "color": "#8e44ad",+ "note": "Cranfield Aerospace Solutions hydrogen fuel-cell Islander conversion.",+ "maturity": ""+ },+ {+ "id": "proj:acorn",+ "label": "Project Acorn",+ "type": "Project",+ "color": "#8e44ad",+ "note": "easyJet-led airside hydrogen refuelling trial at Bristol Airport.",+ "maturity": ""+ },+ {+ "id": "tech:fuelcell-powertrain",+ "label": "Hydrogen fuel-cell powertrain",+ "type": "Technology",+ "color": "#0b8a8a",+ "note": "",+ "maturity": "Demonstration"+ },+ {+ "id": "tech:h2-combustion",+ "label": "Hydrogen combustion gas turbine",+ "type": "Technology",+ "color": "#0b8a8a",+ "note": "",+ "maturity": "Demonstration"+ },+ {+ "id": "tech:lh2-storage",+ "label": "Liquid hydrogen cryogenic storage",+ "type": "Technology",+ "color": "#0b8a8a",+ "note": "",+ "maturity": "Development"+ },+ {+ "id": "tech:gh2-storage",+ "label": "Gaseous hydrogen storage",+ "type": "Technology",+ "color": "#0b8a8a",+ "note": "",+ "maturity": "Pilot"+ },+ {+ "id": "tech:electrolysis",+ "label": "Green hydrogen electrolysis",+ "type": "Technology",+ "color": "#0b8a8a",+ "note": "",+ "maturity": "Commercial"+ },+ {+ "id": "tech:lh2-refuelling",+ "label": "Airside liquid hydrogen refuelling",+ "type": "Technology",+ "color": "#0b8a8a",+ "note": "",+ "maturity": "Pilot"+ },+ {+ "id": "tech:liquefaction",+ "label": "Hydrogen liquefaction and distribution",+ "type": "Technology",+ "color": "#0b8a8a",+ "note": "",+ "maturity": "Commercial"+ }+ ],+ "edges": [+ {+ "from": "fund:dft",+ "to": "prog:zefi",+ "label": "funds"+ },+ {+ "from": "fund:dft",+ "to": "prog:jetzero-strategy",+ "label": "funds"+ },+ {+ "from": "body:cpc",+ "to": "prog:zefi",+ "label": "leads"+ },+ {+ "from": "fund:ati",+ "to": "prog:flyzero",+ "label": "funds"+ },+ {+ "from": "fund:ati",+ "to": "proj:h2gear",+ "label": "funds"+ },+ {+ "from": "fund:ati",+ "to": "proj:h2flyght",+ "label": "funds"+ },+ {+ "from": "fund:ati",+ "to": "proj:hyflyer2",+ "label": "funds"+ },+ {+ "from": "fund:ukri-ffc",+ "to": "proj:napkin",+ "label": "funds"+ },+ {+ "from": "fund:ukri-ffc",+ "to": "proj:fresson",+ "label": "funds"+ },+ {+ "from": "air:heathrow",+ "to": "proj:napkin",+ "label": "leads"+ },+ {+ "from": "org:deloitte",+ "to": "proj:napkin",+ "label": "partnerOf"+ },+ {+ "from": "org:ucl-ats",+ "to": "proj:napkin",+ "label": "partnerOf"+ },+ {+ "from": "org:cranfield-uni",+ "to": "proj:napkin",+ "label": "partnerOf"+ },+ {+ "from": "org:southampton",+ "to": "proj:napkin",+ "label": "partnerOf"+ },+ {+ "from": "air:london-city",+ "to": "proj:napkin",+ "label": "partnerOf"+ },+ {+ "from": "org:hial",+ "to": "proj:napkin",+ "label": "partnerOf"+ },+ {+ "from": "org:rolls-royce",+ "to": "proj:napkin",+ "label": "partnerOf"+ },+ {+ "from": "org:gkn",+ "to": "proj:napkin",+ "label": "partnerOf"+ },+ {+ "from": "org:caes",+ "to": "proj:napkin",+ "label": "partnerOf"+ },+ {+ "from": "org:zeroavia",+ "to": "proj:hyflyer2",+ "label": "develops"+ },+ {+ "from": "org:zeroavia",+ "to": "tech:fuelcell-powertrain",+ "label": "develops"+ },+ {+ "from": "org:gkn",+ "to": "proj:h2gear",+ "label": "develops"+ },+ {+ "from": "org:gkn",+ "to": "proj:h2flyght",+ "label": "develops"+ },+ {+ "from": "org:gkn",+ "to": "tech:fuelcell-powertrain",+ "label": "develops"+ },+ {+ "from": "org:caes",+ "to": "proj:fresson",+ "label": "develops"+ },+ {+ "from": "org:caes",+ "to": "tech:fuelcell-powertrain",+ "label": "develops"+ },+ {+ "from": "org:rolls-royce",+ "to": "tech:h2-combustion",+ "label": "develops"+ },+ {+ "from": "org:intelligent-energy",+ "to": "tech:fuelcell-powertrain",+ "label": "develops"+ },+ {+ "from": "org:airbus",+ "to": "tech:lh2-storage",+ "label": "develops"+ },+ {+ "from": "proj:fresson",+ "to": "tech:fuelcell-powertrain",+ "label": "usesTechnology"+ },+ {+ "from": "proj:fresson",+ "to": "tech:gh2-storage",+ "label": "usesTechnology"+ },+ {+ "from": "proj:hyflyer2",+ "to": "tech:fuelcell-powertrain",+ "label": "usesTechnology"+ },+ {+ "from": "proj:h2gear",+ "to": "tech:fuelcell-powertrain",+ "label": "usesTechnology"+ },+ {+ "from": "proj:h2flyght",+ "to": "tech:lh2-storage",+ "label": "usesTechnology"+ },+ {+ "from": "proj:acorn",+ "to": "tech:lh2-refuelling",+ "label": "usesTechnology"+ },+ {+ "from": "org:britten-norman",+ "to": "proj:fresson",+ "label": "partnerOf"+ },+ {+ "from": "org:zeroavia",+ "to": "air:glasgow",+ "label": "basedAt"+ },+ {+ "from": "proj:acorn",+ "to": "air:bristol",+ "label": "demonstratesAt"+ },+ {+ "from": "org:easyjet",+ "to": "proj:acorn",+ "label": "leads"+ },+ {+ "from": "org:rolls-royce",+ "to": "proj:acorn",+ "label": "partnerOf"+ },+ {+ "from": "org:airbus",+ "to": "alliance:hia",+ "label": "memberOf"+ },+ {+ "from": "org:easyjet",+ "to": "alliance:hia",+ "label": "memberOf"+ },+ {+ "from": "org:rolls-royce",+ "to": "alliance:hia",+ "label": "memberOf"+ },+ {+ "from": "org:gkn",+ "to": "alliance:hia",+ "label": "memberOf"+ },+ {+ "from": "org:orsted",+ "to": "alliance:hia",+ "label": "memberOf"+ },+ {+ "from": "air:bristol",+ "to": "alliance:hia",+ "label": "memberOf"+ },+ {+ "from": "org:loganair",+ "to": "proj:fresson",+ "label": "partnerOf"+ },+ {+ "from": "body:caa",+ "to": "tech:lh2-refuelling",+ "label": "regulates"+ },+ {+ "from": "body:jetzero",+ "to": "prog:jetzero-strategy",+ "label": "coordinates"+ },+ {+ "from": "tech:electrolysis",+ "to": "tech:liquefaction",+ "label": "feedsInto"+ },+ {+ "from": "tech:liquefaction",+ "to": "tech:lh2-refuelling",+ "label": "feedsInto"+ },+ {+ "from": "tech:lh2-refuelling",+ "to": "tech:lh2-storage",+ "label": "feedsInto"+ },+ {+ "from": "tech:lh2-storage",+ "to": "tech:fuelcell-powertrain",+ "label": "feedsInto"+ },+ {+ "from": "tech:gh2-storage",+ "to": "tech:fuelcell-powertrain",+ "label": "feedsInto"+ },+ {+ "from": "tech:lh2-storage",+ "to": "tech:h2-combustion",+ "label": "feedsInto"+ }+ ]+}\ No newline at end of filediff --git a/case-studies/zero-emission-aviation/demo/index.html b/case-studies/zero-emission-aviation/demo/index.htmlnew file mode 100644index 00000000..4c438550--- /dev/null+++ b/case-studies/zero-emission-aviation/demo/index.html@@ -0,0 +1,71 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8" />+<meta name="viewport" content="width=device-width, initial-scale=1" />+<title>UK Zero-Emission Flight Ecosystem — interactive reference graph</title>+<script src="https://unpkg.com/[email protected]/standalone/umd/vis-network.min.js"></script>+<style>+ :root { --ink:#1f2937; --muted:#6b7280; --line:#e5e7eb; --blue:#1f3864; }+ * { box-sizing:border-box; }+ body { margin:0; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif; color:var(--ink); }+ header { padding:18px 22px; border-bottom:1px solid var(--line); }+ h1 { margin:0 0 4px; font-size:19px; color:var(--blue); }+ p.sub { margin:0; color:var(--muted); font-size:13px; max-width:70ch; }+ #wrap { display:flex; gap:0; height:calc(100vh - 78px); }+ #net { flex:1; background:#fafafa; }+ aside { width:300px; border-left:1px solid var(--line); padding:16px 18px; overflow:auto; }+ aside h2 { font-size:13px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin:0 0 8px; }+ .legend div { display:flex; align-items:center; gap:8px; font-size:13px; margin:5px 0; }+ .dot { width:12px; height:12px; border-radius:50%; flex:0 0 auto; }+ #info { margin-top:18px; font-size:13px; line-height:1.5; }+ #info .lbl { font-weight:700; color:var(--blue); }+ .metrics { margin-top:18px; font-size:12px; color:var(--muted); border-top:1px solid var(--line); padding-top:12px; }+ .metrics b { color:var(--ink); }+ .controls { margin-top:14px; }+ .controls input { width:100%; padding:7px 9px; border:1px solid var(--line); border-radius:7px; font-size:13px; }+</style>+</head>+<body>+<header>+ <h1>UK Zero-Emission Flight Ecosystem</h1>+ <p class="sub">An open, SHACL-validated reference graph of the UK hydrogen and electric aviation ecosystem. 42 entities, 55 relationships, 0 validation violations. Click a node for detail. Independent open dataset by The Tesseract Academy (CC BY 4.0).</p>+</header>+<div id="wrap">+ <div id="net"></div>+ <aside>+ <h2>Entity types</h2>+ <div class="legend" id="legend"></div>+ <div class="controls"><input id="search" placeholder="Search entities..." /></div>+ <div id="info">Select a node to see its detail and connections.</div>+ <div class="metrics" id="metrics"></div>+ </aside>+</div>+<script>+const TYPE_COL = { Organisation:"#2e75b6", Airport:"#c0642a", Programme:"#1f3864", Project:"#8e44ad", Funder:"#2f9e6f", Body:"#555555", Alliance:"#c0392b", Technology:"#0b8a8a" };+fetch("graph.json").then(r=>r.json()).then(data=>{+ const nodes = new vis.DataSet(data.nodes.map(n=>({ id:n.id, label:n.label, color:{background:n.color,border:"#fff"}, font:{color:"#111",size:13}, shape:"dot", size:n.type==="Programme"||n.type==="Project"||n.type==="Funder"?18:13, _type:n.type, _note:n.note, _mat:n.maturity })));+ const edges = new vis.DataSet(data.edges.map(e=>({ from:e.from, to:e.to, label:e.label, arrows:"to", color:{color:"#cfcfcf",highlight:"#1f3864"}, font:{size:9,color:"#9ca3af",strokeWidth:3}, smooth:{type:"continuous"} })));+ const net = new vis.Network(document.getElementById("net"), {nodes,edges}, {+ physics:{ barnesHut:{gravitationalConstant:-9000, springLength:150, springConstant:0.03}, stabilization:{iterations:300} },+ interaction:{ hover:true, tooltipDelay:120 }+ });+ const leg = document.getElementById("legend");+ Object.entries(TYPE_COL).forEach(([t,c])=>{ const d=document.createElement("div"); d.innerHTML=`<span class="dot" style="background:${c}"></span>${t}`; leg.appendChild(d); });+ const counts = {}; data.nodes.forEach(n=>counts[n.type]=(counts[n.type]||0)+1);+ document.getElementById("metrics").innerHTML = `<b>${data.nodes.length}</b> entities · <b>${data.edges.length}</b> relationships · <b>0</b> SHACL violations<br/>Validated against the ZEF shapes; referential integrity enforced.`;+ net.on("click", p=>{+ if(!p.nodes.length){ document.getElementById("info").innerHTML="Select a node to see its detail and connections."; return; }+ const n = nodes.get(p.nodes[0]);+ const conn = net.getConnectedNodes(n.id).map(id=>nodes.get(id).label);+ document.getElementById("info").innerHTML = `<span class="lbl">${n.label}</span><br/><span style="color:#6b7280">${n._type}${n._mat?" · "+n._mat:""}</span><p>${n._note||""}</p><b style="font-size:12px">Connections (${conn.length})</b><br/><span style="font-size:12px;color:#6b7280">${conn.join(", ")}</span>`;+ });+ document.getElementById("search").addEventListener("input", e=>{+ const q = e.target.value.toLowerCase(); if(!q) return;+ const hit = data.nodes.find(n=>n.label.toLowerCase().includes(q));+ if(hit){ net.selectNodes([hit.id]); net.focus(hit.id,{scale:1.1,animation:true}); }+ });+});+</script>+</body>+</html>diff --git a/case-studies/zero-emission-aviation/graph.ttl b/case-studies/zero-emission-aviation/graph.ttlnew file mode 100644index 00000000..b3517013--- /dev/null+++ b/case-studies/zero-emission-aviation/graph.ttl@@ -0,0 +1,318 @@+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .+@prefix zef: <https://tesseract.academy/ns/zef#> .++<https://tesseract.academy/id/zef/air/heathrow> a zef:Airport,+ zef:Entity ;+ rdfs:label "Heathrow Airport"^^xsd:string ;+ rdfs:comment "Project NAPKIN lead." ;+ zef:leads <https://tesseract.academy/id/zef/proj/napkin> ;+ zef:sourceRef "https://www.heathrow.com"^^xsd:string .++<https://tesseract.academy/id/zef/air/london-city> a zef:Airport,+ zef:Entity ;+ rdfs:label "London City Airport"^^xsd:string ;+ rdfs:comment "NAPKIN partner." ;+ zef:partnerOf <https://tesseract.academy/id/zef/proj/napkin> ;+ zef:sourceRef "https://www.londoncityairport.com"^^xsd:string .++<https://tesseract.academy/id/zef/body/caa> a zef:Body,+ zef:Entity ;+ rdfs:label "Civil Aviation Authority"^^xsd:string ;+ rdfs:comment "UK aviation regulator; hydrogen aerodrome safety." ;+ zef:regulates <https://tesseract.academy/id/zef/tech/lh2-refuelling> ;+ zef:sourceRef "https://www.caa.co.uk"^^xsd:string .++<https://tesseract.academy/id/zef/body/cpc> a zef:Body,+ zef:Entity ;+ rdfs:label "Connected Places Catapult"^^xsd:string ;+ rdfs:comment "Runs the Zero Emission Flight Infrastructure (ZEFI) programme." ;+ zef:leads <https://tesseract.academy/id/zef/prog/zefi> ;+ zef:sourceRef "https://cp.catapult.org.uk"^^xsd:string .++<https://tesseract.academy/id/zef/body/jetzero> a zef:Body,+ zef:Entity ;+ rdfs:label "Jet Zero Council"^^xsd:string ;+ rdfs:comment "Government-industry partnership on UK aviation decarbonisation." ;+ zef:coordinates <https://tesseract.academy/id/zef/prog/jetzero-strategy> ;+ zef:sourceRef "https://www.gov.uk/government/groups/jet-zero-council"^^xsd:string .++<https://tesseract.academy/id/zef/fund/ati> a zef:Entity,+ zef:Funder ;+ rdfs:label "Aerospace Technology Institute"^^xsd:string ;+ rdfs:comment "Funds aerospace propulsion R&D including FlyZero and hydrogen programmes." ;+ zef:funds <https://tesseract.academy/id/zef/prog/flyzero>,+ <https://tesseract.academy/id/zef/proj/h2flyght>,+ <https://tesseract.academy/id/zef/proj/h2gear>,+ <https://tesseract.academy/id/zef/proj/hyflyer2> ;+ zef:sourceRef "https://www.ati.org.uk"^^xsd:string .++<https://tesseract.academy/id/zef/fund/dft> a zef:Entity,+ zef:Funder ;+ rdfs:label "Department for Transport"^^xsd:string ;+ rdfs:comment "Jet Zero Strategy; funds ZEFI and the Jet Zero programme." ;+ zef:funds <https://tesseract.academy/id/zef/prog/jetzero-strategy>,+ <https://tesseract.academy/id/zef/prog/zefi> ;+ zef:sourceRef "https://www.gov.uk/government/organisations/department-for-transport"^^xsd:string .++<https://tesseract.academy/id/zef/fund/ukri-ffc> a zef:Entity,+ zef:Funder ;+ rdfs:label "UKRI Future Flight Challenge"^^xsd:string ;+ rdfs:comment "Innovate UK / UKRI programme funding new aviation systems including NAPKIN and Fresson." ;+ zef:funds <https://tesseract.academy/id/zef/proj/fresson>,+ <https://tesseract.academy/id/zef/proj/napkin> ;+ zef:sourceRef "https://www.ukri.org/what-we-offer/our-main-funds/industrial-strategy-challenge-fund/future-flight/"^^xsd:string .++<https://tesseract.academy/id/zef/org/airbus> a zef:Entity,+ zef:Organisation ;+ rdfs:label "Airbus"^^xsd:string ;+ rdfs:comment "ZEROe hydrogen concept; timeline revised in 2025 to the later 2030s." ;+ zef:develops <https://tesseract.academy/id/zef/tech/lh2-storage> ;+ zef:memberOf <https://tesseract.academy/id/zef/alliance/hia> ;+ zef:sourceRef "https://www.airbus.com/en/innovation/energy-transition/hydrogen/zeroe"^^xsd:string .++<https://tesseract.academy/id/zef/org/britten-norman> a zef:Entity,+ zef:Organisation ;+ rdfs:label "Britten-Norman"^^xsd:string ;+ rdfs:comment "BN-2 Islander airframe used in Project Fresson." ;+ zef:partnerOf <https://tesseract.academy/id/zef/proj/fresson> ;+ zef:sourceRef "https://www.britten-norman.com"^^xsd:string .++<https://tesseract.academy/id/zef/org/caes> a zef:Entity,+ zef:Organisation ;+ rdfs:label "Cranfield Aerospace Solutions"^^xsd:string ;+ rdfs:comment "Hydrogen-electric propulsion; Britten-Norman Islander conversion." ;+ zef:develops <https://tesseract.academy/id/zef/proj/fresson>,+ <https://tesseract.academy/id/zef/tech/fuelcell-powertrain> ;+ zef:partnerOf <https://tesseract.academy/id/zef/proj/napkin> ;+ zef:sourceRef "https://cranfieldaerospace.com"^^xsd:string .++<https://tesseract.academy/id/zef/org/cranfield-uni> a zef:Entity,+ zef:Organisation ;+ rdfs:label "Cranfield University"^^xsd:string ;+ rdfs:comment "Aerospace research; hydrogen integration." ;+ zef:partnerOf <https://tesseract.academy/id/zef/proj/napkin> ;+ zef:sourceRef "https://www.cranfield.ac.uk"^^xsd:string .++<https://tesseract.academy/id/zef/org/deloitte> a zef:Entity,+ zef:Organisation ;+ rdfs:label "Deloitte"^^xsd:string ;+ rdfs:comment "Commercial and blueprint lead on Project NAPKIN." ;+ zef:partnerOf <https://tesseract.academy/id/zef/proj/napkin> ;+ zef:sourceRef "https://www2.deloitte.com/uk"^^xsd:string .++<https://tesseract.academy/id/zef/org/easyjet> a zef:Entity,+ zef:Organisation ;+ rdfs:label "easyJet"^^xsd:string ;+ rdfs:comment "Airline; Hydrogen in Aviation member; hydrogen ground-test partner." ;+ zef:leads <https://tesseract.academy/id/zef/proj/acorn> ;+ zef:memberOf <https://tesseract.academy/id/zef/alliance/hia> ;+ zef:sourceRef "https://www.easyjet.com"^^xsd:string .++<https://tesseract.academy/id/zef/org/gkn> a zef:Entity,+ zef:Organisation ;+ rdfs:label "GKN Aerospace"^^xsd:string ;+ rdfs:comment "Hydrogen propulsion programmes H2GEAR and H2FlyGHT." ;+ zef:develops <https://tesseract.academy/id/zef/proj/h2flyght>,+ <https://tesseract.academy/id/zef/proj/h2gear>,+ <https://tesseract.academy/id/zef/tech/fuelcell-powertrain> ;+ zef:memberOf <https://tesseract.academy/id/zef/alliance/hia> ;+ zef:partnerOf <https://tesseract.academy/id/zef/proj/napkin> ;+ zef:sourceRef "https://www.gknaerospace.com"^^xsd:string .++<https://tesseract.academy/id/zef/org/hial> a zef:Entity,+ zef:Organisation ;+ rdfs:label "Highlands and Islands Airports"^^xsd:string ;+ rdfs:comment "Sub-regional airport operator; NAPKIN partner." ;+ zef:partnerOf <https://tesseract.academy/id/zef/proj/napkin> ;+ zef:sourceRef "https://www.hial.co.uk"^^xsd:string .++<https://tesseract.academy/id/zef/org/intelligent-energy> a zef:Entity,+ zef:Organisation ;+ rdfs:label "Intelligent Energy"^^xsd:string ;+ rdfs:comment "Hydrogen fuel-cell systems." ;+ zef:develops <https://tesseract.academy/id/zef/tech/fuelcell-powertrain> ;+ zef:sourceRef "https://www.intelligent-energy.com"^^xsd:string .++<https://tesseract.academy/id/zef/org/loganair> a zef:Entity,+ zef:Organisation ;+ rdfs:label "Loganair"^^xsd:string ;+ rdfs:comment "UK regional operator; regional decarbonisation partner." ;+ zef:partnerOf <https://tesseract.academy/id/zef/proj/fresson> ;+ zef:sourceRef "https://www.loganair.co.uk"^^xsd:string .++<https://tesseract.academy/id/zef/org/orsted> a zef:Entity,+ zef:Organisation ;+ rdfs:label "Orsted"^^xsd:string ;+ rdfs:comment "Energy company; Hydrogen in Aviation member (green hydrogen supply)." ;+ zef:memberOf <https://tesseract.academy/id/zef/alliance/hia> ;+ zef:sourceRef "https://orsted.co.uk"^^xsd:string .++<https://tesseract.academy/id/zef/org/rolls-royce> a zef:Entity,+ zef:Organisation ;+ rdfs:label "Rolls-Royce"^^xsd:string ;+ rdfs:comment "Hydrogen combustion gas-turbine testing." ;+ zef:develops <https://tesseract.academy/id/zef/tech/h2-combustion> ;+ zef:memberOf <https://tesseract.academy/id/zef/alliance/hia> ;+ zef:partnerOf <https://tesseract.academy/id/zef/proj/acorn>,+ <https://tesseract.academy/id/zef/proj/napkin> ;+ zef:sourceRef "https://www.rolls-royce.com"^^xsd:string .++<https://tesseract.academy/id/zef/org/southampton> a zef:Entity,+ zef:Organisation ;+ rdfs:label "University of Southampton"^^xsd:string ;+ rdfs:comment "NAPKIN research partner." ;+ zef:partnerOf <https://tesseract.academy/id/zef/proj/napkin> ;+ zef:sourceRef "https://www.southampton.ac.uk"^^xsd:string .++<https://tesseract.academy/id/zef/org/ucl-ats> a zef:Entity,+ zef:Organisation ;+ rdfs:label "UCL Air Transportation Systems Lab"^^xsd:string ;+ rdfs:comment "Airline Behaviour Model; route/demand modelling on NAPKIN." ;+ zef:partnerOf <https://tesseract.academy/id/zef/proj/napkin> ;+ zef:sourceRef "https://www.ucl.ac.uk/bartlett/energy"^^xsd:string .++<https://tesseract.academy/id/zef/org/zeroavia> a zef:Entity,+ zef:Organisation ;+ rdfs:label "ZeroAvia"^^xsd:string ;+ rdfs:comment "Hydrogen-electric powertrains (ZA600, ZA2000)." ;+ zef:basedAt <https://tesseract.academy/id/zef/air/glasgow> ;+ zef:develops <https://tesseract.academy/id/zef/proj/hyflyer2>,+ <https://tesseract.academy/id/zef/tech/fuelcell-powertrain> ;+ zef:sourceRef "https://zeroavia.com"^^xsd:string .++<https://tesseract.academy/id/zef/tech/electrolysis> a zef:Entity,+ zef:Technology ;+ rdfs:label "Green hydrogen electrolysis"^^xsd:string ;+ zef:chainStage "Production"^^xsd:string ;+ zef:feedsInto <https://tesseract.academy/id/zef/tech/liquefaction> ;+ zef:maturity "Commercial" ;+ zef:maturityProvenance "PEM and alkaline commercial; SOEC emerging; indicative, 2026."^^xsd:string .++<https://tesseract.academy/id/zef/air/bristol> a zef:Airport,+ zef:Entity ;+ rdfs:label "Bristol Airport"^^xsd:string ;+ rdfs:comment "Airside hydrogen refuelling trial (Project Acorn); Hydrogen in Aviation member." ;+ zef:memberOf <https://tesseract.academy/id/zef/alliance/hia> ;+ zef:sourceRef "https://www.bristolairport.co.uk"^^xsd:string .++<https://tesseract.academy/id/zef/air/glasgow> a zef:Airport,+ zef:Entity ;+ rdfs:label "Glasgow Airport"^^xsd:string ;+ rdfs:comment "CPC Connected Airport Living Lab." ;+ zef:sourceRef "https://www.glasgowairport.com"^^xsd:string .++<https://tesseract.academy/id/zef/prog/flyzero> a zef:Entity,+ zef:Programme ;+ rdfs:label "ATI FlyZero"^^xsd:string ;+ rdfs:comment "2021-2022 ATI study; concluded liquid hydrogen is the primary long-term zero-carbon aviation fuel." ;+ zef:sourceRef "https://www.ati.org.uk/flyzero/"^^xsd:string .++<https://tesseract.academy/id/zef/tech/gh2-storage> a zef:Entity,+ zef:Technology ;+ rdfs:label "Gaseous hydrogen storage"^^xsd:string ;+ zef:chainStage "Onboard storage"^^xsd:string ;+ zef:feedsInto <https://tesseract.academy/id/zef/tech/fuelcell-powertrain> ;+ zef:maturity "Pilot" ;+ zef:maturityProvenance "In use on sub-regional demonstrators; indicative, 2026."^^xsd:string .++<https://tesseract.academy/id/zef/tech/liquefaction> a zef:Entity,+ zef:Technology ;+ rdfs:label "Hydrogen liquefaction and distribution"^^xsd:string ;+ zef:chainStage "Distribution"^^xsd:string ;+ zef:feedsInto <https://tesseract.academy/id/zef/tech/lh2-refuelling> ;+ zef:maturity "Commercial" ;+ zef:maturityProvenance "Industrial-scale exists; airport-scale distribution developing; indicative, 2026."^^xsd:string .++<https://tesseract.academy/id/zef/prog/jetzero-strategy> a zef:Entity,+ zef:Programme ;+ rdfs:label "Jet Zero Strategy"^^xsd:string ;+ rdfs:comment "DfT 2022 strategy for net-zero UK aviation by 2050." ;+ zef:sourceRef "https://www.gov.uk/government/publications/jet-zero-strategy-delivering-net-zero-aviation-by-2050"^^xsd:string .++<https://tesseract.academy/id/zef/prog/zefi> a zef:Entity,+ zef:Programme ;+ rdfs:label "Zero Emission Flight Infrastructure (ZEFI)"^^xsd:string ;+ rdfs:comment "DfT-funded, CPC-led programme on airport hydrogen and electric infrastructure." ;+ zef:sourceRef "https://cp.catapult.org.uk/programme/preparing-uk-airports-for-zero-emission-aircraft/"^^xsd:string .++<https://tesseract.academy/id/zef/proj/acorn> a zef:Entity,+ zef:Project ;+ rdfs:label "Project Acorn"^^xsd:string ;+ rdfs:comment "easyJet-led airside hydrogen refuelling trial at Bristol Airport." ;+ zef:demonstratesAt <https://tesseract.academy/id/zef/air/bristol> ;+ zef:sourceRef "https://hydrogeninaviation.co.uk"^^xsd:string ;+ zef:usesTechnology <https://tesseract.academy/id/zef/tech/lh2-refuelling> .++<https://tesseract.academy/id/zef/proj/h2flyght> a zef:Entity,+ zef:Project ;+ rdfs:label "H2FlyGHT"^^xsd:string ;+ rdfs:comment "GKN Aerospace cryogenic hydrogen and electric propulsion programme." ;+ zef:sourceRef "https://www.gknaerospace.com"^^xsd:string ;+ zef:usesTechnology <https://tesseract.academy/id/zef/tech/lh2-storage> .++<https://tesseract.academy/id/zef/proj/h2gear> a zef:Entity,+ zef:Project ;+ rdfs:label "H2GEAR"^^xsd:string ;+ rdfs:comment "GKN Aerospace hydrogen fuel-cell propulsion programme." ;+ zef:sourceRef "https://www.gknaerospace.com"^^xsd:string ;+ zef:usesTechnology <https://tesseract.academy/id/zef/tech/fuelcell-powertrain> .++<https://tesseract.academy/id/zef/proj/hyflyer2> a zef:Entity,+ zef:Project ;+ rdfs:label "HyFlyer II"^^xsd:string ;+ rdfs:comment "ZeroAvia hydrogen-electric flight demonstration project." ;+ zef:sourceRef "https://zeroavia.com"^^xsd:string ;+ zef:usesTechnology <https://tesseract.academy/id/zef/tech/fuelcell-powertrain> .++<https://tesseract.academy/id/zef/tech/h2-combustion> a zef:Entity,+ zef:Technology ;+ rdfs:label "Hydrogen combustion gas turbine"^^xsd:string ;+ zef:chainStage "Propulsion"^^xsd:string ;+ zef:maturity "Demonstration" ;+ zef:maturityProvenance "Ground tests completed by engine makers; indicative, 2026."^^xsd:string .++<https://tesseract.academy/id/zef/tech/lh2-refuelling> a zef:Entity,+ zef:Technology ;+ rdfs:label "Airside liquid hydrogen refuelling"^^xsd:string ;+ zef:chainStage "Refuelling"^^xsd:string ;+ zef:feedsInto <https://tesseract.academy/id/zef/tech/lh2-storage> ;+ zef:maturity "Pilot" ;+ zef:maturityProvenance "First airside trials underway; indicative, 2026."^^xsd:string .++<https://tesseract.academy/id/zef/tech/lh2-storage> a zef:Entity,+ zef:Technology ;+ rdfs:label "Liquid hydrogen cryogenic storage"^^xsd:string ;+ zef:chainStage "Onboard storage"^^xsd:string ;+ zef:feedsInto <https://tesseract.academy/id/zef/tech/fuelcell-powertrain>,+ <https://tesseract.academy/id/zef/tech/h2-combustion> ;+ zef:maturity "Development" ;+ zef:maturityProvenance "Airframe-integration development; indicative, 2026."^^xsd:string .++<https://tesseract.academy/id/zef/proj/fresson> a zef:Entity,+ zef:Project ;+ rdfs:label "Project Fresson"^^xsd:string ;+ rdfs:comment "Cranfield Aerospace Solutions hydrogen fuel-cell Islander conversion." ;+ zef:sourceRef "https://cranfieldaerospace.com"^^xsd:string ;+ zef:usesTechnology <https://tesseract.academy/id/zef/tech/fuelcell-powertrain>,+ <https://tesseract.academy/id/zef/tech/gh2-storage> .++<https://tesseract.academy/id/zef/alliance/hia> a zef:Alliance,+ zef:Entity ;+ rdfs:label "Hydrogen in Aviation (HIA)"^^xsd:string ;+ rdfs:comment "Industry alliance for hydrogen-powered aviation." ;+ zef:sourceRef "https://hydrogeninaviation.co.uk"^^xsd:string .++<https://tesseract.academy/id/zef/tech/fuelcell-powertrain> a zef:Entity,+ zef:Technology ;+ rdfs:label "Hydrogen fuel-cell powertrain"^^xsd:string ;+ zef:chainStage "Propulsion"^^xsd:string ;+ zef:maturity "Demonstration" ;+ zef:maturityProvenance "Sub-regional demonstrators flying/ground-testing; indicative, 2026."^^xsd:string .++<https://tesseract.academy/id/zef/proj/napkin> a zef:Entity,+ zef:Project ;+ rdfs:label "Project NAPKIN"^^xsd:string ;+ rdfs:comment "Future Flight Challenge project; sub-regional zero-emission flight blueprint; Heathrow-led." ;+ zef:sourceRef "https://www.heathrow.com/company/about-heathrow/future-flight-challenge/napkin"^^xsd:string .+diff --git a/case-studies/zero-emission-aviation/metrics.json b/case-studies/zero-emission-aviation/metrics.jsonnew file mode 100644index 00000000..6ec8e903--- /dev/null+++ b/case-studies/zero-emission-aviation/metrics.json@@ -0,0 +1,30 @@+{+ "entities": 42,+ "relations": 55,+ "triples": 272,+ "shacl_violations": 0,+ "dangling_edge_caught": true,+ "by_type": {+ "Organisation": 15,+ "Airport": 4,+ "Funder": 3,+ "Body": 3,+ "Alliance": 1,+ "Programme": 3,+ "Project": 6,+ "Technology": 7+ },+ "by_relation": {+ "funds": 8,+ "leads": 3,+ "partnerOf": 12,+ "develops": 10,+ "usesTechnology": 6,+ "basedAt": 1,+ "demonstratesAt": 1,+ "memberOf": 6,+ "regulates": 1,+ "coordinates": 1,+ "feedsInto": 6+ }+}\ No newline at end of filediff --git a/case-studies/zero-emission-aviation/ontology/zef.ttl b/case-studies/zero-emission-aviation/ontology/zef.ttlnew file mode 100644index 00000000..67734c11--- /dev/null+++ b/case-studies/zero-emission-aviation/ontology/zef.ttl@@ -0,0 +1,45 @@+@prefix zef: <https://tesseract.academy/ns/zef#> .+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .+@prefix owl: <http://www.w3.org/2002/07/owl#> .+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .++# Zero-Emission Flight (ZEF) ecosystem ontology+# The Tesseract Academy. Open reference vocabulary (CC BY 4.0).++zef: a owl:Ontology ;+ rdfs:label "UK Zero-Emission Flight Ecosystem Ontology" ;+ rdfs:comment "A small, computation-ready vocabulary for the UK hydrogen and electric aviation ecosystem: organisations, airports, programmes, projects, funders, bodies, alliances and technologies, and the relationships between them." .++# --- Classes ---+zef:Entity a owl:Class ; rdfs:label "Ecosystem entity" .+zef:Organisation a owl:Class ; rdfs:subClassOf zef:Entity ; rdfs:label "Organisation" .+zef:Airport a owl:Class ; rdfs:subClassOf zef:Entity ; rdfs:label "Airport" .+zef:Programme a owl:Class ; rdfs:subClassOf zef:Entity ; rdfs:label "Programme" .+zef:Project a owl:Class ; rdfs:subClassOf zef:Entity ; rdfs:label "Project" .+zef:Funder a owl:Class ; rdfs:subClassOf zef:Entity ; rdfs:label "Funder" .+zef:Body a owl:Class ; rdfs:subClassOf zef:Entity ; rdfs:label "Body" .+zef:Alliance a owl:Class ; rdfs:subClassOf zef:Entity ; rdfs:label "Alliance" .+zef:Technology a owl:Class ; rdfs:subClassOf zef:Entity ; rdfs:label "Technology" .++# --- Object properties (ecosystem relationships) ---+zef:funds a owl:ObjectProperty ; rdfs:label "funds" ; rdfs:range zef:Entity .+zef:develops a owl:ObjectProperty ; rdfs:label "develops" ; rdfs:range zef:Entity .+zef:partnerOf a owl:ObjectProperty ; rdfs:label "partner of" ; rdfs:range zef:Entity .+zef:memberOf a owl:ObjectProperty ; rdfs:label "member of" ; rdfs:range zef:Entity .+zef:basedAt a owl:ObjectProperty ; rdfs:label "based at" ; rdfs:range zef:Airport .+zef:demonstratesAt a owl:ObjectProperty ; rdfs:label "demonstrates at" ; rdfs:range zef:Airport .+zef:usesTechnology a owl:ObjectProperty ; rdfs:label "uses technology" ; rdfs:range zef:Technology .+zef:leads a owl:ObjectProperty ; rdfs:label "leads" ; rdfs:range zef:Entity .+zef:regulates a owl:ObjectProperty ; rdfs:label "regulates" ; rdfs:range zef:Entity .+zef:coordinates a owl:ObjectProperty ; rdfs:label "coordinates" ; rdfs:range zef:Entity .+zef:feedsInto a owl:ObjectProperty ; rdfs:label "feeds into" ; rdfs:range zef:Technology ;+ rdfs:comment "Upstream-to-downstream link in the hydrogen production-to-propulsion chain." .++# --- Datatype properties ---+zef:maturity a owl:DatatypeProperty ; rdfs:label "maturity" ; rdfs:range xsd:string ;+ rdfs:comment "Indicative maturity band. Allowed: Research, Development, Demonstration, Pilot, Commercial." .+zef:maturityProvenance a owl:DatatypeProperty ; rdfs:label "maturity provenance" ; rdfs:range xsd:string ;+ rdfs:comment "Source and date for the indicative maturity value. Required so maturity is never unsourced." .+zef:chainStage a owl:DatatypeProperty ; rdfs:label "chain stage" ; rdfs:range xsd:string .+zef:sourceRef a owl:DatatypeProperty ; rdfs:label "source reference" ; rdfs:range xsd:string .diff --git a/case-studies/zero-emission-aviation/pipeline/build_and_validate.py b/case-studies/zero-emission-aviation/pipeline/build_and_validate.pynew file mode 100644index 00000000..4760cb48--- /dev/null+++ b/case-studies/zero-emission-aviation/pipeline/build_and_validate.py@@ -0,0 +1,136 @@+#!/usr/bin/env python3+"""Build the UK Zero-Emission Flight ecosystem graph from ecosystem.json,+validate it against the SHACL shapes (must be 0 violations), prove the+referential-integrity shape catches a planted dangling edge, and export+graph.ttl, graph.json (for the demo) and a network PNG.++Run: python3 pipeline/build_and_validate.py+"""+import json, os, sys+from rdflib import Graph, Namespace, RDF, RDFS, Literal, URIRef, XSD+from pyshacl import validate++HERE = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))+ZEF = Namespace("https://tesseract.academy/ns/zef#")+BASE = "https://tesseract.academy/id/zef/"++TYPE_CLASS = {+ "Organisation": ZEF.Organisation, "Airport": ZEF.Airport, "Programme": ZEF.Programme,+ "Project": ZEF.Project, "Funder": ZEF.Funder, "Body": ZEF.Body,+ "Alliance": ZEF.Alliance, "Technology": ZEF.Technology,+}+REL = {+ "funds": ZEF.funds, "develops": ZEF.develops, "partnerOf": ZEF.partnerOf,+ "memberOf": ZEF.memberOf, "basedAt": ZEF.basedAt, "demonstratesAt": ZEF.demonstratesAt,+ "usesTechnology": ZEF.usesTechnology, "leads": ZEF.leads, "regulates": ZEF.regulates,+ "coordinates": ZEF.coordinates, "feedsInto": ZEF.feedsInto,+}++def uri(local):+ return URIRef(BASE + local.replace(":", "/"))++def build_graph(data):+ g = Graph()+ g.bind("zef", ZEF)+ ids = set()+ for e in data["entities"]:+ s = uri(e["id"]); ids.add(e["id"])+ g.add((s, RDF.type, ZEF.Entity))+ g.add((s, RDF.type, TYPE_CLASS[e["type"]]))+ g.add((s, RDFS.label, Literal(e["label"], datatype=XSD.string)))+ if e.get("note"): g.add((s, RDFS.comment, Literal(e["note"])))+ if e.get("source"): g.add((s, ZEF.sourceRef, Literal(e["source"], datatype=XSD.string)))+ if e["type"] == "Technology":+ g.add((s, ZEF.maturity, Literal(e["maturity"])))+ g.add((s, ZEF.maturityProvenance, Literal(e["maturity_note"], datatype=XSD.string)))+ g.add((s, ZEF.chainStage, Literal(e.get("chainStage", ""), datatype=XSD.string)))+ for r in data["relations"]:+ g.add((uri(r["s"]), REL[r["p"]], uri(r["o"])))+ return g, ids++def run_validation(data_graph):+ shapes = Graph().parse(os.path.join(HERE, "shapes", "zef-shapes.ttl"), format="turtle")+ onto = Graph().parse(os.path.join(HERE, "ontology", "zef.ttl"), format="turtle")+ conforms, _, text = validate(data_graph, shacl_graph=shapes, ont_graph=onto,+ inference="rdfs", abort_on_first=False, meta_shacl=False)+ return conforms, text++def main():+ data = json.load(open(os.path.join(HERE, "data", "ecosystem.json")))+ g, ids = build_graph(data)+ n_ent = len(data["entities"]); n_rel = len(data["relations"])++ conforms, text = run_validation(g)+ print(f"Entities: {n_ent} Relations: {n_rel} Triples: {len(g)}")+ print(f"SHACL validation (clean data): conforms={conforms}")+ if not conforms:+ print(text); sys.exit("FAIL: clean data did not conform.")++ # Negative test: inject a dangling edge (relationship to an undeclared entity)+ # and confirm the referential-integrity shape catches it.+ g2 = Graph(); [g2.add(t) for t in g]+ g2.add((uri("org:zeroavia"), ZEF.partnerOf, uri("org:does-not-exist")))+ neg_conforms, _ = run_validation(g2)+ caught = not neg_conforms+ print(f"Negative test (planted dangling edge caught): {caught}")+ if not caught:+ sys.exit("FAIL: validator did not catch the planted dangling edge.")++ # Exports+ g.serialize(os.path.join(HERE, "graph.ttl"), format="turtle")+ export_json(data, os.path.join(HERE, "demo", "graph.json"))+ print("Wrote graph.ttl and demo/graph.json")++ # Metrics for the writeup+ from collections import Counter+ by_type = Counter(e["type"] for e in data["entities"])+ by_rel = Counter(r["p"] for r in data["relations"])+ print("By type:", dict(by_type))+ print("By relation:", dict(by_rel))+ json.dump({"entities": n_ent, "relations": n_rel, "triples": len(g),+ "shacl_violations": 0, "dangling_edge_caught": caught,+ "by_type": dict(by_type), "by_relation": dict(by_rel)},+ open(os.path.join(HERE, "metrics.json"), "w"), indent=2)++TYPE_COL = {+ "Organisation": "#2e75b6", "Airport": "#c0642a", "Programme": "#1f3864",+ "Project": "#8e44ad", "Funder": "#2f9e6f", "Body": "#555555",+ "Alliance": "#c0392b", "Technology": "#0b8a8a",+}++def export_json(data, path):+ nodes = [{"id": e["id"], "label": e["label"], "type": e["type"],+ "color": TYPE_COL[e["type"]], "note": e.get("note", ""),+ "maturity": e.get("maturity", "")} for e in data["entities"]]+ edges = [{"from": r["s"], "to": r["o"], "label": r["p"]} for r in data["relations"]]+ json.dump({"nodes": nodes, "edges": edges}, open(path, "w"), indent=1)++def render_png(data, path):+ import matplotlib; matplotlib.use("Agg")+ import matplotlib.pyplot as plt+ from matplotlib.patches import Patch+ import networkx as nx+ G = nx.DiGraph()+ for e in data["entities"]:+ G.add_node(e["id"], label=e["label"], type=e["type"])+ for r in data["relations"]:+ G.add_edge(r["s"], r["o"], label=r["p"])+ pos = nx.spring_layout(G, k=0.9, iterations=200, seed=7)+ fig, ax = plt.subplots(figsize=(15, 11)); ax.axis("off")+ cols = [TYPE_COL[G.nodes[n]["type"]] for n in G.nodes]+ sizes = [1500 if G.nodes[n]["type"] in ("Programme", "Project", "Funder") else 950 for n in G.nodes]+ nx.draw_networkx_edges(G, pos, ax=ax, edge_color="#c9c9c9", arrows=True, arrowsize=9, width=0.9, alpha=0.8)+ nx.draw_networkx_nodes(G, pos, ax=ax, node_color=cols, node_size=sizes, edgecolors="white", linewidths=1.2)+ nx.draw_networkx_labels(G, pos, labels={n: G.nodes[n]["label"] for n in G.nodes},+ font_size=7.2, font_color="#111", ax=ax)+ legend = [Patch(color=c, label=t) for t, c in TYPE_COL.items()]+ ax.legend(handles=legend, loc="lower left", fontsize=9, frameon=False, ncol=2)+ ax.set_title("UK Zero-Emission Flight Ecosystem | open, SHACL-validated reference graph | The Tesseract Academy",+ fontsize=13, fontweight="bold", color="#1f3864", loc="left", pad=16)+ plt.tight_layout(); plt.savefig(path, dpi=150, bbox_inches="tight"); plt.close()+ print("Wrote", path)++if __name__ == "__main__":+ main()+ data = json.load(open(os.path.join(HERE, "data", "ecosystem.json")))+ render_png(data, os.path.join(HERE, "assets", "ecosystem-graph.png"))diff --git a/case-studies/zero-emission-aviation/shapes/zef-shapes.ttl b/case-studies/zero-emission-aviation/shapes/zef-shapes.ttlnew file mode 100644index 00000000..421fddbe--- /dev/null+++ b/case-studies/zero-emission-aviation/shapes/zef-shapes.ttl@@ -0,0 +1,52 @@+@prefix zef: <https://tesseract.academy/ns/zef#> .+@prefix sh: <http://www.w3.org/ns/shacl#> .+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .++# SHACL shapes for the ZEF ecosystem graph.+# Enforce: every entity is labelled; every technology carries a maturity from a+# controlled list AND a provenance string (maturity is never unsourced);+# referential integrity on every relationship (no dangling / inferred links).++zef:EntityShape a sh:NodeShape ;+ sh:targetClass zef:Entity ;+ sh:property [+ sh:path rdfs:label ;+ sh:minCount 1 ;+ sh:datatype xsd:string ;+ sh:message "Every ecosystem entity must have exactly one label." ;+ sh:maxCount 1 ;+ ] .++zef:TechnologyShape a sh:NodeShape ;+ sh:targetClass zef:Technology ;+ sh:property [+ sh:path zef:maturity ;+ sh:minCount 1 ; sh:maxCount 1 ;+ sh:in ( "Research" "Development" "Demonstration" "Pilot" "Commercial" ) ;+ sh:message "Technology maturity must be one of Research, Development, Demonstration, Pilot, Commercial." ;+ ] ;+ sh:property [+ sh:path zef:maturityProvenance ;+ sh:minCount 1 ;+ sh:datatype xsd:string ;+ sh:message "Technology maturity must carry a provenance string (source and date); it is never unsourced." ;+ ] .++# Referential integrity: the object of every ecosystem relationship must itself be a+# declared zef:Entity. This is the graph-level equivalent of NAVIGATE's requirement that+# only validated, provided relationships are shown and none are inferred.+zef:ReferentialIntegrityShape a sh:NodeShape ;+ sh:targetClass zef:Entity ;+ sh:property [ sh:path zef:funds ; sh:class zef:Entity ; sh:message "funds must point to a declared entity." ] ;+ sh:property [ sh:path zef:develops ; sh:class zef:Entity ; sh:message "develops must point to a declared entity." ] ;+ sh:property [ sh:path zef:partnerOf ; sh:class zef:Entity ; sh:message "partnerOf must point to a declared entity." ] ;+ sh:property [ sh:path zef:memberOf ; sh:class zef:Entity ; sh:message "memberOf must point to a declared entity." ] ;+ sh:property [ sh:path zef:basedAt ; sh:class zef:Airport ; sh:message "basedAt must point to a declared Airport." ] ;+ sh:property [ sh:path zef:demonstratesAt ; sh:class zef:Airport ; sh:message "demonstratesAt must point to a declared Airport." ] ;+ sh:property [ sh:path zef:usesTechnology ; sh:class zef:Technology ; sh:message "usesTechnology must point to a declared Technology." ] ;+ sh:property [ sh:path zef:leads ; sh:class zef:Entity ; sh:message "leads must point to a declared entity." ] ;+ sh:property [ sh:path zef:regulates ; sh:class zef:Entity ; sh:message "regulates must point to a declared entity." ] ;+ sh:property [ sh:path zef:coordinates ; sh:class zef:Entity ; sh:message "coordinates must point to a declared entity." ] ;+ sh:property [ sh:path zef:feedsInto ; sh:class zef:Technology ; sh:message "feedsInto must point to a declared Technology." ] .