Code
```{python}
#| label: fig-income-sources-pct
#| fig-cap: Average percentage of cash income from each source at baseline
inflow_df = (pd.DataFrame({'Category': [inflow_name_map.get(c, c) for c in inflow_pct_cols],
'Mean': [baseline[c].mean() for c in inflow_pct_cols]})
.sort_values('Mean', ascending=True))
inflow_df['Category'] = pd.Categorical(inflow_df['Category'], categories=inflow_df['Category'], ordered=True)
(ggplot(inflow_df, aes(x='Category', y='Mean'))
+ geom_col(fill='steelblue')
+ geom_text(aes(label='Mean'), format_string='{:.1f}%', ha='left', nudge_y=0.5, size=8)
+ coord_flip()
+ labs(x='', y='Mean % of Total Cash Inflow', title='Income Sources at Baseline')
+ theme(figure_size=(7, 5), axis_text_y=element_text(angle=45, ha='right')))
```