Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilwoodruff committed Sep 17, 2024
1 parent 431922c commit 3fc0938
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions policyengine_uk_data/utils/imputations/capital_gains.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def impute_capital_gains(dataset, time_period: int):

from policyengine_uk import Microsimulation
from policyengine_uk.system import system

sim = Microsimulation(dataset=dataset)
ti = sim.calculate("total_income", time_period)
household_weight = sim.calculate("household_weight", time_period).values
Expand Down
2 changes: 2 additions & 0 deletions policyengine_uk_data/utils/loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def create_target_matrix(
# First- tax-benefit outcomes from the DWP and OBR.

from policyengine_uk import Microsimulation

sim = Microsimulation(dataset=dataset, reform=reform)
sim.default_calculation_period = time_period

Expand Down Expand Up @@ -248,6 +249,7 @@ def pe_count(*variables):
def get_loss_results(dataset, time_period, reform=None):
matrix, targets = create_target_matrix(dataset, time_period, reform)
from policyengine_uk import Microsimulation

weights = (
Microsimulation(dataset=dataset, reform=reform)
.calculate("household_weight", time_period)
Expand Down

0 comments on commit 3fc0938

Please sign in to comment.