1 min read

Testing network graphs using D3

I was working on the igraph package in R at work a couple of weeks ago and although it did the job, it lacked a bit of a visual presence. Here is a website full of igraph network graphs for your reference.

Thought I’d have a look at D3 Network graphs. Looks promising thus far! Enjoying the interactivity of the nodes. It’s also very surprisingly easy to implement.

library(networkD3)
data(MisLinks)
data(MisNodes)

forceNetwork(Links = MisLinks, Nodes = MisNodes, Source = "source",
               Target = "target", Value = "value", NodeID = "name",
               Group = "group", opacity = 1)