Skip to contents

Draws lines between tract centroids and their assigned stations. In the static version, tracts are colored by effective number of sources and lines are scaled by weight. In the interactive version, clicking a station or tract reveals its connections.

Usage

plot_connections(
  result,
  top_k = NULL,
  threshold = 0.01,
  show_all_tracts = TRUE,
  palette = "YlOrRd",
  interactive = FALSE,
  ...
)

Arguments

result

An interpElections_result object.

top_k

Max connections per tract. NULL shows only the dominant connection (static) or all connections (interactive).

threshold

Min weight for a connection to be drawn.

show_all_tracts

Logical. Show all tract polygons as background.

palette

Color palette.

interactive

Logical.

...

Ignored.

Value

A ggplot object (invisibly) or an htmlwidget (interactive).