Add pupil absence data to school details modal
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 58s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 58s
Display test absence percentages (reading, maths, GPS, writing, science) in a new section in the school modal. Requires database re-import. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -96,7 +96,14 @@ class SchoolResult(Base):
|
|||||||
sen_support_pct = Column(Float)
|
sen_support_pct = Column(Float)
|
||||||
sen_ehcp_pct = Column(Float)
|
sen_ehcp_pct = Column(Float)
|
||||||
stability_pct = Column(Float)
|
stability_pct = Column(Float)
|
||||||
|
|
||||||
|
# Pupil Absence from Tests
|
||||||
|
reading_absence_pct = Column(Float)
|
||||||
|
gps_absence_pct = Column(Float)
|
||||||
|
maths_absence_pct = Column(Float)
|
||||||
|
writing_absence_pct = Column(Float)
|
||||||
|
science_absence_pct = Column(Float)
|
||||||
|
|
||||||
# Gender Breakdown
|
# Gender Breakdown
|
||||||
rwm_expected_boys_pct = Column(Float)
|
rwm_expected_boys_pct = Column(Float)
|
||||||
rwm_expected_girls_pct = Column(Float)
|
rwm_expected_girls_pct = Column(Float)
|
||||||
@@ -173,6 +180,12 @@ RESULT_FIELD_MAPPING = {
|
|||||||
'sen_support_pct': 'sen_support_pct',
|
'sen_support_pct': 'sen_support_pct',
|
||||||
'sen_ehcp_pct': 'sen_ehcp_pct',
|
'sen_ehcp_pct': 'sen_ehcp_pct',
|
||||||
'stability_pct': 'stability_pct',
|
'stability_pct': 'stability_pct',
|
||||||
|
# Absence
|
||||||
|
'reading_absence_pct': 'reading_absence_pct',
|
||||||
|
'gps_absence_pct': 'gps_absence_pct',
|
||||||
|
'maths_absence_pct': 'maths_absence_pct',
|
||||||
|
'writing_absence_pct': 'writing_absence_pct',
|
||||||
|
'science_absence_pct': 'science_absence_pct',
|
||||||
# Gender
|
# Gender
|
||||||
'rwm_expected_boys_pct': 'rwm_expected_boys_pct',
|
'rwm_expected_boys_pct': 'rwm_expected_boys_pct',
|
||||||
'rwm_expected_girls_pct': 'rwm_expected_girls_pct',
|
'rwm_expected_girls_pct': 'rwm_expected_girls_pct',
|
||||||
|
|||||||
@@ -42,6 +42,12 @@ COLUMN_MAPPINGS = {
|
|||||||
"PSENELK": "sen_support_pct",
|
"PSENELK": "sen_support_pct",
|
||||||
"PSENELE": "sen_ehcp_pct",
|
"PSENELE": "sen_ehcp_pct",
|
||||||
"PTMOBN": "stability_pct",
|
"PTMOBN": "stability_pct",
|
||||||
|
# Pupil absence from tests
|
||||||
|
"PTREAD_AT": "reading_absence_pct",
|
||||||
|
"PTGPS_AT": "gps_absence_pct",
|
||||||
|
"PTMAT_AT": "maths_absence_pct",
|
||||||
|
"PTWRITTA_AD": "writing_absence_pct",
|
||||||
|
"PTSCITA_AD": "science_absence_pct",
|
||||||
# Gender breakdown
|
# Gender breakdown
|
||||||
"PTRWM_EXP_B": "rwm_expected_boys_pct",
|
"PTRWM_EXP_B": "rwm_expected_boys_pct",
|
||||||
"PTRWM_EXP_G": "rwm_expected_girls_pct",
|
"PTRWM_EXP_G": "rwm_expected_girls_pct",
|
||||||
@@ -86,6 +92,12 @@ NUMERIC_COLUMNS = [
|
|||||||
"sen_support_pct",
|
"sen_support_pct",
|
||||||
"sen_ehcp_pct",
|
"sen_ehcp_pct",
|
||||||
"stability_pct",
|
"stability_pct",
|
||||||
|
# Pupil absence from tests
|
||||||
|
"reading_absence_pct",
|
||||||
|
"gps_absence_pct",
|
||||||
|
"maths_absence_pct",
|
||||||
|
"writing_absence_pct",
|
||||||
|
"science_absence_pct",
|
||||||
# Gender breakdown
|
# Gender breakdown
|
||||||
"rwm_expected_boys_pct",
|
"rwm_expected_boys_pct",
|
||||||
"rwm_expected_girls_pct",
|
"rwm_expected_girls_pct",
|
||||||
@@ -331,6 +343,42 @@ METRIC_DEFINITIONS = {
|
|||||||
"type": "percentage",
|
"type": "percentage",
|
||||||
"category": "context",
|
"category": "context",
|
||||||
},
|
},
|
||||||
|
# Pupil Absence from Tests
|
||||||
|
"reading_absence_pct": {
|
||||||
|
"name": "Reading Test Absence %",
|
||||||
|
"short_name": "Reading Absent",
|
||||||
|
"description": "% of pupils absent from or unable to access the Reading test",
|
||||||
|
"type": "percentage",
|
||||||
|
"category": "absence",
|
||||||
|
},
|
||||||
|
"gps_absence_pct": {
|
||||||
|
"name": "GPS Test Absence %",
|
||||||
|
"short_name": "GPS Absent",
|
||||||
|
"description": "% of pupils absent from or unable to access the GPS test",
|
||||||
|
"type": "percentage",
|
||||||
|
"category": "absence",
|
||||||
|
},
|
||||||
|
"maths_absence_pct": {
|
||||||
|
"name": "Maths Test Absence %",
|
||||||
|
"short_name": "Maths Absent",
|
||||||
|
"description": "% of pupils absent from or unable to access the Maths test",
|
||||||
|
"type": "percentage",
|
||||||
|
"category": "absence",
|
||||||
|
},
|
||||||
|
"writing_absence_pct": {
|
||||||
|
"name": "Writing Absence %",
|
||||||
|
"short_name": "Writing Absent",
|
||||||
|
"description": "% of pupils absent from or disapplied in Writing assessment",
|
||||||
|
"type": "percentage",
|
||||||
|
"category": "absence",
|
||||||
|
},
|
||||||
|
"science_absence_pct": {
|
||||||
|
"name": "Science Absence %",
|
||||||
|
"short_name": "Science Absent",
|
||||||
|
"description": "% of pupils absent from or disapplied in Science assessment",
|
||||||
|
"type": "percentage",
|
||||||
|
"category": "absence",
|
||||||
|
},
|
||||||
# 3-Year Averages
|
# 3-Year Averages
|
||||||
"rwm_expected_3yr_pct": {
|
"rwm_expected_3yr_pct": {
|
||||||
"name": "RWM Expected % (3-Year Avg)",
|
"name": "RWM Expected % (3-Year Avg)",
|
||||||
@@ -398,6 +446,12 @@ RANKING_COLUMNS = [
|
|||||||
"eal_pct",
|
"eal_pct",
|
||||||
"sen_support_pct",
|
"sen_support_pct",
|
||||||
"stability_pct",
|
"stability_pct",
|
||||||
|
# Absence
|
||||||
|
"reading_absence_pct",
|
||||||
|
"gps_absence_pct",
|
||||||
|
"maths_absence_pct",
|
||||||
|
"writing_absence_pct",
|
||||||
|
"science_absence_pct",
|
||||||
# 3-year
|
# 3-year
|
||||||
"rwm_expected_3yr_pct",
|
"rwm_expected_3yr_pct",
|
||||||
"reading_avg_3yr",
|
"reading_avg_3yr",
|
||||||
|
|||||||
@@ -120,6 +120,36 @@ const TERM_DEFINITIONS = {
|
|||||||
description: "The total number of pupils enrolled at the school.",
|
description: "The total number of pupils enrolled at the school.",
|
||||||
note: null,
|
note: null,
|
||||||
},
|
},
|
||||||
|
reading_absence: {
|
||||||
|
title: "Reading Test Absence",
|
||||||
|
description:
|
||||||
|
"The percentage of pupils who were absent from or unable to access the Reading test on test day.",
|
||||||
|
note: "Includes pupils who were ill, absent, or had circumstances preventing access.",
|
||||||
|
},
|
||||||
|
gps_absence: {
|
||||||
|
title: "GPS Test Absence",
|
||||||
|
description:
|
||||||
|
"The percentage of pupils who were absent from or unable to access the Grammar, Punctuation and Spelling test.",
|
||||||
|
note: "Includes pupils who were ill, absent, or had circumstances preventing access.",
|
||||||
|
},
|
||||||
|
maths_absence: {
|
||||||
|
title: "Maths Test Absence",
|
||||||
|
description:
|
||||||
|
"The percentage of pupils who were absent from or unable to access the Maths test on test day.",
|
||||||
|
note: "Includes pupils who were ill, absent, or had circumstances preventing access.",
|
||||||
|
},
|
||||||
|
writing_absence: {
|
||||||
|
title: "Writing Absence/Disapplied",
|
||||||
|
description:
|
||||||
|
"The percentage of pupils who were absent from or disapplied from the Writing teacher assessment.",
|
||||||
|
note: "Disapplied means formally removed from assessment, usually due to significant special needs.",
|
||||||
|
},
|
||||||
|
science_absence: {
|
||||||
|
title: "Science Absence/Disapplied",
|
||||||
|
description:
|
||||||
|
"The percentage of pupils who were absent from or disapplied from the Science teacher assessment.",
|
||||||
|
note: "Disapplied means formally removed from assessment, usually due to significant special needs.",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// Warning definitions for alerts/notices
|
// Warning definitions for alerts/notices
|
||||||
@@ -1744,6 +1774,31 @@ async function openSchoolModal(urn) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="modal-stats-section">
|
||||||
|
<h4>Test Absence (${latest.year})</h4>
|
||||||
|
<div class="modal-stats-grid">
|
||||||
|
<div class="modal-stat">
|
||||||
|
<div class="modal-stat-value">${formatMetricValue(latest.reading_absence_pct, "reading_absence_pct")}</div>
|
||||||
|
<div class="modal-stat-label">Reading${createInfoTrigger("reading_absence")}</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-stat">
|
||||||
|
<div class="modal-stat-value">${formatMetricValue(latest.maths_absence_pct, "maths_absence_pct")}</div>
|
||||||
|
<div class="modal-stat-label">Maths${createInfoTrigger("maths_absence")}</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-stat">
|
||||||
|
<div class="modal-stat-value">${formatMetricValue(latest.gps_absence_pct, "gps_absence_pct")}</div>
|
||||||
|
<div class="modal-stat-label">GPS${createInfoTrigger("gps_absence")}</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-stat">
|
||||||
|
<div class="modal-stat-value">${formatMetricValue(latest.writing_absence_pct, "writing_absence_pct")}</div>
|
||||||
|
<div class="modal-stat-label">Writing${createInfoTrigger("writing_absence")}</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-stat">
|
||||||
|
<div class="modal-stat-value">${formatMetricValue(latest.science_absence_pct, "science_absence_pct")}</div>
|
||||||
|
<div class="modal-stat-label">Science${createInfoTrigger("science_absence")}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
function getProgressClass(value) {
|
function getProgressClass(value) {
|
||||||
|
|||||||
Reference in New Issue
Block a user