Skip to main content

ipysankeywidget Binder Conda Version

Display Sankey diagrams in IPython / Jupyter notebook using d3-sankey-diagram.

Installation

pip install ipysankeywidget

or with uv:

uv add ipysankeywidget

or with conda:

conda install -c conda-forge ipysankeywidget

For a development install, see DEVELOPING.md.

Browser support

Tested in Firefox and Chrome. There have been reports that it's not working in Safari.

Documentation

See the d3-sankey-diagram API docs: the attributes of the SankeyWidget are the same as the properties of the sankey object described there.

To change the figure size, use the ipywidgets Layout object:

layout = Layout(width="1000", height="1200")
SankeyWidget(links=data, layout=layout)

Examples

See notebooks in examples folder for usage examples.

uv run jupyter lab examples/Simple\ example.ipynb

You can also try these online using Binder, or follow the links to static versions on nbviewer:

Changelog

Unreleased

Updated to use anywidget for simpler packaging.

v0.5.0 (16 December 2022)

  • Compatible with Jupyter Lab as well as Jupyter notebook.

v0.4.2 (29 April 2022)

  • Expose d3-sankey-diagram nodePositions() option to allow for custom node layout.

v0.4.1 (18 February 2021)

  • Experimental support for link "markers"
  • Experimental support for showing HTML info for links

v0.4.0 (19 November 2020)

  • Update to d3-sankey-diagram v0.8.0

v0.3.0

  • Now supports Jupyterlab

v0.2.5

  • You can now show link values as SVG text elements. Set linkLabelFormat to a d3-format string; links whose value is more than linkLabelMinWidth will have a label using that format.
  • Upgrade to d3-sankey-diagram version 0.7.3
  • ipysankeywidget can now be installed using conda (thanks to Ali Alsabbah #33)
  • Add a check for duplicate links (thanks to Remi Bois #23)

v0.2.4

  • Add events for clicking on nodes and links: on_node_clicked and on_link_clicked. These replace the on_selected event.

Contributors

  • Rick Lupton
  • Nicholas Bollweg
  • Ali Alsabbah
  • Remi Bois
  • Miguel Mendez

Release files for ipysankeywidget 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ipysankeywidget 0.6.0
File Size Uploaded
ipysankeywidget-0.6.0.tar.gz 208.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ipysankeywidget 0.6.0
File Interpreter ABI Platform
ipysankeywidget-0.6.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 419.4 kB

Release files / ipysankeywidget-0.6.0.tar.gz

Download URL ipysankeywidget-0.6.0.tar.gz
Size 208.9 kB
Tags Source
SHA-256 checksum
How to use checksums
214ea1487d0d99e2cdc6bf214c69c9b3f87e782ff6dd6c3f8fd02177d1c5e920
BLAKE2b-256 checksum
How to use checksums
01393c262ab98b00f89c0f54d7662b31e918a4fcdf99c10ca229f2194c8c8964
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.9

Release files / ipysankeywidget-0.6.0-py2.py3-none-any.whl

Download URL ipysankeywidget-0.6.0-py2.py3-none-any.whl
Size 210.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f6df8ea8a07164627760a06c90dfb54fc3d26c9574e975f5ab7da7ab3d9a2604
BLAKE2b-256 checksum
How to use checksums
ac57908a8be2b042924bada4baab70a55fe13dc8f461374cea7d000537afb4bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.9

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page