ricklupton / ipysankeywidget

IPython / Jupyter Sankey diagram widget
MIT License
174 stars 24 forks source link

Is there a way to have different values at the source and target of a link? #15

Closed snth closed 6 years ago

snth commented 6 years ago

I have quantities that grow over time so I would like to be able to specify things like:

{'source': 'a', 'target': 'b', 'source_value': 1, 'target_value': 2}
ricklupton commented 6 years ago

I don't think this really fits with the idea of a Sankey diagram, which shows flows of things that are conserved. If you want to show how something has changed over time using a Sankey diagram you can show the increase explicitly: image

links = [
    {'source': 'T = 1', 'target': 'T = 2', 'value': 2},
    {'source': 'Increase', 'target': 'T = 2', 'value': 1},
    {'source': 'T = 2', 'target': 'T = 3', 'value': 3},
]
snth commented 6 years ago

Ok, that makes sense. Thanks @ricklupton