View source: R/plot_weighted_adj.R
redist.plot.wted.adj | R Documentation |
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
)
shp |
A SpatialPolygonsDataFrame, sf object, or redist_map. Required. |
plans |
A |
counties |
unquoted name of a column in |
ref |
Plot reference map? Defaults to TRUE which gets the existing plan from |
adj |
A zero-indexed adjacency list. Extracted from |
plot_shp |
Should the shapes be plotted? Default is TRUE. |
ggplot
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.