From 99dc5e7f8b020c70c8d3602088f050147e5d32ee Mon Sep 17 00:00:00 2001 From: Tudor Sitaru Date: Tue, 19 May 2026 13:46:53 +0100 Subject: [PATCH] feat(rankings): default primary metric to higher standard, not expected MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The expected-standard ranking groups too many schools at or near 100% — the leaderboard isn't useful when the top 30+ schools all share the same value. Switch the default primary metric to the higher (above-expected) standard, which discriminates between schools much more clearly at the top end. Secondary still defaults to Attainment 8. Users can still pick either via the dropdown. Co-Authored-By: Claude Opus 4.7 --- nextjs-app/app/rankings/page.tsx | 2 +- nextjs-app/components/RankingsView.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nextjs-app/app/rankings/page.tsx b/nextjs-app/app/rankings/page.tsx index 7c1ab4c..96f8882 100644 --- a/nextjs-app/app/rankings/page.tsx +++ b/nextjs-app/app/rankings/page.tsx @@ -29,7 +29,7 @@ export default async function RankingsPage({ searchParams }: RankingsPageProps) const { metric: metricParam, local_authority, year: yearParam, phase: phaseParam } = await searchParams; const phase = phaseParam || 'primary'; - const metric = metricParam || (phase === 'secondary' ? 'attainment_8_score' : 'rwm_expected_pct'); + const metric = metricParam || (phase === 'secondary' ? 'attainment_8_score' : 'rwm_high_pct'); const year = yearParam ? parseInt(yearParam) : undefined; // Fetch rankings data with error handling diff --git a/nextjs-app/components/RankingsView.tsx b/nextjs-app/components/RankingsView.tsx index b00394c..cc46d75 100644 --- a/nextjs-app/components/RankingsView.tsx +++ b/nextjs-app/components/RankingsView.tsx @@ -74,7 +74,7 @@ export function RankingsView({ }; const handlePhaseChange = (phase: string) => { - const defaultMetric = phase === 'secondary' ? 'attainment_8_score' : 'rwm_expected_pct'; + const defaultMetric = phase === 'secondary' ? 'attainment_8_score' : 'rwm_high_pct'; updateFilters({ phase, metric: defaultMetric }); };