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

📊 women's rights: wb gender stats - fix Slovakia's value #3665

Merged
merged 5 commits into from
Dec 1, 2024
Merged
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: 3 additions & 2 deletions etl/steps/data/garden/wb/2024-06-10/gender_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ def run(dest_dir: str) -> None:
countries_file=paths.country_mapping_path,
)
# Pivot the dataframe so that each indicator is a separate column
tb = tb.pivot(index=["country", "year"], columns="wb_seriescode", values="value")
tb = tb.reset_index()
tb = tb.pivot(index=["country", "year"], columns="wb_seriescode", values="value").reset_index()

# Slovakia - should be the same as Czechoslovakia in the period 1970-1993 for the indicator SG.LAW.EQRM.WK as confirmed by the source (but not yet updated on their database)
tb.loc[(tb["country"] == "Slovakia") & (tb["year"].between(1970, 1993)), "SG.LAW.EQRM.WK"] = 1
# Add metadata by finding the descriptions and sources using indicator codes
tb = add_metadata(tb, metadata_tb)

Expand Down