powered by
Calculate Variation of Information Distances
dist_info(plans, shp, total_pop, ncores = 1)
matrix of plan distances
A redist_plans object or plans_matrix where each row indicates a district assignment and each column is a plan.
redist_plans
A redist_map object, tibble, or data frame containing other columns.
redist_map
Unqouted name of column in shp with total population.
shp
Integer number of cores to use. Default is 1.
data(nh) data(nh_m) # For a single plan (distance is trivial, 0): dist_info(plans = nh$r_2020, shp = nh, total_pop = pop) # Or many plans: dist_info(plans = nh_m[, 3:5], shp = nh, total_pop = pop)
Run the code above in your browser using DataLab