Learn R Programming

redist (version 3.0.7)

redist.map: Creates a map with optional graph overlay

Description

Creates a map with optional graph overlay

Usage

redist.map(
  shp = NULL,
  adj = NULL,
  plan = NULL,
  centroids = TRUE,
  edges = TRUE,
  boundaries = TRUE,
  drop = FALSE,
  title = "",
  adjacency,
  district_membership
)

Arguments

shp

A SpatialPolygonsDataFrame or sf object. Required.

adj

A zero-indexed adjacency list. Created with redist.adjacency if not supplied. Default is NULL.

plan

A numeric vector with one entry for each precinct in shp. Used to color the districts. Default is NULL. Optional.

centroids

A logical indicating if centroids should be plotted. Default is TRUE.

edges

A logical indicating if edges should connect adjacent centroids. Default is TRUE.

boundaries

A logical indicating if precinct boundaries should be plotted.

drop

A logical indicating if edges that cross districts should be dropped. Default is FALSE.

title

A string title of plot. Defaults to empty string. Optional.

adjacency

Deprecated, use adj. A zero-indexed adjacency list. Created with redist.adjacency if not supplied. Default is NULL.

district_membership

Deprecated, use plan. A numeric vector with one row for each precinct in shp. Used to color the districts. Default is NULL. Optional.

Value

ggplot map