This function computes a minimal set of population moves (e.g., 5 people from district 1 to district 3) to maximally balance the population between districts. The moves are only allowed between districts that share the territory of a county, so that any boundary adjustments are guaranteed to preserve all unbroken county boundaries.
min_move_parity(map, plan, counties = NULL, penalty = 0.2)
a list with components:
moves
A tibble describing the population moves
pop_old
The current district populations
pop_new
The district populations after the moves
a redist_map
an integer vector containing the plan to be balanced. Tidy-evaluated.
an optional vector of counties, whose boundaries will be preserved. Tidy-evaluated.
the larger this value, the more to encourage sparsity.
data(iowa)
iowa_map <- redist_map(iowa, existing_plan = cd_2010, pop_tol = 0.01)
min_move_parity(iowa_map, cd_2010)
Run the code above in your browser using DataLab