comp_frac_kept | R Documentation |
Calculate Fraction Kept Compactness
comp_frac_kept(plans, shp, adj)
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 |
numeric vector
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
data(nh) data(nh_m) # For a single plan: comp_frac_kept(plans = nh$r_2020, shp = nh, nh$adj) # Or many plans: comp_frac_kept(plans = nh_m[, 3:5], shp = nh, nh$adj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.