Pick One Plan from Many Plans
pick_a_plan(
plans,
map,
counties = NULL,
comp = NULL,
maximize_comp = TRUE,
cut_point = 0.3
)
a redist_plans object
a redist_map object
A column in map with county names. Defaults to NULL and will assume each row in map is its own county if left NULL
A column in plans with compactness. Defaults to NULL and will calculate FracKept if left NULL
Should comp be maximized? Defaults to TRUE.
portion of plans to keep at each step
An integer vector with a single plan
data(iowa)
map <- redist_map(iowa, existing_plan = cd_2010, pop_tol = 0.01, total_pop = pop)
sims <- redist_smc(map, 100)
#> SEQUENTIAL MONTE CARLO
#> Sampling 100 99-unit maps with 4 districts and population between 753,973 and 769,205.
#> Split [0/3] ■ | ETA?
#> Split [3/3] ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ | ETA 0s
#>
pick_a_plan(sims, map)
#> [1] 3 3 1 2 4 1 1 4 1 1 4 1 4 4 4 2 4 4 1 3 4 1 2 4 3 2 3 1 2 4 1 4 1 1 4 4 4 1
#> [39] 4 3 4 4 4 2 1 4 4 2 1 2 2 2 1 2 4 2 1 2 3 4 3 2 2 1 4 4 4 2 3 2 4 4 3 4 4 4
#> [77] 3 4 2 3 4 2 4 4 3 1 3 3 2 2 3 2 3 4 4 1 4 4 4