Complexity Matrix
Schools × the seven complexity dimensions (0–10) as a single-hue heat-map with an Overall column. Sort by any column, hover a cell to read it, hover a row to highlight that school elsewhere.
Live example
Athena Learning Trust's nine schools, from TRUSTS — click a column header to sort, hover a cellComplexity matrix
Each school scored 0–10 on seven complexity dimensions; darker = more complex / greater pressure. Overall is the mean of the seven. Click a column to sort.| School | SEND | Disadv. | Lang. | Finance | Workforce | Academic | Demand | Overall |
|---|---|---|---|---|---|---|---|---|
| The Ilfracombe Academy S | 7.8 | 8.1 | 3.2 | 5.8 | 7.0 | 7.2 | 6.8 | 6.6 |
| Bideford College S | 7.6 | 8.0 | 3.5 | 6.2 | 6.7 | 6.8 | 7.0 | 6.5 |
| Pool Academy S | 7.5 | 7.7 | 3.0 | 6.1 | 6.6 | 6.6 | 6.1 | 6.2 |
| Atlantic Academy S | 7.1 | 7.5 | 3.1 | 6.0 | 6.4 | 6.7 | 5.9 | 6.1 |
| Camborne Science and International Academy S | 2.0 | 7.8 | 3.6 | 6.3 | 6.2 | 6.0 | 7.5 | 5.6 |
| Launceston College S | 6.7 | 5.8 | 2.5 | 6.6 | 5.7 | 5.5 | 6.2 | 5.6 |
| Egloskerry Primary School P | 6.2 | 5.1 | 2.0 | 6.8 | 6.1 | 4.2 | 4.4 | 5.0 |
| Launceston Primary School P | 2.0 | 5.3 | 2.3 | 6.9 | 5.8 | 4.5 | 6.5 | 4.8 |
| Altarnun Primary School P | 1.0 | 5.6 | 1.8 | 6.7 | 6.5 | 4.8 | 3.6 | 4.3 |
EdCo data mapping — proposed
Proposed reading of the Metrics shape, with the pivot the mapping layer would do. Nothing in EdCo's data describes this widget yet.
| Visual | Shape column | Contract field | Row | Notes |
|---|---|---|---|---|
| Row label | SubjectLabel | rows[].name | one per organisation | |
| Row link / highlight | SubjectRecordID | rows[].id | one per organisation | |
| Phase tag (P/S/A) | SubjectType or ValueContext | rows[].tag | one per organisation | Not in the Metrics shape as such — needs confirming. |
| A cell | AbsoluteValue | rows[].complexity[<dimension>] | one per organisation per dimension | DataCategory names the dimension; the mapping layer pivots 7 rows into one. |
| Dimension column headers | DataCategory | COMPLEXITY_DIMS | — | Labels, short names and descriptions are app config keyed by the dimension. |
| Overall column | computed (mean) | — | — | Or a further DataCategory if EdCo supplies it. |
| Cohort rows (school page) | CohortID | rows[].reference = true | one per cohort per dimension |
Widget elements and their frames
What tblWidgetElements would hold for this widget, and the kind of frame each element takes.
| Element | Shape | Frame it takes | Notes |
|---|---|---|---|
| Dimensions | Metrics | A cohort-style frame on the Complexity topic: one row per organisation (trust page) or per cohort (school page), per dimension. | The builder currently proposes a single 'Dimensions' element with the cohort role. A 7-measure frame is the one case where a list frame is exactly right. |
Dependencies
Component: app/components/trust/ComplexityMatrix.vue
Explicit imports
Imported at the top of the component.
COMPLEXITY_DIMS, mean, ComplexityKey (type)—~/data/trustsThe seven dimensions (key, label, short header, description) in column order — SEND, Disadv., Lang., Finance, Workforce, Academic, Demand — and the mean for the Overall column. App-level config.LENSES—~/data/widgetsThe Complexity lens: its label, icon and colour token (amber) for the sequential fill. App-level config.cssVar—~/utils/identityResolves the lens colour to a CSS variable; cells are color-mix(hue, 6%–78%) so text tokens stay legible on both themes.cn—~/utils/cnConditional class names.
Auto-imported components (Nuxt)
No import lines — Nuxt resolves these. A port to another stack must import them explicitly.
InfoTooltip—widgets/parts/InfoTooltip.vueThe (i) beside the title.LensIcon—widgets/parts/LensIcon.vueThe lens glyph in the header.Badge—components/Badge.vue"highest in trust" / "lowest in trust" in the footer read-out.UIcon—@nuxt/iconSort arrows in column headers.
Framework APIs
Auto-imported by Nuxt; from 'vue' in a plain Vue build.
ref, computed—vueInternal state only — sort column and direction, hovered cell, derived extremes. None of it needs the API.
Input contract — rows: MatrixRow[]
MatrixRow is exported from the component. One row per organisation (or cohort), each with a value per dimension.
| Field | Type | Notes |
|---|---|---|
| rows[].id | string | Stable id — emitted on hover/select so the page can highlight the same school elsewhere. |
| rows[].name | string | Row label. |
| rows[].tag | string? | Short tag after the name: phase initial (P/S/A) on the trust page; the cohort name on the school page. |
| rows[].complexity | Record<ComplexityKey, number> | One value 0–10 per dimension: send, disadvantage, language, financial, workforce, academic, demand. Higher = more pressure on every dimension (Financial is already inverted upstream). |
| rows[].reference | boolean? | A cohort average rather than an organisation: not clickable, excluded from the highest/lowest read-out. |
Props & events
| Prop | Type | Notes |
|---|---|---|
| rows | MatrixRow[] | The payload — see the contract. Overall is computed by the widget as the mean of the seven. |
| highlightId | string? | Row to emphasise — shared hover state with the map and rankings. |
| sortable | boolean? | Default true. Off on the school page, where the row order (this school, then cohorts) is meaningful. |
| title | string? | Default "Complexity matrix". |
| @hover | (id: string | null) | Emitted as the pointer enters/leaves an organisation row. |
| @select | (id: string) | Emitted on click of an organisation row — the page opens the school record. |
Wiring it to the API
- The widget wants one row per organisation with seven numbers. If the frame returns one row per organisation per dimension (the natural Metrics shape), the mapping layer pivots it to this contract.
- Overall is computed client-side as the mean of the seven; if EdCo supplies an overall score, pass it as an eighth value and the widget's mean can be dropped.
- The seven dimensions are app configuration (COMPLEXITY_DIMS): labels, short headers, descriptions and column order live in the app, keyed by the dimension key the API uses.
- On the school page the same widget shows one organisation row plus cohort rows flagged `reference: true` — the same frame as Metric Insight's cohort comparisons, pivoted.
- Sorting, the colour scale, the footer read-out and the highest/lowest badges are all derived client-side from the rows.
For the spec to decide
- Row shape: one row per organisation per dimension (63 rows for 9 schools), or one row per organisation with seven value columns? The Metrics shape implies the former; the widget wants the latter.
- Is the Overall score a supplied measure or always the mean of the seven? If supplied, is it weighted?
- Is the Financial dimension inverted at source (higher = more pressure), as the current data assumes? The source column is named 'Financial Health 0–10', which reads the other way.
- Phase tag: where does it come from? Not in the Metrics shape.
- Same widget on the school page with cohort rows: is that one frame (Pupil-Premium-style cohort comparisons for seven measures) or seven?

