fix(script): Calculate country groups for sample

This commit is contained in:
Marty Oehme 2023-12-09 18:56:42 +01:00
parent 3b6ed7a79b
commit 56e18b1285
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -491,11 +491,10 @@ bib_df["year"] = bib_df["date"].dt.year
bib_df = bib_df[bib_df["year"] >= 2000] bib_df = bib_df[bib_df["year"] >= 2000]
# Add WB country grouping definitions (income group, world region) # Add WB country grouping definitions (income group, world region)
# TODO Re-enable for processed study pool WB_COUNTRY_GROUPS_FILE = Path(f"{SUPPLEMENTARY_DATA}/wb-country-groupings.xlsx").resolve()
# WB_COUNTRY_GROUPS_FILE = Path(f"{SUPPLEMENTARY_DATA}/wb-country-groupings.xlsx").resolve() df_country_groups = pd.read_excel(WB_COUNTRY_GROUPS_FILE)
# df_country_groups = pd.read_excel(WB_COUNTRY_GROUPS_FILE) bib_df["income group"] = bib_df["country"].map(df_country_groups.set_index("Economy")["Income group"])
# bib_df["income group"] = bib_df["country"].map(df_country_groups.set_index("Economy")["Income group"]) bib_df["region"] = bib_df["country"].map(df_country_groups.set_index("Economy")["Region"])
# bib_df["region"] = bib_df["country"].map(df_country_groups.set_index("Economy")["Region"])
``` ```
```{python} ```{python}