ipysankeywidget

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
linkLabelFormatto a d3-format string; links whose value is more thanlinkLabelMinWidthwill 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_clickedandon_link_clicked. These replace theon_selectedevent.
Contributors
- Rick Lupton
- Nicholas Bollweg
- Ali Alsabbah
- Remi Bois
- Miguel Mendez
Metadata
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)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ipysankeywidget-0.6.0.tar.gz | 208.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ipysankeywidget-0.6.0-py2.py3-none-any.whl | Python 3, Python 2 | 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
|
Security for ipysankeywidget 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.