
Interactive strategic map of trajectory dynamic states (plotly)
Source:R/plot_trajectory_dynamics_interactive.R
plot_trajectory_dynamics_interactive.RdThe plotly twin of plot_trajectory_dynamics(). The same quadrant map – shaded
and named state regions, classification thresholds as reference lines, points
sized by community and coloured by state – rendered as an HTML widget. Hovering
a point reveals the full indicator panel (growth, novelty, recruitment, inflow,
destination entropy, dormant share, and any CCT / hub-role columns), and the
state legend is clickable to isolate one state at a time.
Usage
plot_trajectory_dynamics_interactive(
dyn,
target = c("finals", "intermediary"),
thresholds = NULL,
labels_text = NULL,
label_id = FALSE,
marker_range = c(6, 42),
show_labels = FALSE,
label_size = 11,
palette = NULL,
show_thresholds = TRUE,
show_quadrants = TRUE,
xlim = NULL,
ylim = NULL,
title = NULL
)Arguments
- dyn
A
sniff_trajectory_dynamics()tibble.- target
"finals"(default) maps the living (central) trajectories (novelty x growth),"intermediary"the declining (absorbed) ones (destination entropy x dormant share), as inplot_trajectory_dynamics().- thresholds
The
fixed_state_thresholds()-shaped list bounding the regions and the reference lines.NULL(default) reuses the cuts attached todynbysniff_trajectory_dynamics()(attr(dyn, "state_thresholds")), else derives them viadata_state_thresholds(). Pass an explicit list to override.- labels_text
Optional
data.frame(id,text) mapping ids to descriptions, used in the hover (and labels). The"finals"view matches by group id (cNgN); the"intermediaries"view matches by trajectory id (trN).- label_id
Put the id on the label's own first line, above the description (
cNgNthen the text for finals,trNthen the text for intermediaries), so the hover and pinned labels stay identifiable; the line break is plotly's<br>. DefaultFALSE.- marker_range
Marker diameter range in px
c(min, max)(defaultc(6, 42)); area scales with the square root ofsize.- show_labels
Pin a text label to each point (default
FALSE; the detail lives in the hover). Text may overlap when points are dense.- label_size
Font size (px) of the pinned labels (default
11).- palette
Optional named colour vector overriding the default semantic hues, keyed by state.
- show_thresholds
Draw the classification cut lines (default
TRUE).- show_quadrants
Shade and name the state regions (default
TRUE).- xlim, ylim
Optional
c(lo, hi)axis ranges;NULL(default) expands to keep every state region visible (the data, the threshold cuts, and the[0,1]share bounds, with padding).- title
Plot title;
NULL(default) derives one fromtarget.
See also
plot_trajectory_dynamics(), sniff_trajectory_dynamics(),
fixed_state_thresholds()
Other visualization:
plot_groups_influence_matrix(),
plot_groups_influence_network(),
plot_groups_lineage_2d(),
plot_groups_lineage_3d(),
plot_groups_map(),
plot_groups_map_animation(),
plot_groups_map_interactive(),
plot_groups_per_year(),
plot_trajectory_confluence(),
plot_trajectory_confluence_interactive(),
plot_trajectory_confluence_matrix(),
plot_trajectory_dag(),
plot_trajectory_dag_interactive(),
plot_trajectory_dispersion(),
plot_trajectory_dynamics(),
plot_trajectory_formation(),
plot_trajectory_lines_2d(),
plot_trajectory_lines_3d()
Examples
if (FALSE) { # \dontrun{
flow <- sniff_trajectory_braid(docs_per_group)
dyn <- sniff_trajectory_dynamics(flow)
plot_trajectory_dynamics_interactive(dyn, target = "finals", labels_text = descr)
} # }