Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- ONS income: ONS small area income estimates
- Tenure: English Housing Survey
- Private rent: VOA/ONS private rental market statistics
- Council tax bands A-H: VOA Council Tax Stock of Properties (per LA)
"""

from policyengine_uk import Microsimulation
Expand Down Expand Up @@ -252,6 +253,33 @@ def create_local_authority_target_matrix(
national_rent * la_household_share,
)

# ── Council tax band counts (LA targets) ───────────────────────
# Per-LA dwellings in each band A-H from VOA Council Tax Stock of
# Properties. Scotland LAs have no VOA band data and Northern Ireland
# has no council tax — both fall back to national-share estimation,
# matching the tenure block's pattern. Band I is Wales-only and
# rarely populated, so it is intentionally excluded.
ct_path = STORAGE_FOLDER / "la_council_tax.csv"
if ct_path.exists():
ct_data = pd.read_csv(ct_path)
ct_merged = la_codes.merge(
ct_data[["code"] + [f"count_band_{b}" for b in "ABCDEFGH"]],
on="code",
how="left",
)
ct_band = sim.calculate("council_tax_band").values
for band in "ABCDEFGH":
col = f"voa/council_tax/{band}"
matrix[col] = (ct_band == band).astype(float)
csv_col = f"count_band_{band}"
has_count = ct_merged[csv_col].notna().values
national = (original_weights * matrix[col].values).sum()
y[col] = np.where(
has_count,
ct_merged[csv_col].values,
national * la_household_share,
)

# ── Country mask ───────────────────────────────────────────────
country_mask = create_country_mask(
household_countries=sim.calculate("country").values,
Expand Down
Loading
Loading