# IPython Sankey diagram widget [![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/ricklupton/ipysankeywidget/master?urlpath=lab/tree/examples/Simple%20example.ipynb) [![Conda Version](https://img.shields.io/conda/vn/conda-forge/ipysankeywidget.svg)](https://anaconda.org/conda-forge/ipysankeywidget)
Display Sankey diagrams in IPython / Jupyter notebook using [d3-sankey-diagram](https://github.com/ricklupton/d3-sankey-diagram).
## Installation
To install use pip:
$ pip install ipysankeywidget
Alternatively, to install using conda:
$ conda install -c conda-forge ipysankeywidget
For a development install, see [DEVELOPING.md](DEVELOPING.md).
## Browser support
Tested in Firefox and Chrome. [There have been reports](https://github.com/ricklupton/ipysankeywidget/issues/2) that it's not working in Safari.
## Documentation
See the
[d3-sankey-diagram API docs](https://github.com/ricklupton/d3-sankey-diagram/wiki):
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:
```python
layout = Layout(width="1000", height="1200")
SankeyWidget(links=data, layout=layout)
```
## Examples
See notebooks in examples folder for usage examples. You can try these online
using
[Binder](https://mybinder.org/v2/gh/ricklupton/ipysankeywidget/master?urlpath=lab/tree/examples/Simple%20example.ipynb),
or follow the links to static versions on nbviewer:
- [Simple example](http://nbviewer.jupyter.org/github/ricklupton/ipysankeywidget/blob/master/examples/Simple%20example.ipynb)
- [Advanced examples](http://nbviewer.jupyter.org/github/ricklupton/ipysankeywidget/blob/master/examples/More%20examples.ipynb)
- [Linking and Layout](http://nbviewer.jupyter.org/github/ricklupton/ipysankeywidget/blob/master/examples/Linking%20and%20Layout.ipynb)
- [Exporting Images](http://nbviewer.jupyter.org/github/ricklupton/ipysankeywidget/blob/master/examples/Exporting%20Images.ipynb)
## Changelog
### 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](https://github.com/d3/d3-format#locale_format); 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
Raw data
{
"_id": null,
"home_page": "https://github.com/ricklupton/ipysankeywidget",
"name": "ipysankeywidget",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "ipython,widgets,Jupyter,JupyterLab,JupyterLab3",
"author": "Rick Lupton",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/f4/c5/6d0946a26e634334d1bcf09ce7d4ac6a03bd8199aed3303a32a57276a6c7/ipysankeywidget-0.5.0.tar.gz",
"platform": null,
"description": "# IPython Sankey diagram widget [![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/ricklupton/ipysankeywidget/master?urlpath=lab/tree/examples/Simple%20example.ipynb) [![Conda Version](https://img.shields.io/conda/vn/conda-forge/ipysankeywidget.svg)](https://anaconda.org/conda-forge/ipysankeywidget) \n\nDisplay Sankey diagrams in IPython / Jupyter notebook using [d3-sankey-diagram](https://github.com/ricklupton/d3-sankey-diagram).\n\n## Installation\n\nTo install use pip:\n\n $ pip install ipysankeywidget\n \nAlternatively, to install using conda:\n\n $ conda install -c conda-forge ipysankeywidget\n\nFor a development install, see [DEVELOPING.md](DEVELOPING.md).\n\n## Browser support\n\nTested in Firefox and Chrome. [There have been reports](https://github.com/ricklupton/ipysankeywidget/issues/2) that it's not working in Safari.\n \n## Documentation\n\nSee the\n[d3-sankey-diagram API docs](https://github.com/ricklupton/d3-sankey-diagram/wiki):\nthe attributes of the `SankeyWidget` are the same as the properties of the `sankey` object described there.\n\nTo change the figure size, use the ipywidgets Layout object:\n\n```python\nlayout = Layout(width=\"1000\", height=\"1200\")\nSankeyWidget(links=data, layout=layout)\n```\n\n## Examples\n\nSee notebooks in examples folder for usage examples. You can try these online\nusing\n\n[Binder](https://mybinder.org/v2/gh/ricklupton/ipysankeywidget/master?urlpath=lab/tree/examples/Simple%20example.ipynb),\nor follow the links to static versions on nbviewer:\n- [Simple example](http://nbviewer.jupyter.org/github/ricklupton/ipysankeywidget/blob/master/examples/Simple%20example.ipynb)\n- [Advanced examples](http://nbviewer.jupyter.org/github/ricklupton/ipysankeywidget/blob/master/examples/More%20examples.ipynb)\n- [Linking and Layout](http://nbviewer.jupyter.org/github/ricklupton/ipysankeywidget/blob/master/examples/Linking%20and%20Layout.ipynb)\n- [Exporting Images](http://nbviewer.jupyter.org/github/ricklupton/ipysankeywidget/blob/master/examples/Exporting%20Images.ipynb)\n\n## Changelog\n\n### v0.5.0 (16 December 2022)\n\n- Compatible with Jupyter Lab as well as Jupyter notebook.\n\n### v0.4.2 (29 April 2022)\n\n- Expose d3-sankey-diagram nodePositions() option to allow for custom node layout.\n\n### v0.4.1 (18 February 2021)\n\n- Experimental support for link \"markers\"\n- Experimental support for showing HTML info for links\n\n### v0.4.0 (19 November 2020)\n\n- Update to d3-sankey-diagram v0.8.0\n\n### v0.3.0\n\n- Now supports Jupyterlab\n\n### v0.2.5\n\n- You can now show link values as SVG text elements. Set `linkLabelFormat` to a [d3-format string](https://github.com/d3/d3-format#locale_format); links whose value is more than `linkLabelMinWidth` will have a label using that format.\n- Upgrade to d3-sankey-diagram version 0.7.3\n- ipysankeywidget can now be installed using conda (thanks to Ali Alsabbah #33)\n- Add a check for duplicate links (thanks to Remi Bois #23)\n\n### v0.2.4\n\n- Add events for clicking on nodes and links: `on_node_clicked` and\n `on_link_clicked`. These replace the `on_selected` event.\n\n## Contributors\n\n- Rick Lupton\n- Nicholas Bollweg\n- Ali Alsabbah\n- Remi Bois\n- Miguel Mendez\n",
"bugtrack_url": null,
"license": "BSD 3-Clause License",
"summary": "Display Sankey diagrams in Jupyter",
"version": "0.5.0",
"split_keywords": [
"ipython",
"widgets",
"jupyter",
"jupyterlab",
"jupyterlab3"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "d7b9163f859e80f1106ff50c0a70443e",
"sha256": "23dc1953b5749312874ab3cfbc6bdc9ad2604be7d09dddee9c6367bb5e7c43b5"
},
"downloads": -1,
"filename": "ipysankeywidget-0.5.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d7b9163f859e80f1106ff50c0a70443e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 330089,
"upload_time": "2022-12-16T18:15:41",
"upload_time_iso_8601": "2022-12-16T18:15:41.461874Z",
"url": "https://files.pythonhosted.org/packages/34/e4/353ec63cbaddbdc53bbb41dcf124604e6e20e66c3effac4698be4e81c2f9/ipysankeywidget-0.5.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "c5b5511900726ba997be55f915443721",
"sha256": "ed868df0b68ed9c14ad6372a4cec5db99eb43f441b3b4050bc1b454fb817902f"
},
"downloads": -1,
"filename": "ipysankeywidget-0.5.0.tar.gz",
"has_sig": false,
"md5_digest": "c5b5511900726ba997be55f915443721",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 475138,
"upload_time": "2022-12-16T18:15:43",
"upload_time_iso_8601": "2022-12-16T18:15:43.819189Z",
"url": "https://files.pythonhosted.org/packages/f4/c5/6d0946a26e634334d1bcf09ce7d4ac6a03bd8199aed3303a32a57276a6c7/ipysankeywidget-0.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-16 18:15:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "ricklupton",
"github_project": "ipysankeywidget",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "jupyterlab",
"specs": [
[
"==",
"1.2.*"
]
]
},
{
"name": "ipysankeywidget",
"specs": []
}
],
"lcname": "ipysankeywidget"
}