Calculate Variation of Information Distances
dist_info(plans, shp, total_pop, ncores = 1)
A redist_plans
object or plans_matrix where each row indicates a district assignment and each column is a plan.
A redist_map
object, tibble, or data frame containing other columns.
Unqouted name of column in shp
with total population.
Integer number of cores to use. Default is 1.
matrix of plan distances
data(nh)
data(nh_m)
# For a single plan (distance is trivial, 0):
dist_info(plans = nh$r_2020, shp = nh, total_pop = pop)
#> [,1]
#> [1,] 0
# Or many plans:
dist_info(plans = nh_m[, 3:5], shp = nh, total_pop = pop)
#> [,1] [,2] [,3]
#> [1,] 0.0000000 1.211885 0.9347048
#> [2,] 1.2118850 0.000000 1.2261166
#> [3,] 0.9347048 1.226117 0.0000000