redist_constr {redist}R Documentation

Set up constraints for sampling

Description

redist_constr objects are used to specify constraints when sampling redistricting plans with redist_smc() and redist_mergesplit(). Each constraint is specified as a function which scores a given plan. Higher scores are penalized and sampled less frequently.

Usage

redist_constr(map = tibble())

Arguments

map

a redist_map() object; the map that will be used in sampling

Details

The redist_constr object keeps track of sampling constraints in a nested list. You can view the exact structure of this list by calling str(). Constraints may be added by using one of the following functions:

More information about each constraint can be found on the relevant constraint page.

Value

a redist_constr object, which is just a list with a certain nested structure.

Examples

data(iowa)
map_ia <- redist_map(iowa, existing_plan = cd_2010, pop_tol = 0.01)
constr <- redist_constr(map_ia)
constr <- add_constr_splits(constr, strength = 1.5, admin = region)
print(constr)


[Package redist version 4.2.0 Index]