From e36125b24aba254a8d15c5c33b4d2a296e691995 Mon Sep 17 00:00:00 2001 From: Tudor Date: Mon, 20 Jul 2026 07:19:22 +0100 Subject: [PATCH] fix(detail): label official DfE figures as 'England average' (provenance) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Batch B (points 5-6): the detail page called every national figure a 'National avg'. All of them come from the official-DfE national-averages marts (KS2/KS4 headlines), so they are England averages — relabel to match the compare screen's provenance convention ('England average' for official figures; the detail page has no computed benchmarks, so no 'state-school average (computed)' label is needed). Point 6 (anchoring every number) is already satisfied on the detail page via DeltaChip. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_0146VHeLAWjDVE2B5uU67jCB --- nextjs-app/components/SchoolDetailView.tsx | 22 +++++++++---------- .../components/SecondarySchoolDetailView.tsx | 8 +++---- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/nextjs-app/components/SchoolDetailView.tsx b/nextjs-app/components/SchoolDetailView.tsx index 796efa6..2699d35 100644 --- a/nextjs-app/components/SchoolDetailView.tsx +++ b/nextjs-app/components/SchoolDetailView.tsx @@ -622,8 +622,8 @@ export function SchoolDetailView({

{isSecondary - ? 'GCSE results for Year 11 pupils. National averages shown for comparison.' - : 'End-of-primary-school tests taken by Year 6 pupils. National averages shown for comparison.'} + ? 'GCSE results for Year 11 pupils. England averages shown for comparison.' + : 'End-of-primary-school tests taken by Year 6 pupils. England averages shown for comparison.'}

{/* ── Primary / KS2 content ── */} @@ -648,7 +648,7 @@ export function SchoolDetailView({ )} {primaryAvg.rwm_expected_pct != null && ( -
National avg: {primaryAvg.rwm_expected_pct.toFixed(0)}%
+
England avg: {primaryAvg.rwm_expected_pct.toFixed(0)}%
)} )} @@ -670,7 +670,7 @@ export function SchoolDetailView({ )} {primaryAvg.rwm_high_pct != null && ( -
National avg: {primaryAvg.rwm_high_pct.toFixed(0)}%
+
England avg: {primaryAvg.rwm_high_pct.toFixed(0)}%
)} )} @@ -776,7 +776,7 @@ export function SchoolDetailView({
{latestResults.attainment_8_score.toFixed(1)}
{secondaryAvg.attainment_8_score != null && ( -
National avg: {secondaryAvg.attainment_8_score.toFixed(1)}
+
England avg: {secondaryAvg.attainment_8_score.toFixed(1)}
)} )} @@ -800,7 +800,7 @@ export function SchoolDetailView({
{formatPercentage(latestResults.english_maths_standard_pass_pct)}
{secondaryAvg.english_maths_standard_pass_pct != null && ( -
National avg: {secondaryAvg.english_maths_standard_pass_pct.toFixed(0)}%
+
England avg: {secondaryAvg.english_maths_standard_pass_pct.toFixed(0)}%
)} )} @@ -812,7 +812,7 @@ export function SchoolDetailView({
{formatPercentage(latestResults.english_maths_strong_pass_pct)}
{secondaryAvg.english_maths_strong_pass_pct != null && ( -
National avg: {secondaryAvg.english_maths_strong_pass_pct.toFixed(0)}%
+
England avg: {secondaryAvg.english_maths_strong_pass_pct.toFixed(0)}%
)} )} @@ -968,7 +968,7 @@ export function SchoolDetailView({ )} {primaryAvg.eal_pct != null && ( -
National avg: {primaryAvg.eal_pct.toFixed(0)}%
+
England avg: {primaryAvg.eal_pct.toFixed(0)}%
)} )} @@ -985,7 +985,7 @@ export function SchoolDetailView({ )} {primaryAvg.sen_support_pct != null && ( -
National avg: {primaryAvg.sen_support_pct.toFixed(0)}%
+
England avg: {primaryAvg.sen_support_pct.toFixed(0)}%
)} )} @@ -1157,7 +1157,7 @@ export function SchoolDetailView({
{formatPercentage(absenceData.overall_absence_rate)}
{primaryAvg.overall_absence_pct != null && ( -
National avg: ~{primaryAvg.overall_absence_pct.toFixed(1)}%
+
England avg: ~{primaryAvg.overall_absence_pct.toFixed(1)}%
)} )} @@ -1169,7 +1169,7 @@ export function SchoolDetailView({
{formatPercentage(absenceData.persistent_absence_rate)}
{primaryAvg.persistent_absence_pct != null && ( -
National avg: ~{primaryAvg.persistent_absence_pct.toFixed(0)}%
+
England avg: ~{primaryAvg.persistent_absence_pct.toFixed(0)}%
)} )} diff --git a/nextjs-app/components/SecondarySchoolDetailView.tsx b/nextjs-app/components/SecondarySchoolDetailView.tsx index 9b8ee98..0289e29 100644 --- a/nextjs-app/components/SecondarySchoolDetailView.tsx +++ b/nextjs-app/components/SecondarySchoolDetailView.tsx @@ -463,7 +463,7 @@ export function SecondarySchoolDetailView({ GCSE Results ({formatAcademicYear(latestResults.year)})

- GCSE results for Year 11 pupils. National averages shown for comparison. + GCSE results for Year 11 pupils. England averages shown for comparison.

{p8Suspended && ( @@ -492,7 +492,7 @@ export function SecondarySchoolDetailView({ )} {secondaryAvg.attainment_8_score != null && ( -
National avg: {secondaryAvg.attainment_8_score.toFixed(1)}
+
England avg: {secondaryAvg.attainment_8_score.toFixed(1)}
)} )} @@ -532,7 +532,7 @@ export function SecondarySchoolDetailView({ )} {secondaryAvg.english_maths_strong_pass_pct != null && ( -
National avg: {secondaryAvg.english_maths_strong_pass_pct.toFixed(0)}%
+
England avg: {secondaryAvg.english_maths_strong_pass_pct.toFixed(0)}%
)} )} @@ -554,7 +554,7 @@ export function SecondarySchoolDetailView({ )} {secondaryAvg.english_maths_standard_pass_pct != null && ( -
National avg: {secondaryAvg.english_maths_standard_pass_pct.toFixed(0)}%
+
England avg: {secondaryAvg.english_maths_standard_pass_pct.toFixed(0)}%
)} )}