feat: add secondary school support with KS4 data and metric tooltips
Some checks failed
Build and Push Docker Images / Build Frontend (Next.js) (push) Has been cancelled
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Has been cancelled
Build and Push Docker Images / Trigger Portainer Update (push) Has been cancelled
Build and Push Docker Images / Build Backend (FastAPI) (push) Has been cancelled
Some checks failed
Build and Push Docker Images / Build Frontend (Next.js) (push) Has been cancelled
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Has been cancelled
Build and Push Docker Images / Trigger Portainer Update (push) Has been cancelled
Build and Push Docker Images / Build Backend (FastAPI) (push) Has been cancelled
- Backend: replace INNER JOIN ks2 with UNION ALL (ks2 + ks4) so primary and secondary schools both appear in the main DataFrame - Backend: add /api/national-averages endpoint computing means from live data, replacing the hardcoded NATIONAL_AVG constant on the frontend - Backend: add phase filter param to /api/schools; return phases from /api/filters; fix hardcoded "phase": "Primary" in school detail endpoint - Backend: add KS4 metric definitions (Attainment 8, Progress 8, EBacc, English & Maths pass rates) to METRIC_DEFINITIONS and RANKING_COLUMNS - Frontend: SchoolDetailView is now phase-aware — secondary schools show a GCSE Results section (Att8, P8, E&M, EBacc) instead of SATs; phonics tab hidden for secondary; admissions says Year 7 instead of Year 3; history table shows KS4 columns; chart datasets switch for secondary - Frontend: new MetricTooltip component (CSS-only ⓘ icon) backed by METRIC_EXPLANATIONS — added to RWM, GPS, SEN, EAL, IDACI, progress scores and all KS4 metrics throughout SchoolDetailView and SchoolCard - Frontend: METRIC_EXPLANATIONS extended with KS4 terms (Attainment 8, Progress 8, EBacc) and previously missing terms (SEN, EHCP, EAL, IDACI) - Frontend: SchoolCard expands "RWM" to "Reading, Writing & Maths" and shows Attainment 8 / English & Maths Grade 4+ for secondary schools - Frontend: FilterBar adds Phase dropdown (Primary / Secondary / All-through) - Frontend: HomeView hero copy updated; compact list shows phase-aware metric - Global metadata updated to remove "primary only" framing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -48,12 +48,35 @@ export function SchoolCard({ school, onAddToCompare, onRemoveFromCompare, showDi
|
||||
)}
|
||||
</div>
|
||||
|
||||
{(school.rwm_expected_pct !== null || school.reading_progress !== null) && (
|
||||
{(school.rwm_expected_pct != null || school.attainment_8_score != null || school.reading_progress !== null) && (
|
||||
<div className={styles.metrics}>
|
||||
{/* KS4 card metrics for secondary schools */}
|
||||
{school.attainment_8_score != null && (
|
||||
<div className={styles.metric}>
|
||||
<span className={styles.metricLabel}>
|
||||
Attainment 8
|
||||
<span className={styles.metricHint}>avg grade across best 8 GCSEs</span>
|
||||
</span>
|
||||
<div className={styles.metricValue}>
|
||||
<strong>{school.attainment_8_score.toFixed(1)}</strong>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{school.english_maths_standard_pass_pct != null && (
|
||||
<div className={styles.metric}>
|
||||
<span className={styles.metricLabel}>
|
||||
English & Maths Grade 4+
|
||||
<span className={styles.metricHint}>% standard pass in both</span>
|
||||
</span>
|
||||
<div className={styles.metricValue}>
|
||||
<strong>{formatPercentage(school.english_maths_standard_pass_pct)}</strong>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{school.rwm_expected_pct !== null && (
|
||||
<div className={styles.metric}>
|
||||
<span className={styles.metricLabel}>
|
||||
RWM Expected
|
||||
Reading, Writing & Maths
|
||||
<span className={styles.metricHint}>% meeting expected standard</span>
|
||||
</span>
|
||||
<div className={styles.metricValue}>
|
||||
|
||||
Reference in New Issue
Block a user