Skip to content

Commit

Permalink
minor metadata update
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasrodes committed Dec 2, 2024
1 parent 5e5b438 commit a9f2ddf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ tables:
numDecimalPlaces: 1
presentation:
attribution: |-
Alvarez & Vaupel (2023); Human Mortality Database (2023)
Alvarez & Vaupel (2023); Human Mortality Database (2024)
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ def run(dest_dir: str) -> None:
#
# Combine tables, drop NaNs
tb = tb_deaths.merge(tb_exposure, on=["country", "year", "sex", "age"], how="outer")
tb = tb.dropna(subset=["deaths", "exposure"], how="all")
tb = tb.dropna(subset=["deaths", "exposure"], how="any")

# Keep format="1x1", and sex="both"
paths.log.info("keep period & 1-year data.")
tb = tb.loc[tb["age"].str.match(r"^\d{3}\+?$") & (tb["type"] == "period")]
tb = tb.loc[tb["age"].str.match(r"^(\d{1,3}|d{3}\+)$") & (tb["type"] == "period")]

# Drop unused columns
tb = tb.drop(columns=["type"])
Expand Down

0 comments on commit a9f2ddf

Please sign in to comment.