library(dplyr)
data(iowa)
iowa <- redist_map(iowa, existing_plan = cd_2010, pop_tol = 0.05)
plans <- redist_smc(iowa, nsims = 100, silent = TRUE)
group_by(plans, draw) %>%
summarize(pop_dev = max(abs(total_pop/mean(total_pop) - 1))) %>%
redist.plot.hist(pop_dev)
Run the code above in your browser using DataLab