Skip to content

Commit

Permalink
add single year to data when extractinging dws
Browse files Browse the repository at this point in the history
  • Loading branch information
hussain-jafari committed Feb 20, 2024
1 parent 719d0c3 commit 43bc228
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/vivarium_inputs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,6 @@ def get_disability_weight(
validate=True,
get_all_years=get_all_years,
)
# add year id with single year so normalization doesn't fill in all years
if not get_all_years:
data["year_id"] = utility_data.get_most_recent_year()
data = utilities.normalize(data)

cause = [c for c in causes if c.sequelae and entity in c.sequelae][0]
Expand Down
2 changes: 2 additions & 0 deletions src/vivarium_inputs/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ def extract_disability_weight(
data = disability_weights.loc[
disability_weights.healthstate_id == entity.healthstate.gbd_id, :
]
if not get_all_years:
data["year_id"] = get_most_recent_year()
return data


Expand Down

0 comments on commit 43bc228

Please sign in to comment.