redist.plot.map | R Documentation |
Create a ggplot map. It fills by plan or argument fill. If both are supplied, plan is used as the color and fill as the alpha parameter.
redist.plot.map(
shp,
adj,
plan = NULL,
fill = NULL,
fill_label = "",
zoom_to = NULL,
boundaries = is.null(fill),
title = ""
)
shp |
A SpatialPolygonsDataFrame, sf object, or redist_map. Required. |
adj |
A zero-indexed adjacency list. Created with redist.adjacency if not supplied and needed for coloring. Default is NULL. |
plan |
|
fill |
|
fill_label |
A string title of plot. Defaults to the empty string |
zoom_to |
|
boundaries |
A logical indicating if precinct boundaries should be plotted. |
title |
A string title of plot. Defaults to empty string. Optional. |
ggplot map
data(iowa)
redist.plot.map(shp = iowa, plan = iowa$cd_2010)
iowa_map <- redist_map(iowa, existing_plan = cd_2010)
redist.plot.map(iowa_map, fill = dem_08/tot_08, zoom_to = (cd_2010 == 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.