.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/07_applications/plot_04_interactive.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code or to run this example in your browser via Binder. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_07_applications_plot_04_interactive.py: 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. .. GENERATED FROM PYTHON SOURCE LINES 10-17 .. code-block:: Python 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 .. raw:: html


.. GENERATED FROM PYTHON SOURCE LINES 18-20 An NBVFS map with hover information ----------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 20-23 .. code-block:: Python ps = sv.mine(db, 0.03, max_gap=1) interactive.nbvfs_figure(sv.NBVFS("cm").fit(ps)) .. raw:: html


.. GENERATED FROM PYTHON SOURCE LINES 24-26 A Sankey diagram ---------------- .. GENERATED FROM PYTHON SOURCE LINES 26-27 .. code-block:: Python interactive.sankey_figure(sv.datasets.make_customer_journeys(800, random_state=0), max_steps=5) .. raw:: html


.. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.703 seconds) .. _sphx_glr_download_auto_examples_07_applications_plot_04_interactive.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://mybinder.org/v2/gh/ComplexSystemsIntelligence/spmviz/main?urlpath=lab/tree/notebooks/auto_examples/07_applications/plot_04_interactive.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_04_interactive.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_04_interactive.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_04_interactive.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_