Creates a Graph Overlay
redist.plot.adj(
shp,
adj = NULL,
plan = NULL,
centroids = TRUE,
drop = FALSE,
plot_shp = TRUE,
zoom_to = NULL,
title = ""
)
A SpatialPolygonsDataFrame or sf object. Required.
A zero-indexed adjacency list. Created with redist.adjacency if not supplied. Default is NULL.
A numeric vector with one entry for each precinct in shp.
Used to remove edges that cross boundaries. Default is NULL
. Optional.
A logical indicating if centroids should be plotted. Default is TRUE
.
A logical indicating if edges that cross districts should be dropped. Default is FALSE
.
A logical indicating if the shp should be plotted under the
graph. Default is TRUE
.
<data-masking>
An
indexing vector of units to zoom the map to.
A string title of plot. Defaults to empty string. Optional.
ggplot map
data(iowa)
redist.plot.adj(shp = iowa, plan = iowa$cd_2010)