Education IQ
Embedded in Northwind CRM
N
Northwind CRM
Widget info
Widget info · developer handover

School Ranking

Every school in the trust ranked on one measure, as bars against the trust average (and an optional benchmark), with a Data view. The trust-level counterpart of Metric Insight.

Live example

Athena Learning Trust's nine schools on Overall complexity, from TRUSTS — hover a row, flip the sort, try Data
Student Demographics

Overall complexity

Mean of the seven complexity dimensions (0–10). Higher = a more challenging context.
Complexity

EdCo data mapping — proposed

Proposed reading of the 21-column Metrics shape for a per-organisation frame. Nothing in EdCo's data describes this widget yet; this is the mapping the spec would need to confirm.

VisualShape columnContract fieldRowNotes
Family label and iconDataFamily / DefaultIconfamilyanySame for every row of the frame.
TitleDataCategorynameanyThe measure, e.g. Overall complexity.
Row: school nameSubjectLabelschools[].nameone per school
Row: linkSubjectRecordIDschools[].hrefone per schoolSPIRIT OrgID → the school's record URL.
Row: bar and figureAbsoluteValueschools[].<measure>one per schoolFormatted by the caller.
Data view: phase, pupilsValueContext / SubjectTypeschools[].phase, .rollone per schoolNeeds confirming — the Metrics shape has no phase or roll column.
Trust average lineAbsoluteValueaveragetrust cohort rowA row with CohortID = trust, or computed by the mapping layer.
Benchmark lineAbsoluteValuebenchmark.valuenational cohort rowOptional.

Widget elements and their frames

What tblWidgetElements would hold for this widget, and the kind of frame each element takes.

ElementShapeFrame it takesNotes
RankingMetricsA one-measure frame returning one row per organisation in the trust (SubjectType = Organisation), plus optional cohort rows for the trust and national references.The unit is the school, not the cohort — the opposite of Metric Insight, where one organisation is compared against cohorts.

Dependencies

Component: app/components/trust/SchoolRanking.vue

Explicit imports

Imported at the top of the component.

  • FamilyKey, LensKey (types) — ~/data/widgetsThe data family (drives the header identity and the bar hue) and the lens (how to read a high value).
  • DATA_FAMILIES — ~/data/widgetsApp-level config: the family's label, icon and colour token. Stays in the app — not API data.
  • TrustSchool (type) — ~/data/trustsThe row type: id, name, href, phase, roll, plus whatever the `value` accessor reads.
  • WidgetMode (type) — ~/utils/typesThe "desktop" | "data" mode union for the home/table toggle.
  • cssVar — ~/utils/identityResolves the family colour token to a CSS variable for the bar fill (500 for the highlighted school, 300 for the rest).
  • cn — ~/utils/cnConditional class names.

Auto-imported components (Nuxt)

No import lines — Nuxt resolves these (flat names, pathPrefix: false). A port to another stack must import them explicitly.

  • WidgetShell — widgets/parts/WidgetShell.vueShared chrome: family header, definition tooltip, the sort toggle in the meta slot, and the home/Data mode toggle in the footer.
  • NuxtLink — nuxtEach school name links to its record (`href`).
  • UIcon — @nuxt/iconSort-direction arrows.

Framework APIs

Auto-imported by Nuxt; from 'vue' in a plain Vue build.

  • ref, computed — vueInternal state only — mode, sort direction, show-all, and the ranked/scaled rows. None of it needs the API.

Input contract — schools: TrustSchool[] + value accessor

Defined in app/data/trusts.ts. One row per organisation; the ranked measure is read through the `value` prop, so the same component serves every ranking on the trust page.

FieldTypeNotes
namestringWidget title, e.g. "Overall complexity".
familyFamilyKeyData family ("demographics", "financial"…) — header identity and bar colour.
lensLensKey?How to read a high value ("complexity"…) — shown under the title.
definitionstringPlain-English definition for the header tooltip.
schools[]TrustSchool[]One entry per organisation in the trust. The widget reads id, name, href, phase and roll directly.
schools[].<measure>number | nullThe ranked measure, read via the `value` accessor. null = not available, shown as — and sorted last.
averagenumber?The trust reference line (dashed). Caller decides: mean or pupil-weighted.
benchmark{ label, value }?An external reference line (dotted), e.g. national.

Props & events

PropTypeNotes
value(s: TrustSchool) => number | nullAccessor for the ranked measure. With an API, map the response so this reads a single field.
format(v: number) => stringFormats the figure for display (e.g. toFixed(1), fmtGBP).
averageLabelstring?Default "Trust average".
highlightIdstring?Row to emphasise — shared hover state across the page's widgets and the map.
limitnumber?Rows before "Show all N". Default 6. (Builder setting: Rows before scrolling.)
ascendingboolean?Start lowest-first (e.g. reserves). The header toggle flips it.
drillableboolean?Marks the widget as having a drill-through; emits "drill".
@hover(id: string | null)Emitted as the pointer enters/leaves a row, for cross-highlighting.

Wiring it to the API

  • One call returns one row per organisation in the trust; the widget sorts, ranks and scales client-side. The scale always starts at 0 (never a truncated axis) and extends to the largest of the values and the reference lines.
  • The trust average is passed in, not computed by the widget, so the API (or the mapping layer) decides whether it's a mean or pupil-weighted. If the frame returns a trust-level row (CohortID = trust), use that.
  • The Data view is derived from the same rows — no second call.
  • Hover is emitted, not kept: the page owns highlightId so the map, matrix and rankings highlight together.
  • Formatting is the caller's job (format prop); the widget never parses numbers.

For the spec to decide

  • Is a 'rows per organisation' frame a different kind of frame in EdCo's model, or the same frame queried for a trust? The spreadsheet's frames are all written from one organisation's point of view.
  • Where do phase and pupils on roll come from for the Data view? They aren't in the Metrics shape; either add columns or let the widget look them up from the organisation record.
  • Is the trust average supplied as a cohort row (CohortID = trust) or computed? Pupil-weighted versus mean matters for per-pupil measures.
  • Should the per-row link go to the school's record in the CRM, or to the school's Education IQ dashboard?