comp_log_st | R Documentation |
Calculate Log Spanning Tree Compactness
comp_log_st(plans, shp, counties = NULL, adj)
plans |
A |
shp |
A |
counties |
column name in shp containing counties |
adj |
Zero-indexed adjacency list. Not required if a |
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.
data(nh)
data(nh_m)
# For a single plan:
comp_log_st(plans = nh$r_2020, shp = nh, counties = county, adj = nh$adj)
# Or many plans:
comp_log_st(plans = nh_m[, 3:5], shp = nh, counties = county, adj = nh$adj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.