New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sankey diagram #1123

Closed
jbednar opened this Issue Feb 11, 2017 · 9 comments

Comments

Projects
None yet
7 participants
@jbednar
Member

jbednar commented Feb 11, 2017

It would be nice to offer a Sankey diagram. MPL offers one (http://matplotlib.org/api/sankey_api.html), but a Bokeh-based one could work like the d3 sankey, where being interactive makes it much easier to follow.

image

@philippjfr philippjfr added the feature label Feb 23, 2017

@philippjfr philippjfr added this to the v2.0 milestone Mar 15, 2017

@philippjfr philippjfr modified the milestones: Post v2.0, v2.0 Jun 27, 2017

@slamer59

This comment has been minimized.

slamer59 commented Sep 5, 2017

d3.js has plenty of example.
I'm using this combined with django:
d3-sankey-diagram

To play with some data

And I have note tested yet but there is
jupyter widget

@MatthewSteen

This comment has been minimized.

MatthewSteen commented Oct 13, 2017

👍

@philippjfr

This comment has been minimized.

Member

philippjfr commented Dec 7, 2017

Here is my initial effort at porting d3-Sankey to HoloViews: https://anaconda.org/philippjfr/sankey/notebook

The remaining bits should be easy once the TriMesh and Chord PRs have been merged.

@jbednar

This comment has been minimized.

Member

jbednar commented Dec 7, 2017

Cool!!

@philippjfr

This comment has been minimized.

Member

philippjfr commented Dec 8, 2017

Now with labels:

screen shot 2017-12-08 at 3 56 08 pm

@philippjfr philippjfr modified the milestones: v2.0, v1.10 Dec 8, 2017

@slamer59

This comment has been minimized.

slamer59 commented Dec 8, 2017

@jlstevens

This comment has been minimized.

Member

jlstevens commented Dec 11, 2017

At a glance the approach Philipp uses in that notebooks looks reasonable (Sankey being a type of graph) so I would be happy to see a PR and maybe this new element can make it into the next release.

@philippjfr philippjfr self-assigned this Feb 9, 2018

@philippjfr philippjfr referenced this issue Feb 10, 2018

Merged

Add Sankey Element #2328

3 of 3 tasks complete

@philippjfr philippjfr closed this Apr 8, 2018

@dizhu1991

This comment has been minimized.

dizhu1991 commented Aug 17, 2018

@philippjfr Hi, I was trying to draw a sankey graph of visitor paths' starts and ends in a museum. So the left and right labels will come from the same set of elements (there will be edges like a to b and b to a at the same time). I tried holoview and there was an error "Sankey diagram only supports acyclic graphs". How should I solve this problem?

@denson

This comment has been minimized.

denson commented Nov 5, 2018

@dizhu1991 Sankey is not for visualizing two way relationships as you describe.

You could try loading it into a networkx MultiDiGraph and then draw the MultiDiGraph.

There is work being done to attempt to create something similar to Sankey that does allow cycles:

http://data-analytics.net/cep/References_files/Enabling%20Loops%20in%20Sankey%20Diagrams.html

http://bl.ocks.org/soxofaan/bb6f91d57dc4b6afe91d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment