splits_sub_count | R Documentation |
Tallies the number of unique sub-administrative unit-districts. An unsplit administrative unit will return an entry of 1, while each additional sub-administrative unit-district adds 1.
splits_sub_count(plans, shp, sub_admin)
plans |
A |
shp |
A |
sub_admin |
Unqouted name of column in shp with numeric identifiers for subsidiary administrative units. |
numeric matrix
data(nh)
data(nh_m)
# For a single plan:
splits_sub_count(plans = nh$r_2020, shp = nh, sub_admin = county)
# Or many plans:
splits_sub_count(plans = nh_m[, 3:5], shp = nh, sub_admin = county)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.