Plots an interactive Leaflet map of a redist_map object, optionally colored by a quantity of interest. May also be accessed by setting interactive=TRUE in plot.redist_map.

redist.plot.interactive(
  map,
  fill = NULL,
  scale = ggplot2::scale_fill_viridis_c,
  limits = NULL,
  useGL = FALSE
)

Arguments

map

the redist_map object

fill

<data-masking> If present, will be used to color the map units.

scale

the color scale to use, for numeric fill.

limits

the color scale limits. Defaults to the range of the data.

useGL

if TRUE and leafgl is installed, use WebGL for faster plotting.

Value

a Leaflet object

Details

If leafgl is installed, will use its faster rendering functions to plot the map, which may be useful for larger maps.