splits_district_fuzzy {redistmetrics}R Documentation

Fuzzy Splits by District (Experimental)

Description

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.

Usage

splits_district_fuzzy(plans, shp, nbr, thresh = 0.01, epsg)

Arguments

plans

A redist_plans object or plans_matrix where each row indicates a district assignment and each column is a plan.

shp

A redist_map object, tibble, or data frame with an sf geometry column.

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.

Details

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.

Value

numeric matrix

Examples

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)

[Package redistmetrics version 1.0.7 Index]