Plots a boxplot of a quantity of interest across districts, with districts optionally sorted by this quantity. Adds reference points for each reference plan, if applicable.

redist.plot.distr_qtys(
plans,
qty,
sort = "asc",
geom = "jitter",
color_thresh = NULL,
...
)

## Arguments

plans the redist_plans object.  the quantity of interest. set to "asc" to sort districts in ascending order of qty (the default), "desc" for descending order, or FALSE or "none" for no sorting. the geom to use in plotting the simulated districts: either "jitter" or "boxplot" if a number, the threshold to use in coloring the points. Plans with quantities of interest above the threshold will be colored differently than plans below the threshold. passed on to geom_boxplot

A ggplot

## Examples

library(dplyr)
data(iowa)

iowa = redist_map(iowa, existing_plan=cd_2010, pop_tol=0.05, total_pop = pop)
plans = redist_smc(iowa, nsims=100, silent=TRUE)
plans %>%
mutate(pct_dem = group_frac(iowa, dem_08, tot_08)) %>%
redist.plot.distr_qtys(pct_dem)