| splits_district_fuzzy | R Documentation | 
Not all relevant geographies nest neatly into Census blocks, including communities of interest or neighborhood. For these cases, this provides a tabulation by district of the number of splits. As some geographies can be split multiple times, the sum of these splits may not reflect the total number of splits.
splits_district_fuzzy(plans, shp, nbr, thresh = 0.01, epsg)
plans | 
 A   | 
shp | 
 A   | 
nbr | 
 Geographic neighborhood, community, or other unit to check splits for.  | 
thresh | 
 Percent as decimal of an area to trim away. Default is .01, which is 1%.  | 
epsg | 
 Numeric EPSG code to use to project the shapefile, if needed. Default is 3857.  | 
Beware, this requires a nbr shape input and will be slower than checking splits in cases where
administrative unit nests cleanly into the geographies represented by shp.
numeric matrix
data(nh)
data(nh_m)
# toy example,
# suppose we care about the splits of the counties and they don't nest
nh_cty <- nh %>% dplyr::group_by(county) %>% dplyr::summarize()
# For a single plan:
splits_district_fuzzy(plans = nh$r_2020, shp = nh, nbr = nh_cty)
# Or many plans:
splits_district_fuzzy(plans = nh_m[, 3:5], shp = nh, nbr = nh_cty)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.