Chord diagram





A Chord diagram allows to study flows between a set of entities. Entities (nodes) are displayed all around a circle and connected with arcs (links). In R, the circlize package is the best option to build it.

Introduction to circlize

The circlize package allows to build all kinds of circular chart. This first section introduces the way it works, step by step. Chord diagram are described in the following section, but a basic understanding of the library is necessary at first.





Static chord diagram

The circlize package also offers functions to build chord diagrams. Basically, it allows to add arcs between nodes to show flows. The examples below will guide you through their usage. The circos.links() function builds connection one by one, when chordDiagram() plot a whole dataset in one shot.





Interactivity

The chorddiag package is an htmlwidget: it automatically builds interactive charts. On the chart below, hovering a group or a connection will highlight the related flow and give additional information.

Note: The example below comes directly from the chorddiag documentation. Thanks to Mattflor for developping such a nice package.

How to export to .png Chart code

Related chart types


Chord diagram
Network
Sankey
Arc diagram
Edge bundling