1

In R, I would like to visualize the one-to-n-way intersections between many sets, using a chord diagram.

What I have in mind is nicely illustrated here. For clarity, let me copy the example from the illustration. Say there are three sets (e.g., person characteristics), with each a couple observations (e.g., names). Some of these observations are in all three sets, some are in two sets, and some in only one. With only three sets a Venn diagram can also be used to visualize the intersection, but in a situation with many sets, the 'chord intersection diagram' might help visualize all intersections.

In R, the circlize package can be used to create chord diagrams. However, in the book about that package I could not find pointers on how to create a chord intersection diagram.

Importantly, there are other ways to visualize many one-to-n-way intersections in R (e.g., UpSetR), but those are restricted in the number of intersections that can be shown, and I hope a chord diagram turns out to be less restrictive.

Is it possible to use the circlize package in such a way that it returns a chord intersection diagram? And if not, are there other R (preferably) packages that do the job?

3
  • Have you seen This example ?
    – G5W
    Commented Feb 2, 2019 at 3:37
  • @G5W That is indeed one way to do it. The width of the sets however misrepresent the number of 'observations' in each set (instead, it represents the number of links). I'm looking for a way to have these links for a single observation overlap, as in the 'chord intersection diagram'.
    – Alexander
    Commented Feb 2, 2019 at 20:33
  • The circlize package may get this functionality in the future: github.com/jokergoo/circlize/issues/158
    – Alexander
    Commented Nov 10, 2020 at 14:40

1 Answer 1

0

The circlize package can now be used for chord intersection diagrams. In this GitHub issue, the package author gives an example.

Also, I found out that the ggraph package can do it. I created a Shiny app that illustrates the chord intersection diagram (and other methods for visualizing complex set intersections). R functions for the different methods can be found on Github.

Not the answer you're looking for? Browse other questions tagged or ask your own question.