redist_map {redist} | R Documentation |
Create a redist_map
object.
Description
Sets up a redistricting problem.
Usage
redist_map(
...,
existing_plan = NULL,
pop_tol = NULL,
total_pop = c("pop", "population", "total_pop", "POP100"),
ndists = NULL,
pop_bounds = NULL,
adj = NULL,
adj_col = "adj",
planarize = 3857
)
as_redist_map(x)
Arguments
... |
column elements to be bound into a |
existing_plan |
|
pop_tol |
|
total_pop |
|
ndists |
|
pop_bounds |
|
adj |
the adjacency graph for the object. Defaults to being computed from the data if it is coercible to a shapefile. |
adj_col |
the name of the adjacency graph column |
planarize |
a number, indicating the CRS to project the shapefile to if it is latitude-longitude based. Set to NULL or FALSE to avoid planarizing. |
x |
an object to be coerced |
Details
A redist_map
object is a tibble
which contains an
adjacency list and additional information about the number of districts and
population bounds. It supports all of the dplyr
generics, and will
adjust the adjacency list and attributes according to these functions; i.e.,
if we filter
to a subset of units, the graph will change to subset to
these units, and the population bounds will adjust accordingly. If an
existing map is also attached to the object, the number of districts will
also adjust. Subsetting with `[`
and `[[`
does not recompute
graphs or attributes.
Other useful methods for redist_map
objects:
Value
A redist_map object
Examples
data(fl25)
d <- redist_map(fl25, ndists = 3, pop_tol = 0.05, total_pop = pop)
dplyr::filter(d, pop >= 10e3)