Skip to contents

{ggplot2} plot helpers

Functions for consistent ggplot plots.

geom_flat_violin_l()
Flat (or half) vertical violin plot geom. Left side.
geom_flat_violin_r()
Flat (or half) vertical violin plot geom. Right side.
sahel_ggboxplot()
Individual Boxplot Plots per Country
sahel_ggcoefs()
Barplot for Sahel ASP coefficients with sensible defaults
sahel_gghalfviolin()
High-Level Wrapper Half Violin Plots per Country
sahel_ggridges()
Individual Ridgeline Plots per Country
sahel_ggviolin()
Individual Violin Plots per Country
themeaspdark()
Dark theme for ggplot2 graphs. Inspired by the excellent hrbrthemes package.
themeasplight()
Light theme for ggplot2 graphs

Miscellaneous data vizualisation functions

Preprocessing functions and palette list used to theme graphs.

sahel_prep_gg()
Sahel Prepare ggplot function
sahel_prep_gg_binary()
Prepare Sahel binary variables for plotting.
sahel_prep_ggcoefs()
Sahel Prepare data for sahel_ggcoefs()
asp_palettes
Complete list of palettes
asp_palette()
A palette generator for the Sahel Adaptive Social Protection RCT
get_shapefiles()
Download (Sub)National Shapefiles

Utility functions for model estimation with R

Utility functions for model estimation with multiple models.

collate_models()
Collate regression models into a standardised tibble
collate_predictions()
Collate predicted values of a list of models into a large data frame.

Example Datasets

Included datasets for examples and other shenanigans.

sahel_sim
sahel_sim dataset