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

✨ Adding DRC annotation #3159

Merged
merged 7 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
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
14 changes: 13 additions & 1 deletion etl/steps/data/garden/who/latest/monkeypox/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def run(dest_dir: str) -> None:
# Read table from meadow dataset.
tb = ds_meadow["monkeypox"].reset_index()
tb_suspected = ds_suspected["africa_cdc"].reset_index()

origins = tb["total_conf_cases"].metadata.origins
#
# Process data.
#
Expand All @@ -54,6 +54,18 @@ def run(dest_dir: str) -> None:
)

tb_both = pr.merge(tb, tb_suspected, on=["country", "date"], how="outer")

# For variables on deaths we should show that data reported by the WHO show _only_ confirmed cases, in an annotation
country_mask = tb_both["country"] == "Democratic Republic of Congo"
tb_both["annotation"] = ""
for col in tb_both.columns:
if "deaths" in col:
# Update the annotation column for matching rows
tb_both.loc[country_mask, "annotation"] = (
tb_both.loc[country_mask, "annotation"]
+ "Democratic Republic of Congo: Includes only confirmed deaths as reported by WHO"
)
tb_both["annotation"].metadata.origins = origins
tb_both = tb_both.format(["country", "date"])

#
Expand Down
10 changes: 10 additions & 0 deletions etl/steps/data/garden/who/latest/monkeypox/monkeypox.meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ definitions:
topic_tags:
- Mpox (monkeypox)


dataset:
update_period_days: 365

Expand All @@ -21,6 +22,7 @@ tables:
unit: deaths
display:
numDecimalPlaces: 0
entityAnnotationsMap: "Democratic Republic of Congo: Includes only confirmed deaths as reported by WHO"
new_cases:
title: New confirmed cases
unit: cases
Expand All @@ -31,6 +33,7 @@ tables:
unit: deaths
display:
numDecimalPlaces: 0
entityAnnotationsMap: "Democratic Republic of Congo: Includes only confirmed deaths as reported by WHO"
new_cases_smoothed:
title: New confirmed cases (7-day smoothed)
unit: cases
Expand All @@ -41,6 +44,7 @@ tables:
unit: deaths
display:
numDecimalPlaces: 2
entityAnnotationsMap: "Democratic Republic of Congo: Includes only confirmed deaths as reported by WHO"
new_cases_per_million:
title: New confirmed cases per million
unit: cases per million
Expand All @@ -61,16 +65,22 @@ tables:
unit: deaths per million
display:
numDecimalPlaces: 3
entityAnnotationsMap: "Democratic Republic of Congo: Includes only confirmed deaths as reported by WHO"
total_deaths_per_million:
title: Total confirmed deaths per million
unit: deaths per million
display:
numDecimalPlaces: 3
entityAnnotationsMap: "Democratic Republic of Congo: Includes only confirmed deaths as reported by WHO"
new_deaths_smoothed_per_million:
title: New confirmed deaths per million (7-day smoothed)
unit: deaths per million
display:
numDecimalPlaces: 3
entityAnnotationsMap: "Democratic Republic of Congo: Includes only confirmed deaths as reported by WHO"
iso_code:
title: ISO code
unit: ''
annotation:
title: Annotation
unit: ''
1 change: 0 additions & 1 deletion etl/steps/data/grapher/who/latest/monkeypox.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def run(dest_dir: str) -> None:
# Read table from garden dataset.
tb = ds_garden["monkeypox"]

#
# Save outputs.
#
# Create a new grapher dataset with the same metadata as the garden dataset.
Expand Down
Loading