@@ -7,6 +7,7 @@ import Button from '../../components/Button.astro';
77import Badge from ' ../../components/Badge.astro' ;
88import Heading from ' ../../components/typography/Heading.astro' ;
99import Body from ' ../../components/typography/Body.astro' ;
10+ import MermaidDiagram from ' ../../components/MermaidDiagram.astro' ;
1011
1112<div class = " max-w-4xl mx-auto px-4 md:px-6 py-20" >
1213 { /* Hero Section */ }
@@ -159,10 +160,17 @@ Ensure sequence of groups: [drive-start -> (play-action)+ -> (scoring-play | tur
159160 flow through time, and higher-level facts derive from event patterns.
160161 </Body>
161162
162- <figure role="img" aria-labelledby="diagram-data-flow" class="my-8 bg-surface border border-neutral-light rounded-lg px-6 pb-6">
163- <figcaption id="diagram-data-flow" class="sr-only">
164- Data flow diagram showing atomic events (pass, reception, dribble, shot, block) deriving aggregated metrics (complete-pass, shot-sequence, defensive-action)
165- </figcaption>
163+ <MermaidDiagram
164+ id="data-flow"
165+ caption="Data flow diagram showing atomic events (pass, reception, dribble, shot, block) deriving aggregated metrics (complete-pass, shot-sequence, defensive-action)"
166+ relationships={[
167+ "Pass event leads to reception event (temporal sequence)",
168+ "Reception leads to dribble, dribble leads to shot, shot leads to block (event chain)",
169+ "Pass and reception combine to create complete-pass metric (derived aggregation)",
170+ "Dribble and shot combine to create shot-sequence metric (derived aggregation)",
171+ "Block event creates defensive-action metric (derived aggregation)"
172+ ]}
173+ >
166174
167175` ` ` mermaid
168176graph LR
@@ -185,17 +193,7 @@ graph LR
185193 class CP,SOT,DA derived
186194```
187195
188- <details class = " mt-4" >
189- <summary class = " cursor-pointer text-xs font-normal text-text-lighter hover:text-accent" >Text description of relationships</summary >
190- <ul class = " mt-2 ml-4 text-xs font-light text-text-lighter space-y-1" >
191- <li >Pass event leads to reception event (temporal sequence)</li >
192- <li >Reception leads to dribble, dribble leads to shot, shot leads to block (event chain)</li >
193- <li >Pass and reception combine to create complete-pass metric (derived aggregation)</li >
194- <li >Dribble and shot combine to create shot-sequence metric (derived aggregation)</li >
195- <li >Block event creates defensive-action metric (derived aggregation)</li >
196- </ul >
197- </details >
198- </figure >
196+ </MermaidDiagram >
199197
200198 <Body size = " sm" as = " p" class = " mb-6 text-neutral italic" >
201199 Atomic events (amber/gold) capture "what happened." Derived facts (blue) represent "what it means"—
@@ -247,10 +245,17 @@ graph LR
247245 modeled both temporal relationships (PREV/NEXT) and logical dependencies (DEPENDS_ON).
248246 </Body >
249247
250- <figure role = " img" aria-labelledby = " diagram-event-dependency" class = " my-8 bg-surface border border-neutral-light rounded-lg px-6 pb-6" >
251- <figcaption id = " diagram-event-dependency" class = " sr-only" >
252- Event dependency graph showing temporal relationships (solid lines) and logical dependencies (dashed lines) between football events
253- </figcaption >
248+ <MermaidDiagram
249+ id = " event-dependency"
250+ caption = " Event dependency graph showing temporal relationships (solid lines) and logical dependencies (dashed lines) between football events"
251+ relationships = { [
252+ " Temporal flow (PREV): fifty-fifty → clearance → pass → foul-committed (sequence 1)" ,
253+ " Logical dependency (DEPENDS_ON): fifty-fifty depends on clearance depends on pass (sequence 2)" ,
254+ " Temporal flow (PREV): fifty-fifty → clearance → pass (sequence 3)" ,
255+ " Solid lines represent temporal order (\" what happened next\" )" ,
256+ " Dashed lines represent logical dependencies (\" what this derives from\" )"
257+ ]}
258+ >
254259
255260``` mermaid
256261graph TD
@@ -272,17 +277,7 @@ graph TD
272277 linkStyle 3 stroke:#0EA5E9,stroke-width:2px,stroke-dasharray:6 4
273278```
274279
275- <details class = " mt-4" >
276- <summary class = " cursor-pointer text-xs font-normal text-text-lighter hover:text-accent" >Text description of relationships</summary >
277- <ul class = " mt-2 ml-4 text-xs font-light text-text-lighter space-y-1" >
278- <li ><strong >Temporal flow (PREV):</strong > fifty-fifty → clearance → pass → foul-committed (sequence 1)</li >
279- <li ><strong >Logical dependency (DEPENDS_ON):</strong > fifty-fifty depends on clearance depends on pass (sequence 2)</li >
280- <li ><strong >Temporal flow (PREV):</strong > fifty-fifty → clearance → pass (sequence 3)</li >
281- <li >Solid lines represent temporal order ("what happened next")</li >
282- <li >Dashed lines represent logical dependencies ("what this derives from")</li >
283- </ul >
284- </details >
285- </figure >
280+ </MermaidDiagram >
286281
287282 <Body size = " sm" as = " p" class = " mb-6 text-neutral italic" >
288283 Solid lines show temporal flow (what happened next). Dashed lines show logical dependencies
@@ -316,10 +311,18 @@ graph TD
316311 full context → resolve once → system cascades to all dependent data.
317312 </Body >
318313
319- <figure role = " img" aria-labelledby = " diagram-metadata-claims" class = " my-8 bg-surface border border-neutral-light rounded-lg px-6 pb-6" >
320- <figcaption id = " diagram-metadata-claims" class = " sr-only" >
321- Metadata claims flow showing data sources (collectors, scrapers, APIs) submitting claims that resolve into golden entities with automatic conflict resolution
322- </figcaption >
314+ <MermaidDiagram
315+ id = " metadata-claims"
316+ caption = " Metadata claims flow showing data sources (collectors, scrapers, APIs) submitting claims that resolve into golden entities with automatic conflict resolution"
317+ relationships = { [
318+ " Data sources (amber): Collector A, Scraped Source, and Third-party API submit nationality claims" ,
319+ " Claims (blue): \" Nationality: Egypt\" and \" Nationality: UK\" represent conflicting data" ,
320+ " Conflict resolution: Conflicting claim (Nationality: UK) routes to Pending Conflicts Queue" ,
321+ " System nodes (emerald): Metadata Team Review resolves conflicts and updates Golden Entity" ,
322+ " Cascade: Golden Entity (Player X) automatically updates dependent systems (Match Data, Historical Stats)" ,
323+ " Agreed claims resolve directly to golden entity; conflicts require human review"
324+ ]}
325+ >
323326
324327``` mermaid
325328graph TD
@@ -345,18 +348,7 @@ graph TD
345348 class QUEUE,MT,GE,DEP1,DEP2 system
346349```
347350
348- <details class = " mt-4" >
349- <summary class = " cursor-pointer text-xs font-normal text-text-lighter hover:text-accent" >Text description of relationships</summary >
350- <ul class = " mt-2 ml-4 text-xs font-light text-text-lighter space-y-1" >
351- <li ><strong >Data sources (amber):</strong > Collector A, Scraped Source, and Third-party API submit nationality claims</li >
352- <li ><strong >Claims (blue):</strong > "Nationality: Egypt" and "Nationality: UK" represent conflicting data</li >
353- <li ><strong >Conflict resolution:</strong > Conflicting claim (Nationality: UK) routes to Pending Conflicts Queue</li >
354- <li ><strong >System nodes (emerald):</strong > Metadata Team Review resolves conflicts and updates Golden Entity</li >
355- <li ><strong >Cascade:</strong > Golden Entity (Player X) automatically updates dependent systems (Match Data, Historical Stats)</li >
356- <li >Agreed claims resolve directly to golden entity; conflicts require human review</li >
357- </ul >
358- </details >
359- </figure >
351+ </MermaidDiagram >
360352
361353 <Body size = " sm" as = " p" class = " mb-6 text-neutral italic" >
362354 Claims from data sources (amber) flow into the system. Conflicts (blue) route to a queue. The metadata
0 commit comments