fix: don’t portray special schools as failing the mainstream benchmark #70
@@ -237,19 +237,22 @@ export function SchoolDetailView({
|
||||
// reach the mainstream "expected standard", so a 0% headline and an England
|
||||
// comparison portray them as failing against a benchmark that doesn't fit.
|
||||
const isSpecial = isSpecialSchool(schoolInfo);
|
||||
// Belt-and-braces: a whole-row zero attainment (special or suppressed cohort)
|
||||
// is a placeholder, not a real mainstream result — suppress its comparison
|
||||
// too. A single 0 (e.g. 0% exceeding at a normal school) stays comparable.
|
||||
// Belt-and-braces for KS2: a whole-row zero attainment (every subject 0 — a
|
||||
// special/suppressed signature) is a placeholder, not a real result. This
|
||||
// needs ALL of RWM + reading + writing + maths to be 0, so a genuine 0%
|
||||
// combined (some pupils met individual subjects but not all three) stays
|
||||
// comparable. Attainment 8 is a single 0–80 score with no subject breakdown
|
||||
// to form such a signature, so KS4 keys off establishment type only — a
|
||||
// genuine (if extreme) 0.0 still shows its real figure and comparison.
|
||||
const ks2Placeholder = latestResults != null
|
||||
&& latestResults.rwm_expected_pct === 0
|
||||
&& (latestResults.reading_expected_pct ?? 0) === 0
|
||||
&& (latestResults.writing_expected_pct ?? 0) === 0
|
||||
&& (latestResults.maths_expected_pct ?? 0) === 0;
|
||||
const ks4Placeholder = latestResults != null && latestResults.attainment_8_score === 0;
|
||||
// Whether to drop the England-average deltas / national markers / "below"
|
||||
// framing on the attainment measures.
|
||||
const suppressKs2Comparison = isSpecial || ks2Placeholder;
|
||||
const suppressKs4Comparison = isSpecial || ks4Placeholder;
|
||||
const suppressKs4Comparison = isSpecial;
|
||||
|
||||
// Build section nav items dynamically — only sections with data.
|
||||
// Order is engagement-led (from section_nav_used analytics): the most-sought
|
||||
|
||||
@@ -40,12 +40,18 @@ export function SchoolRow({
|
||||
|
||||
// Special schools / PRUs / AP: the mainstream RWM measure and its England
|
||||
// comparison aren't a fair judgement (their pupils have SEND), so a "0% ·
|
||||
// −62 vs national" row misrepresents them. Treat the mainstream stat as not
|
||||
// comparable — same for a placeholder all-zero value.
|
||||
// −62 vs national" row misrepresents them. Also guard a placeholder all-zero
|
||||
// row (every subject 0 — a special/suppressed signature), matching
|
||||
// SchoolDetailView's ks2Placeholder. A genuine 0% combined (some pupils met
|
||||
// individual subjects but not all three) is NOT all-zero, so it stays
|
||||
// comparable and shows its real figure.
|
||||
const rwmPlaceholder =
|
||||
school.rwm_expected_pct === 0 &&
|
||||
(school.reading_expected_pct ?? 0) === 0 &&
|
||||
(school.writing_expected_pct ?? 0) === 0 &&
|
||||
(school.maths_expected_pct ?? 0) === 0;
|
||||
const rwmComparable =
|
||||
school.rwm_expected_pct != null &&
|
||||
school.rwm_expected_pct !== 0 &&
|
||||
!isSpecialSchool(school);
|
||||
school.rwm_expected_pct != null && !rwmPlaceholder && !isSpecialSchool(school);
|
||||
|
||||
// vs-national delta
|
||||
const rwmDelta =
|
||||
|
||||
@@ -110,10 +110,12 @@ export function SecondarySchoolDetailView({
|
||||
// Special schools / PRUs / AP sit the same GCSEs but teach pupils with SEND,
|
||||
// so their headline attainment is far below the mainstream average by design.
|
||||
// Drop the England comparison + "below" framing so the page doesn't portray
|
||||
// them as failing against a benchmark that doesn't fit. (Also guards a
|
||||
// placeholder all-zero Attainment 8.)
|
||||
// them as failing against a benchmark that doesn't fit. Attainment 8 is a
|
||||
// single 0–80 score with no subject breakdown to test for a placeholder, so
|
||||
// this keys off establishment type only — a genuine (if extreme) 0.0 at a
|
||||
// mainstream school still shows its real value and comparison.
|
||||
const isSpecial = isSpecialSchool(schoolInfo);
|
||||
const suppressComparison = isSpecial || (latestResults != null && latestResults.attainment_8_score === 0);
|
||||
const suppressComparison = isSpecial;
|
||||
|
||||
const admissionsTag = (() => {
|
||||
const policy = schoolInfo.admissions_policy?.toLowerCase() ?? '';
|
||||
|
||||
@@ -57,8 +57,11 @@ export function SecondarySchoolRow({
|
||||
const att8 = school.attainment_8_score;
|
||||
// Special schools / PRUs / AP: Attainment 8 vs the LA average isn't a fair
|
||||
// comparison (their pupils have SEND), so drop the delta and the number
|
||||
// rather than show them trailing "the average" by design.
|
||||
const att8Comparable = att8 != null && att8 !== 0 && !isSpecialSchool(school);
|
||||
// rather than show them trailing "the average" by design. Attainment 8 is a
|
||||
// single 0–80 score with no subject breakdown to test for a placeholder, so
|
||||
// this keys off establishment type only — a genuine (if extreme) 0.0 at a
|
||||
// mainstream school still shows its real value.
|
||||
const att8Comparable = att8 != null && !isSpecialSchool(school);
|
||||
const laDelta =
|
||||
att8Comparable && laAvgAttainment8 != null ? (att8 as number) - laAvgAttainment8 : null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user