Interactive Adjacency Graph Editing
Usage
adj_editor(
shp,
adj = geomander::adjacency(shp),
init_plan,
palette = NULL,
layers = NULL,
hover_fn = hover_precinct,
opts = redistio_options()
)Arguments
- shp
an
sftibble that you want to draw with- adj
a zero-indexed adjacency graph
- init_plan
plan to initialize coloring
- palette
Color palette to fill shapes with. Default is
Polychrome 36or, if installed,crayons::crayons$no_48.- layers
Named list of
sfobjects to overlay. Also takes column names inshpto group by.- hover_fn
Function to generate tables for mouse hovering. Default is
hover_precinct().- opts
list of options. Default is
redistio_options()
Examples
if (interactive()) {
adj_editor(dc, init_plan = dc$ward)
adj_editor(dc, init_plan = dc$ward, layers = list(neighborhoods = 'adv_nbr'))
}
