feat(script): Add breakdown by region visualization

This commit is contained in:
Marty Oehme 2023-12-21 16:49:55 +01:00
parent 3f44b0d710
commit 836227d72e
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -638,6 +638,26 @@ many studies use income measurements and changes in income or income inequality
{{++ TODO: describe inequality type distribution for overall dataset ++}}
```{python}
#| label: fig-region-counts
#| fig-cap: Studies by regions analysed
bib_df = (bib_df
.assign(
# create de-duplicated joins for all observations
region=lambda _df: _df["region"].apply(
lambda _cell: set([x.strip() for x in _cell.split(";")])
),
)
.explode("region")
)
# bib_df["region"] = bib_df["region"].str.split(";").explode().str.strip()
ax = sns.countplot(bib_df, x="region", order=bib_df["region"].value_counts().index)
plt.setp(ax.get_xticklabels(), rotation=45, ha="right",
rotation_mode="anchor")
plt.show()
```
# Synthesis of Evidence --- a multitude of lenses
This section will present a synthesis of evidence from the scoping review.