comp_edges_rem: Calculate Edges Removed Compactness

Description Usage Arguments Value References Examples

View source: R/compactness.R

Description

Calculate Edges Removed Compactness

Usage

1
comp_edges_rem(plans, shp, adj)

Arguments

plans

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

shp

redist_map object or tibble with sf geometry column

adj

zero-indexed adjacency list. Not required if redist_map supplied to shp.

Value

numeric vector

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

1
2
3
4
5
6
7
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 Dec. 20, 2021, 5:07 p.m.