Creates a map with optional graph overlay
redist.map(
shp = NULL,
adj = NULL,
plan = NULL,
centroids = TRUE,
edges = TRUE,
boundaries = TRUE,
drop = FALSE,
title = "",
adjacency,
district_membership
)
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 color the districts. Default is NULL
. Optional.
A logical indicating if centroids should be plotted. Default is TRUE
.
A logical indicating if edges should connect adjacent centroids. Default is TRUE
.
A logical indicating if precinct boundaries should be plotted.
A logical indicating if edges that cross districts should be dropped. Default is FALSE
.
A string title of plot. Defaults to empty string. Optional.
Deprecated, use adj. A zero-indexed adjacency list. Created with redist.adjacency if not supplied. Default is NULL.
Deprecated, use plan. A numeric vector with one row for each precinct in shp.
Used to color the districts. Default is NULL
. Optional.
ggplot map