This study is going to analyze the Blockchain research papers and citations data. Raw data comes in csv format, however we have formatted the data to suite visNetwork package requirement. Firstly, you will see an interactive network visualization made with the help of visNetwork package, which will be followed by network analysis performed with the help of igraph package.

library(visNetwork)
library(readr)
library(readxl)
library(dplyr)
library(igraph)

Interactive Graph

‘Edges.RData’ has two columns, to and from, showing the connections between nodes. ‘Nodes.RData’ has three columns; id, label, and group. Id numbers the papers from 1 to the number of rows, the label column has the Web of Science identifiers for the papers. Interestingly, we have divided the papers in groups based on their year of publication. Some NAs were removed to run a smooth and fruitful network graph.

edges <- readRDS("edges.RData")
nodes <- readRDS("nodes.RData")
head(edges)
# A tibble: 6 x 2
   from    to
  <dbl> <dbl>
1  1969   560
2  1969     8
3  1969  1078
4  1969  1072
5  2037   649
6  1902  1695
head(nodes)
# A tibble: 6 x 3
     id label               group
  <dbl> <chr>               <dbl>
1     1 WOS:000330829200017  2014
2     2 WOS:000341100800027  2014
3     3 WOS:000346822900003  2014
4     4 WOS:000349989300002  2015
5     5 WOS:000344596300006  2015
6     6 WOS:000354218500010  2015
visNetwork(nodes, edges, width = "100%") %>%
  visIgraphLayout() %>%
  visNodes(
    shape = "dot",
    color = list(
      background = "#0085AF",
      border = "#013848",
      highlight = "#FF8000"
    ),
    shadow = list(enabled = TRUE, size = 10)
  ) %>%
  visEdges(
    shadow = FALSE,
    color = list(color = "#0085AF", highlight = "#C62F4B")
  ) %>%
  visOptions(highlightNearest = list(enabled = T, degree = 1, hover = T),
             selectedBy = "group") %>% 
  visLayout(randomSeed = 11)

Network Analysis

edges2 <- read_csv("citations.csv")
Rows: 2788 Columns: 2
-- Column specification --------------------------------------------------------
Delimiter: ","
chr (2): citing, cited

i Use `spec()` to retrieve the full column specification for this data.
i Specify the column types or set `show_col_types = FALSE` to quiet this message.
nodes2 <- read_xlsx("papers.xlsx")

colnames(edges2) <- c("from", "to")

colnames(nodes2)[2] <- "label"

nodes2 <- nodes2 %>%
  select(2,1,3:14)

graph2 <- graph_from_data_frame(edges2, directed = T,nodes2)

The size of the network, meaning the number of edges is 2788. Number of nodes are 2050.

#graph2
gsize(graph2) 
[1] 2788
gorder(graph2) 
[1] 2050
V(graph2) 
+ 2050/2050 vertices, named, from 2e6192d:
   [1] WOS:000330829200017 WOS:000341100800027 WOS:000346822900003
   [4] WOS:000349989300002 WOS:000344596300006 WOS:000354218500010
   [7] WOS:000353799200010 WOS:000353015800124 WOS:000353659400022
  [10] WOS:000354501300009 WOS:000352232100002 WOS:000377966900015
  [13] WOS:000395560800023 WOS:000368161300005 WOS:000370355800006
  [16] WOS:000402029000001 WOS:000384887100022 WOS:000368923800002
  [19] WOS:000373649800010 WOS:000373649800016 WOS:000373612200030
  [22] WOS:000379436300005 WOS:000381487600073 WOS:000386982800002
  [25] WOS:000386056900031 WOS:000383576100008 WOS:000386205400018
  [28] WOS:000388155200019 WOS:000389408400008 WOS:000398221800082
+ ... omitted several vertices
E(graph2)
+ 2788/2788 edges from 2e6192d (vertex names):
 [1] WOS:000752849700035->WOS:000498404700027
 [2] WOS:000752849700035->WOS:000353015800124
 [3] WOS:000752849700035->WOS:000548999400001
 [4] WOS:000752849700035->WOS:000545288600005
 [5] WOS:000758152200001->WOS:000504552000001
 [6] WOS:000745515800001->WOS:000703327100001
 [7] WOS:000745515800001->WOS:000541127800052
 [8] WOS:000745515800001->WOS:000566296200001
 [9] WOS:000745515800001->WOS:000582586400022
[10] WOS:000745515800001->WOS:000464140500001
+ ... omitted several edges

Centrality Measures

Degree Centrality

Out Degree Centrality
graph2_deg_out <- degree(graph2, mode = c("out"))
nodes2[nodes2$id == which.max(graph2_deg_out),"Article_Title"]
# A tibble: 1 x 1
  Article_Title                                 
  <chr>                                         
1 Cryptocurrency trading: a comprehensive survey


In Degree Centrality
graph2_deg_in <- degree(graph2, mode = c("in"))
nodes2[nodes2$id == which.max(graph2_deg_in),"Article_Title"]
# A tibble: 1 x 1
  Article_Title                                             
  <chr>                                                     
1 Blockchains and Smart Contracts for the Internet of Things


Total Degree Centrality
graph2_deg_total <- degree(graph2, mode = c("total"))
nodes2[nodes2$id == which.max(graph2_deg_total),"Article_Title"]
# A tibble: 1 x 1
  Article_Title                                 
  <chr>                                         
1 Cryptocurrency trading: a comprehensive survey

Betweenness Centrality

graph2_between <- betweenness(graph2, directed = T)
nodes2[nodes2$id == which.max(graph2_between), "Article_Title"]
# A tibble: 1 x 1
  Article_Title                                                           
  <chr>                                                                   
1 Extreme tail network analysis of cryptocurrencies and trading strategies


Measuring Network Structure

Network Density
edge_density(graph2)
[1] 0.0006637384