Thursday 17 December 2015

Interactive Network Graphs with R Lang .. You got to see this!!

Interactive network graphs with R networkD3

Usually network graphs are difficult to visualize and hard to interpret. Importance of nodes usually called as actors or points importance will be based on centrality measures. There are many types of centrality measures. 1. Degree Centrality 2. Betweeness Centrality 3. Closeness Centrality In this blog, I am not trying to teach you centrality measures, I will be showing how to plot Interactive network graphs which are stunningly amazing. In the below interactive graphs, strength of a node in the network is captured by the amount of space in the network it can drag, when it is pulled. Video below will show you what exactly I mean. I am quite excited to see packages like this in R. It is simply awesome and makes visualizations much interesting. I never had seen anything like this before in commercial software’s although which are meant for creating interactive dash boards ;).

load the data and libraries

# load the library
library("networkD3")
## Warning: package 'networkD3' was built under R version 3.1.2
# load the data
setwd("D:\\BigData_sai\\Data science\\Interactive Plots\\Jan_06_2015")
networkData <- read.csv("Network.csv")

# glance of data
head(networkData)
##              Source          Target
## 1  Johnson Juntunen    Rosella Foor
## 2  Johnson Juntunen Paulina Mcateer
## 3 Darcey Greenawalt  Kathline Stolz
## 4 Darcey Greenawalt Zachary Merlino
## 5 Darcey Greenawalt  Myrtie Galarza
## 6 Darcey Greenawalt    Naoma Semmes

Stunning Interactive plot.. here they come

Please check the below cool video :)

https://www.youtube.com/watch?v=TGICEEL-OYI&feature=youtu.be

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.

Author: Sai Kumar Allaka

No comments:

Post a Comment