feat(ofsted): fall back to ungraded inspection outcome for school grade
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 18s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 48s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 1m30s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 1s
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 18s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 48s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 1m30s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 1s
Ungraded (Section 8) inspections don't assign a fresh grade — the export only gives free text like "School remains Good". Parse that text into a grade (remains Outstanding -> 1, remains Good -> 2, else null) and use it as a last-resort fallback when no graded overall effectiveness exists. Also retain schools that have only an ungraded inspection (no graded date) by coalescing the inspection date, so ~8.5k previously-dropped schools now carry a grade. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -59,6 +59,15 @@ COLUMN_PRIORITY = {
|
||||
"Latest OEIF sixth form provision",
|
||||
"Sixth form provision (where applicable)",
|
||||
],
|
||||
# Ungraded (Section 8) inspection — no fresh grade is assigned; the outcome
|
||||
# is free text like "School remains Good". Used as a last-resort fallback
|
||||
# for the school's grade when no graded overall effectiveness is available.
|
||||
"ungraded_outcome": [
|
||||
"Ungraded inspection overall outcome",
|
||||
],
|
||||
"ungraded_inspection_date": [
|
||||
"Date of latest ungraded inspection",
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
@@ -100,6 +109,8 @@ class OfstedInspectionsStream(Stream):
|
||||
th.Property("effectiveness_of_leadership_and_management", th.StringType),
|
||||
th.Property("early_years_provision", th.StringType),
|
||||
th.Property("sixth_form_provision", th.StringType),
|
||||
th.Property("ungraded_outcome", th.StringType),
|
||||
th.Property("ungraded_inspection_date", th.StringType),
|
||||
th.Property("report_url", th.StringType),
|
||||
).to_dict()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user