redist_map | R Documentation |
redist_map
object.Sets up a redistricting problem.
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)
... |
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 |
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:
merge_by
get_adj
plot.redist_map
A redist_map object
data(fl25)
d <- redist_map(fl25, ndists = 3, pop_tol = 0.05, total_pop = pop)
dplyr::filter(d, pop >= 10e3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.