CHORD DIAGRAM

Ambuj Shukla
R-evolution
Published in
3 min readJun 25, 2023

--

Chord diagrams are used to visualize relationships and connections between entities or groups. R Studio is often preferred for creating chord diagrams due to its comprehensive ecosystem, customization options, emphasis on reproducibility, and strong community support. R Studio provides packages and libraries that make it easy to create and customize chord diagrams, while also allowing for reproducible workflows and access to resources for assistance and collaboration. Other tools can also be used, but R Studio’s features and community make it a popular choice.

An example

Definition

A chord diagram represents flows or connections between several entities (called nodes). Each entity is represented by a fragment on the outer part of the circular layout. Then, arcs are drawn between each entities. The size of the arc is proportional to the importance of the flow.

Here is an example displaying the number of people migrating from one country to another. Data used comes from this scientific publication from Gui J. Abel.

# Libraries
library(tidyverse)
library(viridis)
library(patchwork)
library(hrbrthemes)
library(circlize)
library(chorddiag) #devtools::install_github("mattflor/chorddiag")

# Load dataset from github
data <- read.table("https://raw.githubusercontent.com/holtzy/data_to_viz/master/Example_dataset/13_AdjacencyDirectedWeighted.csv"…

--

--