feat(script): Add breakdown by region visualization
This commit is contained in:
parent
3f44b0d710
commit
836227d72e
1 changed files with 20 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue