Chord Network
A Chord network is also known as a circular network. It is a type of network visualization that represents relationships and connections between entities or categories. It is particularly useful for showing the interactions and associations between different groups or entities. In a chord network, entities or groups are represented as arcs on a circle, and the connections or relationships are displayed as chords connecting the arcs. The width of the chords can be used to represent the strength, magnitude, or frequency of the connections.
Syntax:
chordNetwork(Data, height=500, width=500, initialOpacity=0.8, useTicks=0,colourScale=NULL, padding=0.1, fontSize=14, fontFamily=”sans-serif”, labels=c(), labelDistance=30)
Arguments
- Data – A square matrix or dataframe whose (n,m) entry represents the strength of the link from group n to group m.
- height – Height for the network graph’s frame area in pixels.
- width – Numeric width for the network graph’s frame area in pixels.
- initialOpacity – Specify the opacity before the user mouses over the link.
- useTicks – Integer number of ticks on the radial axis.
- colourScale – Specify the hexa decimal colors in which to display the different categories.
- padding – Specify the amount of space between adjacent categories on the outside of the graph.
- font Size – Numeric font size in pixels for the node text labels.
- font Family – Font family for the node text labels.
- labels – Vector containing labels of the categories.
- label distance – Integer distance in pixels(px) between text labels and outer radius. ’30’ is the default value.
In supply chain marketing, Chord diagrams can be used to visualize supply chain relationships, showing connections between suppliers, manufacturers, distributors, and customers. This can help identify dependencies, bottlenecks, and potential improvements in the supply chain.
#Load the library
library(networkD3)
#Create data
hairColourData<-matrix(c(11975,1951,8010,1013,
5871,10048,16145,990,
8916,2060,8090,940,
2868,6171,8045,6907),
nrow=4)
#Create chord diagram
chordNetwork(Data=hairColourData,
width=500,
height=500,
colourScale=c("#000000", "#FFDD89", "#957244", "#F26223"),
labels=c("red","brown","blond","gray"))
Output:
Load the library using library(networkD3). Create matrix of data about hair colour and store it in ‘hairColourData’ variable. Create chord network using chordNetwork() with ‘hairColourData’ as Data, 500 as width and height, finally add colours and labels of colours.
networkD3 package in R
Data-driven document Network is an R package for creating network graphs which are used for 3-dimensional visualizations of data as network graphs. In R Programming Language networkD3 plots are created using the networkD3 package.
Table of Content
- Simple Network
- Force Network
- Sankey Network
- Radial Network:
- Dendro network
- Chord Network
To use a package in R programming we have to install the package first. For installing the R package in R studio use the command install.packages(“name”). Follow the following steps to get the packages installed on your system.
install.packages('networkD3')