fix(script): Calculate country groups for sample
This commit is contained in:
parent
3b6ed7a79b
commit
56e18b1285
1 changed files with 4 additions and 5 deletions
|
@ -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}
|
||||||
|
|
Loading…
Reference in a new issue