feat(rankings): default primary metric to higher standard, not expected
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 12s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 56s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 12s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 1s

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 <noreply@anthropic.com>
This commit is contained in:
Tudor Sitaru
2026-05-19 13:46:53 +01:00
parent 763aef09f8
commit 99dc5e7f8b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ export default async function RankingsPage({ searchParams }: RankingsPageProps)
const { metric: metricParam, local_authority, year: yearParam, phase: phaseParam } = await searchParams; const { metric: metricParam, local_authority, year: yearParam, phase: phaseParam } = await searchParams;
const phase = phaseParam || 'primary'; 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; const year = yearParam ? parseInt(yearParam) : undefined;
// Fetch rankings data with error handling // Fetch rankings data with error handling
+1 -1
View File
@@ -74,7 +74,7 @@ export function RankingsView({
}; };
const handlePhaseChange = (phase: string) => { 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 }); updateFilters({ phase, metric: defaultMetric });
}; };