pythonchord-diagram

Circular Chord Diagram in Python


enter image description here

I would like to create a circular chord diagram

I found this link of chord diagram in plotly v3, but in version4 this seams to be not available.

Same for chord diagram in bokeh the new version does not contain a way to create a chord diagram.

How to create a chord diagram with Python?


Solution

  • You can use Chord of holoviews

    import pandas as pd
    import holoviews as hv
    from holoviews import opts, dim
    from bokeh.sampledata.les_mis import data
    
    hv.extension('bokeh')
    hv.output(size=200)
    links = pd.DataFrame(data['links'])
    print(links.head(3))
    hv.Chord(links)