diff --git a/pipeline/transform/models/marts/_marts_schema.yml b/pipeline/transform/models/marts/_marts_schema.yml index 9a8832b..fd061be 100644 --- a/pipeline/transform/models/marts/_marts_schema.yml +++ b/pipeline/transform/models/marts/_marts_schema.yml @@ -124,6 +124,11 @@ models: tests: [not_null] - name: year tests: [not_null] + - name: second_preference_offers + - name: third_preference_offers + - name: cross_la_applications + - name: cross_la_offers + - name: total_offers - name: fact_finance description: School financial data — one row per URN per year diff --git a/pipeline/transform/models/marts/fact_admissions.sql b/pipeline/transform/models/marts/fact_admissions.sql index fda217e..5956b81 100644 --- a/pipeline/transform/models/marts/fact_admissions.sql +++ b/pipeline/transform/models/marts/fact_admissions.sql @@ -5,9 +5,14 @@ select year, school_phase, places_offered, + total_offers, total_applications, first_preference_applications, first_preference_offers, + second_preference_offers, + third_preference_offers, + cross_la_applications, + cross_la_offers, first_preference_offer_pct, oversubscription_ratio, oversubscribed, diff --git a/pipeline/transform/models/staging/stg_ees_admissions.sql b/pipeline/transform/models/staging/stg_ees_admissions.sql index d1d98fc..4b6495d 100644 --- a/pipeline/transform/models/staging/stg_ees_admissions.sql +++ b/pipeline/transform/models/staging/stg_ees_admissions.sql @@ -32,6 +32,11 @@ renamed as ( {{ safe_numeric('times_put_as_any_preferred_school') }}::integer as total_applications, {{ safe_numeric('times_put_as_1st_preference') }}::integer as first_preference_applications, + -- Cross-borough demand: applications naming this school from families + -- living in another local authority, and offers made to them. + {{ safe_numeric('"all_applications_from_another_LA"') }}::integer as cross_la_applications, + {{ safe_numeric('"offers_to_applicants_from_another_LA"') }}::integer as cross_la_offers, + -- Proportions -- first_preference_offer_pct: of families who listed this school FIRST, -- the percentage that received an offer. 0–100 scale.