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
8 changes: 7 additions & 1 deletion policyengine_uk_data/datasets/create_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def main():
"Impute capital gains",
"Impute salary sacrifice",
"Impute student loan plan",
"Impute student loan balance",
"Uprate to 2025",
"Calibrate dataset",
"Downrate to 2023",
Expand Down Expand Up @@ -58,6 +59,7 @@ def main():
impute_services,
impute_salary_sacrifice,
impute_student_loan_plan,
impute_student_loan_balance,
)

# Apply imputations with progress tracking
Expand Down Expand Up @@ -93,6 +95,10 @@ def main():
frs = impute_student_loan_plan(frs, year=2023)
update_dataset("Impute student loan plan", "completed")

update_dataset("Impute student loan balance", "processing")
frs = impute_student_loan_balance(frs, year=2023)
update_dataset("Impute student loan balance", "completed")

# Uprate dataset
update_dataset("Uprate to 2025", "processing")
frs = uprate_dataset(frs, 2025)
Expand Down Expand Up @@ -149,7 +155,7 @@ def main():
details={
"base_dataset": "frs_2023_24.h5",
"enhanced_dataset": "enhanced_frs_2023_24.h5",
"imputations_applied": "consumption, wealth, VAT, services, income, capital_gains, salary_sacrifice, student_loan_plan",
"imputations_applied": "consumption, wealth, VAT, services, income, capital_gains, salary_sacrifice, student_loan_plan, student_loan_balance",
"calibration": "national and constituency targets",
},
)
Expand Down
5 changes: 4 additions & 1 deletion policyengine_uk_data/datasets/imputations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@
from .capital_gains import *
from .services import impute_services
from .salary_sacrifice import impute_salary_sacrifice
from .student_loans import impute_student_loan_plan
from .student_loans import (
impute_student_loan_plan,
impute_student_loan_balance,
)
Loading