File tree Expand file tree Collapse file tree
policyengine_uk_data/datasets/frs Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ - bump : minor
2+ changes :
3+ added :
4+ - Structural insurance payments
5+ - External child payments
6+ - Healthy Start payments
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ def generate(self):
4646 "maint" ,
4747 "mortgage" ,
4848 "penprov" ,
49+ "extchild" ,
4950 )
5051 (
5152 adult ,
@@ -61,6 +62,7 @@ def generate(self):
6162 maintenance ,
6263 mortgage ,
6364 pen_prov ,
65+ extchild ,
6466 ) = [dwp_frs_files [table ] for table in TABLES ]
6567 dwp_frs_files .close ()
6668
@@ -82,6 +84,7 @@ def generate(self):
8284 mortgage ,
8385 childcare ,
8486 pen_prov ,
87+ extchild ,
8588 )
8689 for variable in frs :
8790 frs [variable ] = {self .dwp_frs .time_period : np .array (frs [variable ])}
@@ -752,6 +755,8 @@ def add_benefit_income(
752755 0 ,
753756 )
754757
758+ frs ["healthy_start_vouchers" ] = person .HEARTVAL * 52
759+
755760 WEEKS_IN_YEAR = 52
756761
757762 frs ["free_school_breakfasts" ] = person .FSBVAL * WEEKS_IN_YEAR
@@ -768,6 +773,7 @@ def add_expenses(
768773 mortgage : DataFrame ,
769774 childcare : DataFrame ,
770775 pen_prov : DataFrame ,
776+ extchild : DataFrame ,
771777):
772778 """Adds expense variables
773779
@@ -848,6 +854,7 @@ def add_expenses(
848854 ).sum ()
849855 * 52
850856 )
857+ frs ["structural_insurance_payments" ] = household .STRUINS * 52
851858 frs ["water_and_sewerage_charges" ] = (
852859 pd .Series (
853860 np .where (
@@ -859,6 +866,12 @@ def add_expenses(
859866 * 52
860867 )
861868
869+ frs ["external_child_payments" ] = sum_to_entity (
870+ extchild .NHHAMT * 52 ,
871+ extchild .household_id ,
872+ household .index ,
873+ )
874+
862875
863876def add_benunit_variables (frs : h5py .File , benunit : DataFrame ):
864877 frs ["benunit_rent" ] = np .maximum (benunit .BURENT .fillna (0 ) * 52 , 0 )
You can’t perform that action at this time.
0 commit comments