Note
Go to the end to download the full example code or to run this example in your browser via Binder.
Interactive figures#
Every tree, flow and map has an interactive twin (plotly): zoomable sunbursts
and icicles, Sankey diagrams, hoverable NBVFS maps. to_html writes a
standalone page; engine="pyvis" reproduces the draggable physics view of
the original NbVFS implementation.
import spmviz as sv
from spmviz import interactive
db = sv.datasets.load_chess_openings(2000, random_state=0)
fig = interactive.sunburst_figure(db, max_depth=6)
fig
An NBVFS map with hover information#
ps = sv.mine(db, 0.03, max_gap=1)
interactive.nbvfs_figure(sv.NBVFS("cm").fit(ps))
A Sankey diagram#
interactive.sankey_figure(sv.datasets.make_customer_journeys(800, random_state=0), max_steps=5)
Total running time of the script: (0 minutes 0.851 seconds)