plot.redist_map: Plot a 'redist_map'

View source: R/redist_map.R

plot.redist_mapR Documentation

Plot a redist_map

Description

Plot a redist_map

Usage

## S3 method for class 'redist_map'
plot(x, fill = NULL, by_distr = FALSE, adj = FALSE, ...)

Arguments

x

the redist_map object

fill

<data-masking> If present, will be used to color the map units. If using data masking, may need to explicitly name argument fill=... in non-interactive contexts to avoid S3 generic issues.

by_distr

if TRUE and fill is not missing and, color by district and indicate the fill variable by shading.

adj

if TRUE, force plotting the adjacency graph. Overrides by_distr.

...

passed on to redist.plot.map (or redist.plot.adj if adj=TRUE). Useful parameters may include zoom_to, boundaries, and title.

Value

ggplot2 object

Examples

data(fl25)
d <- redist_map(fl25, ndists = 3, pop_tol = 0.05)
plot(d)
plot(d, BlackPop/pop)

data(fl25_enum)
fl25$dist <- fl25_enum$plans[, 5118]
d <- redist_map(fl25, existing_plan = dist)
plot(d)


kosukeimai/redist documentation built on March 28, 2024, 7:36 a.m.