comp_edges_rem: Calculate Edges Removed Compactness

View source: R/compactness.R

comp_edges_remR Documentation

Calculate Edges Removed Compactness

Description

Calculate Edges Removed Compactness

Usage

comp_edges_rem(plans, shp, adj)

Arguments

plans

A redist_plans object or plans_matrix where each row indicates a district assignment and each column is a plan.

shp

A redist_map object, tibble, or data frame with an sf geometry column.

adj

Zero-indexed adjacency list. Not required if a redist_map is supplied for shp.

Value

A numeric vector. Can be shaped into a district-by-plan matrix.

References

Matthew P. Dube and Jesse Tyler Clark. 2016. Beyond the circle: Measuring district compactness using graph theory. In Annual Meeting of the Northeastern Political Science Association

Examples

data(nh)
data(nh_m)
# For a single plan:
comp_edges_rem(plans = nh$r_2020, shp = nh, nh$adj)

# Or many plans:
comp_edges_rem(plans = nh_m[, 3:5], shp = nh, nh$adj)


redistmetrics documentation built on May 29, 2024, 8:02 a.m.