Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1123 Update getPopulationData.test_total_population() to account for 2023 population data #1126

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pycode/memilio-epidata/memilio/epidata/getPopulationData.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,13 @@ def test_total_population(df_pop, age_cols):
total_sum_2020 = 83155031
total_sum_2021 = 83237124
total_sum_2022 = 84358845
total_sum_2023 = 84669326
total_sum = df_pop[age_cols].sum().sum()

if total_sum == total_sum_2022:
if total_sum == total_sum_2023:
pass
elif total_sum == total_sum_2022:
warnings.warn('Using data of 2022. Newer data is available.')
elif total_sum == total_sum_2021:
warnings.warn('Using data of 2021. Newer data is available.')
elif total_sum == total_sum_2020:
Expand Down