Skip to content

Commit

Permalink
update structure
Browse files Browse the repository at this point in the history
  • Loading branch information
hussain-jafari committed Feb 20, 2024
1 parent 940580d commit 3089abd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/vivarium_inputs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,8 @@ def get_utilization_rate(entity: HealthcareEntity, location_id: int) -> pd.DataF
return data


def get_structure(entity: Population, location_id: int) -> pd.DataFrame:
data = extract.extract_data(entity, "structure", location_id)
def get_structure(entity: Population, location_id: int, get_all_years: bool = False) -> pd.DataFrame:
data = extract.extract_data(entity, "structure", location_id, validate=True, get_all_years=get_all_years)
data = data.drop("run_id", axis="columns").rename(columns={"population": "value"})
data = utilities.normalize(data)
return data
Expand Down
4 changes: 2 additions & 2 deletions src/vivarium_inputs/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ def extract_utilization_rate(entity: HealthcareEntity, location_id: int) -> pd.D
return data


def extract_structure(entity: Population, location_id: int) -> pd.DataFrame:
data = gbd.get_population(location_id)
def extract_structure(entity: Population, location_id: int, get_all_years: bool = False) -> pd.DataFrame:
data = gbd.get_population(location_id, get_all_years)
return data


Expand Down

0 comments on commit 3089abd

Please sign in to comment.