Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a chord chart in Bokeh 0.13?

Tags:

bokeh

Previous versions of Bokeh seem to have chord charts:

https://docs.bokeh.org/en/0.12.4/docs/gallery/chord_chart.html

But not the latest version?

https://docs.bokeh.org/en/latest/docs/gallery/chord_chart.html [404s]

like image 209
Jonathan Avatar asked Aug 07 '18 03:08

Jonathan


Video Answer


1 Answers

Chord was part of bokeh.charts which was deprecated and removed many release ago. Most things that used to be in the old bokeh.charts are now simple to accomplish with the stable bokeh.plotting API, but Chord is one of the few exceptions. I would suggest looking at Holoviews, which is a very high level API that can output chord plots as Bokeh (and is officially endorsed by the Bokeh project):

http://holoviews.org/reference/elements/bokeh/Chord.html

With Holoviews, chord plots are typically a line or two:

%%opts Chord [label_index='name' color_index='index' edge_color_index='source'] 
%%opts Chord (cmap='Category20' edge_cmap='Category20')
hv.Chord((links, nodes)).select(value=(5, None))
like image 177
bigreddot Avatar answered Sep 22 '22 13:09

bigreddot