powered by
Creates a Graph Overlay
redist.plot.adj( shp, adj = NULL, plan = NULL, centroids = TRUE, drop = FALSE, plot_shp = TRUE, zoom_to = NULL, title = "" )
ggplot map
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.
NULL
A logical indicating if centroids should be plotted. Default is TRUE.
TRUE
A logical indicating if edges that cross districts should be dropped. Default is FALSE.
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.
<data-masking>
A string title of plot. Defaults to empty string. Optional.
data(iowa) redist.plot.adj(shp = iowa, plan = iowa$cd_2010)
Run the code above in your browser using DataLab