Skip to content

Flow maps, slider control, and tooltip templating/theming#207

Merged
walkerke merged 4 commits into
mainfrom
flowmap-on-slider-window
Jun 17, 2026
Merged

Flow maps, slider control, and tooltip templating/theming#207
walkerke merged 4 commits into
mainfrom
flowmap-on-slider-window

Conversation

@walkerke

@walkerke walkerke commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Lands several connected features for the upcoming 0.5.0. Four commits:

add_slider_control() (#205)

Interactive slider that filters and/or animates layers by a numeric property. Composes with initial filter, later set_filter(), and interactive legends via ["all", ...]. Modes: "sequential", "cumulative", "window". Supports paint-property animation, an optional play button, and a density histogram (d3 loaded on demand).

  • presentation = "timeline" — a prominent, brushable histogram: drag the selected window across the bars, drag its edges to resize. window_behavior chooses a "resizable" two-edge range or a "fixed"-width band you pan. Modeled on Egor Kotov's FlowMapBlue time control.
  • slider_style() — presets and overrides for the container, play button, track, thumb, and histogram.
  • draggable = TRUE — reposition the panel anywhere on the map, mirroring add_legend().
  • Companions update_slider_control() (Shiny proxies) and as_time_property().

add_flowmap()

Animated origin-destination flow maps powered by flowmap.gl (deck.gl): temporal flows, location clustering, customizable color schemes (flowmap_color_schemes()), CSS blend modes, themeable tooltips/popups. Reactive updates via set_flowmap_filter() / set_flowmap_settings(); a "window"-mode slider can drive a flowmap's temporal range. Heavy libraries load on demand. Bundled bixi_locations / bixi_flows datasets included. Adapted from Egor Kotov's contribution.

Package-wide {brace} tooltip/popup templating

Any layer's tooltip/popup (and set_tooltip()/set_popup()) accepts glue-style templates like "{name}: {population}", alongside the existing column-name and concat()/number_format() forms. Substituted values are HTML-escaped.

tooltip_style() / popup_style()

Theme tooltips and popups without hand-written HTML/CSS, mirroring legend_style() — a preset ("light"/"dark") or custom appearance. Opt-in: tooltips are unstyled by default, so existing maps are unchanged.


Co-authored with Egor Kotov (@e-kotov) on the flowmap and time-control work (#205). devtools::check() clean (0 errors, 0 warnings).

@walkerke walkerke merged commit 7830d91 into main Jun 17, 2026
4 of 6 checks passed
@e-kotov

e-kotov commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

@Robinlovelace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants