Calculate Log Spanning Tree Compactness
comp_log_st(plans, shp, counties = NULL, adj)
A redist_plans
object or plans_matrix where each row indicates a district assignment and each column is a plan.
A redist_map
object, tibble, or data frame with an sf
geometry column.
column name in shp containing counties
Zero-indexed adjacency list. Not required if a redist_map
is supplied for shp
.
A numeric vector. Can be shaped into a district-by-plan matrix.
Cory McCartan and Kosuke Imai. 2020. Sequential Monte Carlo for Sampling Balanced and Compact Redistricting Plans.