feat(dbt): fact_ks4_la_averages from DfE's LA rows (H2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dbb60acff3
commit
59dd20ab00
7 files changed
+81
-2
No files matched your search
@@ -279,11 +279,24 @@ models:
|
||||
tests: [not_null, unique]
|
||||
|
||||
- name: fact_ks4_national_averages
|
||||
description: Computed national KS4 averages (means across state schools in our dataset — not official DfE figures) — one row per academic year
|
||||
description: Official DfE KS4 national headline averages (England, all state-funded schools, all pupils) — one row per academic year
|
||||
columns:
|
||||
- name: year
|
||||
tests: [not_null, unique]
|
||||
|
||||
- name: fact_ks4_la_averages
|
||||
description: Official DfE KS4 local-authority averages (all state-funded schools, all pupils) — one row per academic year and LA; la_code is the GIAS LA code
|
||||
columns:
|
||||
- name: year
|
||||
tests: [not_null]
|
||||
- name: la_code
|
||||
tests: [not_null]
|
||||
- name: la_name
|
||||
tests: [not_null]
|
||||
tests:
|
||||
- unique:
|
||||
column_name: "year || '-' || la_code"
|
||||
|
||||
- name: fact_deprivation
|
||||
description: IDACI deprivation index — one row per URN
|
||||
columns:
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{{ config(materialized='table') }}
|
||||
|
||||
-- Mart: OFFICIAL DfE KS4 local-authority averages — one row per academic year
|
||||
-- and LA (all state-funded schools, all pupils), from the same EES data set
|
||||
-- as fact_ks4_national_averages. Feeds "vs LA avg" on search rows and map
|
||||
-- cards, replacing a mean the API took over every school in the LA,
|
||||
-- independent and special included (audit H2). la_code is the GIAS LA code.
|
||||
|
||||
select
|
||||
year,
|
||||
la_code,
|
||||
la_name,
|
||||
attainment_8_score,
|
||||
progress_8_score,
|
||||
english_maths_standard_pass_pct,
|
||||
english_maths_strong_pass_pct,
|
||||
ebacc_entry_pct,
|
||||
ebacc_standard_pass_pct,
|
||||
ebacc_strong_pass_pct,
|
||||
ebacc_avg_score
|
||||
from {{ ref('stg_ees_ks4_la') }}
|
||||
order by year, la_code
|
||||
Reference in new issue
Block a user