fix(secondary): use GIAS total_pupils for school roll, not KS4 exam cohort
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 16s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 53s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 13s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 1s
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 16s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 53s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 13s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 1s
latestResults.total_pupils in KS4 data is the Year 11 exam cohort (~1/7 of the school), not the full school roll. Prefer schoolInfo.total_pupils (sourced from GIAS NumberOfPupils) which is the statutory census headcount. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -215,9 +215,9 @@ export function SecondarySchoolDetailView({
|
|||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{latestResults?.total_pupils != null && (
|
{(schoolInfo.total_pupils != null || latestResults?.total_pupils != null) && (
|
||||||
<span className={styles.headerDetail}>
|
<span className={styles.headerDetail}>
|
||||||
<strong>Pupils:</strong> {latestResults.total_pupils.toLocaleString()}
|
<strong>Pupils:</strong> {(schoolInfo.total_pupils ?? latestResults!.total_pupils!).toLocaleString()}
|
||||||
{schoolInfo.capacity != null && ` (capacity: ${schoolInfo.capacity})`}
|
{schoolInfo.capacity != null && ` (capacity: ${schoolInfo.capacity})`}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
@@ -716,10 +716,10 @@ export function SecondarySchoolDetailView({
|
|||||||
<div className={styles.metricHint}>Education, Health and Care Plan</div>
|
<div className={styles.metricHint}>Education, Health and Care Plan</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{latestResults?.total_pupils != null && (
|
{(schoolInfo.total_pupils != null || latestResults?.total_pupils != null) && (
|
||||||
<div className={styles.metricCard}>
|
<div className={styles.metricCard}>
|
||||||
<div className={styles.metricLabel}>Total pupils</div>
|
<div className={styles.metricLabel}>Total pupils</div>
|
||||||
<div className={styles.metricValue}>{latestResults.total_pupils.toLocaleString()}</div>
|
<div className={styles.metricValue}>{(schoolInfo.total_pupils ?? latestResults!.total_pupils!).toLocaleString()}</div>
|
||||||
{schoolInfo.capacity != null && (
|
{schoolInfo.capacity != null && (
|
||||||
<div className={styles.metricHint}>Capacity: {schoolInfo.capacity}</div>
|
<div className={styles.metricHint}>Capacity: {schoolInfo.capacity}</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user