pick_a_plan: Pick One Plan from Many Plans

View source: R/pick_a_plan.R

pick_a_planR Documentation

Pick One Plan from Many Plans

Description

Pick One Plan from Many Plans

Usage

pick_a_plan(
  plans,
  map,
  counties = NULL,
  comp = NULL,
  maximize_comp = TRUE,
  cut_point = 0.3
)

Arguments

plans

a redist_plans object

map

a redist_map object

counties

A column in map with county names. Defaults to NULL and will assume each row in map is its own county if left NULL

comp

A column in plans with compactness. Defaults to NULL and will calculate FracKept if left NULL

maximize_comp

Should comp be maximized? Defaults to TRUE.

cut_point

portion of plans to keep at each step

Value

An integer vector with a single plan

Examples

data(iowa)
map <- redist_map(iowa, existing_plan = cd_2010, pop_tol = 0.01, total_pop = pop)
sims <- redist_smc(map, 100)
pick_a_plan(sims, map)


redist documentation built on April 3, 2023, 5:46 p.m.