powered by
Plots the weighted adjacency graph by how often precincts coocur. If an argument to counties is provided, it subsets the edges to plot to those that cross over the county boundary.
redist.plot.wted.adj( shp, plans, counties = NULL, ref = TRUE, adj = NULL, plot_shp = TRUE )
ggplot
A SpatialPolygonsDataFrame, sf object, or redist_map. Required.
A redist_plans object or matrix of redistricting plans, where each column indicates a plan and each
redist_plans
unquoted name of a column in shp or a vector of county assignments. Subsets to edges which cross this boundary if supplied.
shp
Plot reference map? Defaults to TRUE which gets the existing plan from
A zero-indexed adjacency list. Extracted from shp if shp is a redist_map. Otherwise created with redist.adjacency if not supplied. Default is NULL.
redist_map
Should the shapes be plotted? Default is TRUE.
data(iowa) shp <- redist_map(iowa, existing_plan = cd_2010, pop_tol = 0.01) plans <- redist_smc(shp, 100) redist.plot.wted.adj(shp, plans = plans, counties = region)
Run the code above in your browser using DataLab