Bibliographic Collection

The dataset consists of bibliographic records retrieved from Scopus on March 3, 2024, using the keywords “connectome” and “connectomes”.

The search was applied to the Title (TI), Abstract (AB), and Author Keywords (DE) fields to ensure comprehensive retrieval of relevant literature.

The search was limited to:

  • journal articles (excluding conference papers, book chapters, etc.)
  • English-language publications
  • Publications up to 2024

The final dataset comprises 15,188 records, retrieved from the Scopus interface in CSV (Comma-Separated Values) format. The exported file includes complete citation and abstract fields for further processing and analysis.

The search string used was:

(TITLE-ABS-KEY(connectome) OR TITLE-ABS-KEY(connectomes)) AND PUBYEAR > 1978 AND PUBYEAR < 2025 AND (LIMIT-TO(DOCTYPE, “ar”)) AND (LIMIT-TO(LANGUAGE, “English”))

Inport data and Converting

Two datasets were prepared for the analysis. The first dataset (dta1) contains the raw bibliographic records exported directly from Scopus. The second dataset (dta2) is a cleaned version, with standardized fields such as Author Keywords (DE) and Affiliations.

Both files were converted into a bibliographic data frame using the convert2df() function from the bibliometrix package. Duplicate records were removed during the conversion process.

# 1.將 Scopus/WoS 書目資料匯入

#file_path1 <- "~/Documents/data_Biblio/scopus_connectome_15188.csv" # Set file paths (my mac)
file_path1 <- "C:/Users/chfawu/Documents/scopus_connectome_15188.csv" # raw data
#file_path2 <- "~/Documents/data_Biblio/clean_connectome.csv"    # my mac
file_path2 <- "C:/Users/chfawu/Documents/clean_connectome.csv" # cleaned data

# 2.Convert raw Scopus data into bibliographic data frame
dta1 <- bibliometrix::convert2df(
  "C:/Users/chfawu/Documents/scopus_connectome_15188.csv" , # raw data
  #"~/Documents/data_Biblio/scopus_connectome_15188.csv" ,
                                dbsource = "scopus",   #資料庫名稱    
                                format = "csv",
                                remove.duplicates = TRUE)

Converting your scopus collection into a bibliographic dataframe

Done!


Generating affiliation field tag AU_UN from C1:  Done!
# Convert cleaned Scopus data into bibliographic data frame
dta2 <- bibliometrix::convert2df(
  "C:/Users/chfawu/Documents/clean_connectome.csv", # cleaned data
  #"~/Documents/data_Biblio/clean_connectome.csv" ,  
                                dbsource = "scopus", 
                                format = "csv",
                                remove.duplicates = TRUE) 

Converting your scopus collection into a bibliographic dataframe
Done!


Generating affiliation field tag AU_UN from C1:  Done!

Check Missing Values

# Check dimensions of each dataset
dim(dta1)  # raw
[1] 15188    53
dim(dta2)  # cleaned
[1] 15189   264
with(bibliometrix::missingData(dta1), mandatoryTags) |> knitr::kable(caption="Missing Data Summary (Raw Dataset)")
Missing Data Summary (Raw Dataset)
tag description missing_counts missing_pct status
AB Abstract 0 0.00 Excellent
DT Document Type 0 0.00 Excellent
SO Journal 0 0.00 Excellent
LA Language 0 0.00 Excellent
PY Publication Year 0 0.00 Excellent
TI Title 0 0.00 Excellent
TC Total Citation 0 0.00 Excellent
AU Author 2 0.01 Good
DI DOI 52 0.34 Good
C1 Affiliation 81 0.53 Good
CR Cited References 121 0.80 Good
ID Keywords Plus 342 2.25 Good
RP Corresponding Author 1531 10.08 Acceptable
DE Keywords 3422 22.53 Poor
WC Science Categories 15188 100.00 Completely missing
with(bibliometrix::missingData(dta2), mandatoryTags) |> knitr::kable(caption="Missing Data Summary (Cleaned Dataset)") 
Missing Data Summary (Cleaned Dataset)
tag description missing_counts missing_pct status
AB Abstract 0 0.00 Excellent
SO Journal 0 0.00 Excellent
TI Title 0 0.00 Excellent
TC Total Citation 0 0.00 Excellent
AU Author 2 0.01 Good
DT Document Type 1 0.01 Good
LA Language 1 0.01 Good
PY Publication Year 1 0.01 Good
DI DOI 52 0.34 Good
C1 Affiliation 81 0.53 Good
CR Cited References 128 0.84 Good
ID Keywords Plus 342 2.25 Good
RP Corresponding Author 1532 10.09 Acceptable
DE Keywords 3422 22.53 Poor
WC Science Categories 15189 100.00 Completely missing

Section 2:Co-Author Analysis: The conceptual structure of a field

The function biblioNetwork calculates, starting from a bibliographic data frame, the most frequently used networks: Coupling, Co-citation, Co-occurrences, and Collaboration.

biblioNetwork uses two arguments to define the network to compute:

analysis argument can be “co-citation”, “coupling”, “collaboration”, or “co-occurrences”.

network argument can be “authors”, “references”, “sources”, “countries”, “universities”, “keywords”, “author_keywords”, “titles” and “abstracts”.

i.e. the following code calculates a classical collaboration network:

NetMatrix <- biblioNetwork(M, analysis = “collaboration”, network = “作者、機構、國家”, sep = “;”)

– Authors collaboration (analysis = “collaboration”, network = “authors”) – University collaboration (analysis = “collaboration”, network = universities”) – Country collaboration (analysis = “collaboration”, network = “countries”)

Authors collaboration network

# 計算作者合作網絡矩陣
library(bibliometrix)
dta2 <- metaTagExtraction(dta2, Field = "AU", sep = ";") 
NetMatrix_collab_authors <- bibliometrix::biblioNetwork(
  dta2,
  analysis = "collaboration",  # 合作分析
  network = "authors",         # 分析作者網絡
  sep = ";",                   # 使用分隔符號 ";"(依據資料格式)
  short = FALSE,               # 設定 TRUE,則所有出現頻率低於2的項目會被刪除
  shortlabel = TRUE,           # 參考文獻的標籤會以簡短格式儲存
  remove.terms = NULL,         # 通常用於剔除常見但無實質意義的詞語
  synonyms = NULL              # 統一詞彙表示,避免同一概念因不同表達方式而被分割成不同節點
  )

Plot Authors collaboration Network

# 建立輸出資料夾
output_dir <- "C:/Users/chfawu/Documents/outputs_collaboration"
dir.create(output_dir, showWarnings = FALSE, recursive = TRUE)

# 輸出 PNG
png(filename = file.path(output_dir, "Authors_Collaboration_Network.png"),
    width = 1600, height = 1200, res = 200)

# 繪製作者合作網絡圖
plot_collab_authors <- networkPlot(
  NetMatrix_collab_authors,
  normalize = TRUE,       # 正規化網絡邊權
  weighted = TRUE,        # 根據邊的權重(合作次數)展示
  n = 40,                 # 圖形可讀性考量,顯示前40個重要作者
  Title = "Authors Collaboration Network",
  type = "fruchterman",   # 使用 Fruchterman-Reingold 佈局
  labelsize = 0.8,        # 節點標籤字型大小
  size = 5,               # 節點大小
  cluster = "louvain",
  halo = TRUE
  )

# 顯示圖形
plot_collab_authors
$graph
IGRAPH 0054985 UNW- 40 536 -- 
+ attr: alpha (g/n), ylim (g/n), xlim (g/n), rescale (g/l), asp (g/n),
| layout (g/n), main (g/c), name (v/c), deg (v/n), size (v/n),
| label.cex (v/n), color (v/c), community (v/n), label.dist (v/n),
| frame.color (v/c), label.color (v/c), label.font (v/n), label (v/c),
| weight (e/n), num (e/n), width (e/n), color (e/c), lty (e/n), curved
| (e/l)
+ edges from 0054985 (vertex names):
 [1] wang y--zhang y wang y--wang j  wang y--wang x  wang y--zhang j
 [5] wang y--li y    wang y--li j    wang y--chen h  wang y--li x   
 [9] wang y--zhang x wang y--zhang z wang y--liu j   wang y--chen y 
+ ... omitted several edges

$graph_pajek
IGRAPH 00528f2 UNW- 40 536 -- 
+ attr: name (v/c), deg (v/n), size (v/n), label.cex (v/n), id (v/c),
| weight (e/n), num (e/n)
+ edges from 00528f2 (vertex names):
 [1] wang y--zhang y wang y--wang j  wang y--wang x  wang y--zhang j
 [5] wang y--li y    wang y--li j    wang y--chen h  wang y--li x   
 [9] wang y--zhang x wang y--zhang z wang y--liu j   wang y--chen y 
[13] wang y--wang l  wang y--zhang h wang y--wang z  wang y--liu y  
[17] wang y--li h    wang y--li l    wang y--chen x  wang y--liu h  
[21] wang y--wang h  wang y--liu z   wang y--zhang l wang y--chen j 
[25] wang y--xu x    wang y--wu y    wang y--wang q  wang y--wu j   
+ ... omitted several edges

$cluster_obj
IGRAPH clustering multi level, groups: 4, mod: 0.084
+ groups:
  $`1`
   [1] "wang y"  "zhang y" "wang x"  "li y"    "chen h"  "li x"    "zhang x"
   [8] "liu j"   "chen y"  "liu y"   "li l"    "liu h"   "wang h"  "wu y"   
  
  $`2`
  [1] "wang j"  "zhang j" "li j"    "zhang z" "wang z"  "li h"    "chen j" 
  
  $`3`
   [1] "wang l"  "zhang h" "chen x"  "liu z"   "zhang l" "xu x"    "wang q" 
   [8] "wu j"    "wang m"  "kim j"   "wang k"  "li f"    "kim m"  
  + ... omitted several groups/vertices

$cluster_res
    vertex cluster btw_centrality clos_centrality pagerank_centrality
1   wang y       1       0.000000      0.00526316           0.0579361
2  zhang y       1       0.000000      0.00847458           0.0395091
4   wang x       1       3.900000      0.00877193           0.0434420
6     li y       1      11.454015      0.00980392           0.0347832
8   chen h       1       0.985354      0.00806452           0.0323105
9     li x       1      11.152381      0.00869565           0.0350930
10 zhang x       1       4.385304      0.00980392           0.0286227
12   liu j       1       2.904773      0.01010101           0.0296288
13  chen y       1      10.269358      0.01010101           0.0302160
17   liu y       1       0.000000      0.00800000           0.0318953
19    li l       1       0.000000      0.00709220           0.0299709
21   liu h       1      43.463897      0.01136364           0.0189173
22  wang h       1       3.433547      0.00961538           0.0234208
27    wu y       1      41.389472      0.01204819           0.0165153
3   wang j       2       1.990909      0.00925926           0.0391856
 [ reached 'max' / getOption("max.print") -- omitted 25 rows ]

$community_obj
IGRAPH clustering multi level, groups: 4, mod: 0.084
+ groups:
  $`1`
   [1] "wang y"  "zhang y" "wang x"  "li y"    "chen h"  "li x"    "zhang x"
   [8] "liu j"   "chen y"  "liu y"   "li l"    "liu h"   "wang h"  "wu y"   
  
  $`2`
  [1] "wang j"  "zhang j" "li j"    "zhang z" "wang z"  "li h"    "chen j" 
  
  $`3`
   [1] "wang l"  "zhang h" "chen x"  "liu z"   "zhang l" "xu x"    "wang q" 
   [8] "wu j"    "wang m"  "kim j"   "wang k"  "li f"    "kim m"  
  + ... omitted several groups/vertices

$layout
            [,1]       [,2]
 [1,]  0.2821346 -0.7635368
 [2,]  0.4460438 -0.8535952
 [3,] -0.9860792 -0.6704816
 [4,]  0.3210548 -0.9199306
 [5,] -0.5686330 -0.5873775
 [6,]  0.4558672 -0.6784362
 [7,] -0.7505254 -0.7615489
 [8,]  0.4377716 -1.0000000
 [9,]  1.0000000 -0.8038777
[10,]  0.0256494 -0.8413222
[11,] -0.5919835 -0.8411371
[12,]  0.1257139 -0.9049314
[13,]  0.8390805 -0.9371544
[14,]  0.0913512 -0.4959330
[15,] -0.0246023 -0.4200362
[16,] -0.8075610 -0.6017165
[17,]  0.8149699 -0.8529117
[18,] -1.0000000 -0.7976608
[19,]  0.7410339 -0.7337549
[20,]  0.6749158 -0.4030683
[21,]  0.9432481 -0.7088401
[22,]  0.6103904 -0.9502676
[23,]  0.0581235 -0.2247262
[24,]  0.4035872 -0.4380171
[25,] -0.8331104 -0.9223423
[26,] -0.2718447 -0.4162670
[27,]  0.5952133 -0.7742415
[28,]  0.2532507 -0.3678268
[29,] -0.0911310 -0.3010063
[30,] -0.3229818 -0.2362482
[31,]  0.9840517  0.0819953
[32,]  0.7804060  0.5451155
[33,] -0.0463439  0.0133275
[34,]  0.4803770 -0.2920911
[35,]  0.2928105 -0.2410761
[36,]  0.3865377 -0.0833564
[37,]  0.8074748  0.8048905
 [ 達到了 getOption("max.print") -- 省略最後 3 列 ]]

$S
48263 x 48263 sparse Matrix of class "dsCMatrix"
                                                                                           
wang y  0.003164557 0.000267229 0.000287687 0.000495461 0.000212149 0.000316456 0.000172927
zhang y 0.000267229 0.004444444 0.000404040 0.000224467 0.000372439 0.000419753 0.000194293
                                                                                           
wang y  0.000345224 0.000395570 0.000443038 0.000298543 0.000347080 0.000434351 0.000343974
zhang y 0.000430976 0.000449735 0.000325926 0.000111810 0.000344086 0.000232389 0.000450886
                                                                                           
wang y  0.000383583 0.000274095 0.000321400 0.000370847 2.83009e-04 0.000135237 0.000222074
zhang y 0.000235690 0.000384952 0.000104167 0.000347222 7.22674e-05 0.000151947 0.000545809
                                                                                             
wang y  0.000627209 0.000179126 .           0.000391802 0.000248201 9.39967e-05 6.45828e-05 .
zhang y 0.000200200 0.000419287 4.19287e-05 0.000169312 0.000348584 8.80088e-05 2.72109e-04 .
                                                  
wang y  0.000471317 1.36110e-04 0.000466356 ......
zhang y 0.000472813 4.77897e-05 0.000233918 ......

 ..............................
 ........suppressing 48231 columns and 48260 rows in show(); maybe adjust options(max.print=, width=)
 ..............................
                                                                                  
żytkowski a . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......

$nodeDegree
                   node   degree
wang y           wang y 1.000000
jr                   jr 0.805090
li y               li y 0.716678
wang x           wang x 0.675820
zhang y         zhang y 0.664434
wang j           wang j 0.637642
zhang j         zhang j 0.615539
wang l           wang l 0.576021
li j               li j 0.573342
wang z           wang z 0.564635
zhang x         zhang x 0.560616
liu y             liu y 0.530476
liu z             liu z 0.527796
li f               li f 0.523778
liu j             liu j 0.509712
zhang z         zhang z 0.502344
li x               li x 0.501674
zhang h         zhang h 0.484930
thompson pm thompson pm 0.481581
wu j               wu j 0.470864
wang k           wang k 0.470864
jones d         jones d 0.454119
chen x           chen x 0.452110
chen y           chen y 0.450100
zhang l         zhang l 0.450100
wang m           wang m 0.445412
xu x               xu x 0.439384
wang q           wang q 0.438714
kim j             kim j 0.432686
kim s             kim s 0.432016
miller bl     miller bl 0.432016
li l               li l 0.427328
thompson p   thompson p 0.423309
chen h           chen h 0.421299
wang h           wang h 0.409913
liu h             liu h 0.407904
li h               li h 0.405224
 [ reached 'max' / getOption("max.print") -- omitted 48226 rows ]

$params
                params                        values
1            normalize                          TRUE
2                    n                            40
3                Title Authors Collaboration Network
4                 type                   fruchterman
5                label                          TRUE
6            labelsize                           0.8
7            label.cex                         FALSE
8          label.color                         FALSE
9                 halo                          TRUE
10             cluster                       louvain
11 community.repulsion                           0.1
12                size                             5
13            size.cex                         FALSE
14              curved                         FALSE
15             noloops                          TRUE
16     remove.multiple                          TRUE
17     remove.isolates                         FALSE
18            weighted                          TRUE
19            edgesize                             1
20           edges.min                             0
21               alpha                           0.5
22             verbose                          TRUE
dev.off()
agg_png 
      2 

Centrality and Cluster Analysis-Author

library(igraph)
library(dplyr)
library(flextable)
library(officer)

# 建 igraph 網絡物件
g_auth <- graph_from_adjacency_matrix(NetMatrix_collab_authors, mode = "undirected", weighted = TRUE)

# 取介數中心性前 40 節點
btw_all <- betweenness(g_auth, normalized = TRUE)
top40 <- order(btw_all, decreasing = TRUE)[1:40]
g40 <- induced_subgraph(g_auth, vids = top40)
top40_names <- V(g40)$name

# 計算中心性指標
deg40 <- degree(g40, normalized = TRUE)
btw40 <- betweenness(g40, normalized = TRUE)
cls40 <- closeness(g40, normalized = TRUE)
eig40 <- eigen_centrality(g40)$vector
pr40  <- page_rank(g40)$vector

centrality_df <- data.frame(
  Author      = top40_names,
  Degree      = deg40,
  Betweenness = btw40,
  Closeness   = cls40,
  Eigenvector = eig40,
  PageRank    = pr40,
  row.names   = NULL
)

# 使用 Louvain 方法進行群集偵測
cl_igraph <- cluster_louvain(g_auth)
membership_vec <- membership(cl_igraph)

# 加入群集欄(不做 toupper,名稱直接比對)
centrality_df$cluster <- membership_vec[centrality_df$Author]

# 排序表格
centrality_df <- centrality_df[order(-centrality_df$Betweenness), ]

# 匯出為 APA Word 表格
timestamp <- format(Sys.time(), "%Y-%m-%d_%H%M")
doc <- read_docx()
ft <- flextable(centrality_df) %>%
  theme_booktabs() %>%
  set_caption("Table 1. Top 40 Authors in the Collaboration Network: Centrality and Cluster Analysis") %>%
  bold(part = "header") %>%
  align(align = "center", part = "all") %>%
  fontsize(size = 10, part = "all") %>%
  add_footer_lines(values = c(
  "**註:本表排序依據為 Betweenness 中心性,代表節點在網絡中作為資訊橋梁之能力。**",
  "Degree: 合作連結數,反映合作廣度。",
  "Betweenness: 節點在合作網絡中橋接其他節點的能力。",
  "Closeness: 與所有其他節點的平均距離倒數,反映資訊傳播效率。",
  "Eigenvector: 與高影響力節點合作越多,得分越高。",
  "PageRank: 根據整體網絡結構所計算的影響力指標。",
  "Cluster: 根據 Louvain 方法對整體網絡進行社群偵測。"
))


doc <- body_add_flextable(doc, ft)

# 儲存 Word 檔
doc_path <- file.path(output_dir, paste0("Authors_Centrality_Cluster_Top40_", timestamp, ".docx"))
print(doc, target = doc_path)
browseURL(doc_path)
# 檢查是否有未對應成功者
missing <- centrality_df[is.na(centrality_df$cluster), "Author"]
print(missing)
character(0)

University collaboration network

# 計算學校(或大學)合作網絡矩陣
library(bibliometrix)
dta2 <- metaTagExtraction(dta2, Field = "AU_UN", sep = ";") #每位合著者和通訊作者的所屬大學
NetMatrix_collab_institutions <- bibliometrix::biblioNetwork(
  dta2,
  analysis = "collaboration",  # 合作分析
  network = "universities",    # 或是可選分析"institutions"機構合作
  sep = ";",                   # 使用分隔符號 ";"(依據資料格式)
  short = FALSE,               # 設定 TRUE,則所有出現頻率低於2的項目會被刪除
  shortlabel = TRUE,           # 參考文獻的標籤會以簡短格式儲存
  remove.terms = NULL,         # 通常用於剔除常見但無實質意義的詞語
  synonyms = NULL              # 統一詞彙表示,避免同一概念因不同表達方式而被分割成不同節點
  )

Plot University collaboration network

output_dir <- "C:/Users/chfawu/Documents/outputs_collaboration"
dir.create(output_dir, showWarnings = FALSE, recursive = TRUE)

png(filename = file.path(output_dir, "Institutions_Collaboration_Network_Top50.png"),
    width = 1800, height = 1400, res = 200)

networkPlot(
  NetMatrix_collab_institutions,
  normalize = TRUE,
  weighted = TRUE,
  n = 50,  # 🔁 Top 50 機構
  Title = "Top 50 Institutions Collaboration Network",
  type = "fruchterman",
  labelsize = 0.7,
  size = 5,
  cluster = "louvain",
  halo = TRUE
)
$graph
IGRAPH 33fd24d UNW- 50 865 -- 
+ attr: alpha (g/n), ylim (g/n), xlim (g/n), rescale (g/l), asp (g/n),
| layout (g/n), main (g/c), name (v/c), deg (v/n), size (v/n),
| label.cex (v/n), color (v/c), community (v/n), label.dist (v/n),
| frame.color (v/c), label.color (v/c), label.font (v/n), label (v/c),
| weight (e/n), num (e/n), width (e/n), color (e/c), lty (e/n), curved
| (e/l)
+ edges from 33fd24d (vertex names):
[1] university of california--harvard medical school    
[2] university of california--beijing normal university 
[3] university of california--university of pennsylvania
+ ... omitted several edges

$graph_pajek
IGRAPH 33fc5fe UNW- 50 865 -- 
+ attr: name (v/c), deg (v/n), size (v/n), label.cex (v/n), id (v/c),
| weight (e/n), num (e/n)
+ edges from 33fc5fe (vertex names):
[1] university of california--harvard medical school                                  
[2] university of california--beijing normal university                               
[3] university of california--university of pennsylvania                              
[4] university of california--university of cambridge                                 
[5] university of california--mcgill university                                       
[6] university of california--university of electronic science and technology of china
+ ... omitted several edges

$cluster_obj
IGRAPH clustering multi level, groups: 3, mod: 0.16
+ groups:
  $`1`
   [1] "university of california"            
   [2] "university of pennsylvania"          
   [3] "stanford university"                 
   [4] "university of southern california"   
   [5] "university of minnesota"             
   [6] "university of pittsburgh"            
   [7] "yale university school of medicine"  
   [8] "indiana university"                  
   [9] "university of michigan"              
  + ... omitted several groups/vertices

$cluster_res
                               vertex cluster btw_centrality clos_centrality
1            university of california       1       0.763584      0.00934579
4          university of pennsylvania       1       2.103696      0.00925926
13                stanford university       1       4.961697      0.01075269
15  university of southern california       1      12.630500      0.01075269
16            university of minnesota       1      31.829537      0.01176471
20           university of pittsburgh       1       5.616538      0.01086957
21 yale university school of medicine       1      18.909436      0.01162791
23                 indiana university       1       7.013262      0.01075269
24             university of michigan       1      10.952175      0.01111111
26           university of washington       1      13.676426      0.01136364
27                    duke university       1      30.968694      0.01149425
32           johns hopkins university       1      22.026614      0.01162791
33         baylor college of medicine       1       9.825031      0.01041667
34            northwestern university       1      25.243861      0.01136364
35                   emory university       1       6.452751      0.01075269
   pagerank_centrality
1            0.0618981
4            0.0387245
13           0.0328743
15           0.0268683
16           0.0198306
20           0.0259397
21           0.0243785
23           0.0230307
24           0.0214732
26           0.0257170
27           0.0150023
32           0.0200726
33           0.0166316
34           0.0168409
35           0.0247185
 [ reached 'max' / getOption("max.print") -- omitted 35 rows ]

$community_obj
IGRAPH clustering multi level, groups: 3, mod: 0.16
+ groups:
  $`1`
   [1] "university of california"            
   [2] "university of pennsylvania"          
   [3] "stanford university"                 
   [4] "university of southern california"   
   [5] "university of minnesota"             
   [6] "university of pittsburgh"            
   [7] "yale university school of medicine"  
   [8] "indiana university"                  
   [9] "university of michigan"              
  + ... omitted several groups/vertices

$layout
            [,1]       [,2]
 [1,] -0.2893064 -0.2621757
 [2,]  0.3459949 -0.3594889
 [3,]  0.6739729 -0.6780628
 [4,] -0.4257365 -0.2629163
 [5,] -0.2502579  0.4852451
 [6,] -0.0621209  0.4774207
 [7,]  0.7797768 -0.4659891
 [8,]  0.2256357  0.3917182
 [9,]  1.0000000 -0.6944731
[10,]  0.4998542 -0.4189690
[11,] -0.1224200  0.3308948
[12,] -0.3752780  0.6877524
[13,] -0.5517254 -0.3730477
[14,]  0.0851516  0.4814159
[15,] -0.5967508 -0.0931716
[16,] -0.5388629 -0.7893450
[17,]  0.1485049  0.2333947
[18,]  0.1776935 -0.6193797
[19,]  0.9700982 -0.3202195
[20,] -0.4139663 -0.4851230
[21,] -0.2813924 -0.4171611
[22,]  0.4021125 -0.6343920
[23,] -0.7151832 -0.5065937
[24,] -0.6368867 -0.7060626
[25,] -0.0776716  0.9237480
[26,] -0.7729127 -0.3372988
[27,] -0.2519206 -0.6793396
[28,]  0.0524026  0.6828450
[29,] -0.4229593  0.9557840
[30,]  0.3065222 -1.0000000
[31,] -0.1681650  0.6494690
[32,] -0.6358880 -0.2460093
[33,] -0.8513918 -0.6377219
[34,] -0.9434182 -0.2990593
[35,] -0.4731494 -0.1337597
[36,] -0.2212471  0.9675351
[37,]  0.2978198  0.9439333
 [ 達到了 getOption("max.print") -- 省略最後 13 列 ]]

$S
8325 x 8325 sparse Matrix of class "dsCMatrix"
                                                                                    
university of california 0.001754386 0.000105263 6.96185e-05 0.000202429 8.98150e-05
harvard medical school   0.000105263 0.002222222 2.64550e-05 0.000128205 7.58438e-05
                                                                                    
university of california 3.59505e-05 8.81601e-06 0.000112546 7.85546e-05 0.000140351
harvard medical school   4.55373e-05 1.00503e-04 0.000109015 1.16086e-04 0.000166667
                                                                                    
university of california 1.11799e-04 5.94707e-05 0.000227252 3.34169e-05 0.000246042
harvard medical school   6.53595e-05 7.53296e-05 0.000172712 5.29101e-05 0.000108401
                                                                                    
university of california 0.000235664 2.08855e-05 1.38504e-04 0.000221819 0.000198830
harvard medical school   0.000116086 7.93651e-05 9.74659e-05 0.000127714 0.000148148
                                                                                      
university of california 2.92398e-05 0.000194932 9.90379e-05 . 9.48317e-05 0.000156212
harvard medical school   1.85185e-05 0.000231481 3.58423e-05 . 4.00400e-05 0.000334855
                                                                                    
university of california .           9.29476e-05 0.000144858 3.05111e-05 3.85579e-05
harvard medical school   4.83092e-05 7.35835e-05 0.000142712 7.72947e-05 2.44200e-05
                                                       
university of california 0.000208147 0.000292398 ......
harvard medical school   0.000282486 0.000333333 ......

 ..............................
 ........suppressing 8292 columns and 8322 rows in show(); maybe adjust options(max.print=, width=)
 ..............................
                                                                                     
zucker school of medicine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
                                      
zucker school of medicine . . . ......

$nodeDegree
                                                          node   degree
1                                       harvard medical school 1.000000
2                                     university of california 0.907055
3                                            mcgill university 0.604703
4                                      university of cambridge 0.561030
5                                   university of pennsylvania 0.531915
6                                    university college london 0.481523
7                                         university of oxford 0.470325
8                            university of southern california 0.461366
9                                          stanford university 0.454647
10                                       university of toronto 0.435610
11                                             yale university 0.432251
12                                    university of pittsburgh 0.419933
13                          yale university school of medicine 0.382979
14                                            emory university 0.374020
15                                      university of michigan 0.366181
16                                          harvard university 0.365062
17                                          indiana university 0.347144
18                                    university of washington 0.339306
19                                         columbia university 0.322508
20                                   beijing normal university 0.321389
21                                       king's college london 0.321389
22                         national institute of mental health 0.304591
23                                          university of utah 0.297872
24                          university of california san diego 0.294513
25                                    johns hopkins university 0.293393
26                     icahn school of medicine at mount sinai 0.287794
27                                  baylor college of medicine 0.283315
28                                     university of melbourne 0.278835
29                           university medical center utrecht 0.276596
30    university of electronic science and technology of china 0.267637
31                                  capital medical university 0.262038
32                                     university of minnesota 0.260918
33                    washington university school of medicine 0.260918
34                                            fudan university 0.260918
35                                     northwestern university 0.260918
36                                         new york university 0.258679
37 max planck institute for human cognitive and brain sciences 0.251960
 [ reached 'max' / getOption("max.print") -- omitted 8288 rows ]

$params
                params                                    values
1            normalize                                      TRUE
2                    n                                        50
3                Title Top 50 Institutions Collaboration Network
4                 type                               fruchterman
5                label                                      TRUE
6            labelsize                                       0.7
7            label.cex                                     FALSE
8          label.color                                     FALSE
9                 halo                                      TRUE
10             cluster                                   louvain
11 community.repulsion                                       0.1
12                size                                         5
13            size.cex                                     FALSE
14              curved                                     FALSE
15             noloops                                      TRUE
16     remove.multiple                                      TRUE
17     remove.isolates                                     FALSE
18            weighted                                      TRUE
19            edgesize                                         1
20           edges.min                                         0
21               alpha                                       0.5
22             verbose                                      TRUE
dev.off()
agg_png 
      2 

Centrality and Cluster Analysis-Institutions

library(igraph)
library(dplyr)
library(flextable)
library(officer)

# 建立 igraph 網絡
g_inst <- graph_from_adjacency_matrix(NetMatrix_collab_institutions, mode = "undirected", weighted = TRUE)

# Top 50 機構(依 Betweenness)
btw_all <- betweenness(g_inst, normalized = TRUE)
top50 <- order(btw_all, decreasing = TRUE)[1:50]
g50 <- induced_subgraph(g_inst, vids = top50)
top50_names <- V(g50)$name

# 中央性指標
deg50 <- degree(g50, normalized = TRUE)
btw50 <- betweenness(g50, normalized = TRUE)
cls50 <- closeness(g50, normalized = TRUE)
eig50 <- eigen_centrality(g50)$vector
pr50  <- page_rank(g50)$vector

centrality_df <- data.frame(
  Institution = top50_names,
  Degree      = deg50,
  Betweenness = btw50,
  Closeness   = cls50,
  Eigenvector = eig50,
  PageRank    = pr50,
  row.names   = NULL
)

# 群集分析(全圖)
cl_inst <- cluster_louvain(g_inst)
membership_vec <- membership(cl_inst)
centrality_df$cluster <- membership_vec[centrality_df$Institution]

# 排序
centrality_df <- centrality_df[order(-centrality_df$Betweenness), ]

# Word 匯出(APA 格式)
timestamp <- format(Sys.time(), "%Y-%m-%d_%H%M")
doc <- read_docx()
ft <- flextable(centrality_df) %>%
  theme_booktabs() %>%
  set_caption("Table 2. Top 50 Institutions in the Collaboration Network: Centrality and Cluster Analysis") %>%
  bold(part = "header") %>%
  align(align = "center", part = "all") %>%
  fontsize(size = 10, part = "all") %>%
  add_footer_lines(values = c(
    "**註:本表排序依據為 Betweenness 中心性,代表節點在網絡中作為資訊橋梁之能力。**",
    "Degree: 機構的合作連結數,反映合作廣度。",
    "Betweenness: 機構在網絡中的中介程度。",
    "Closeness: 與所有其他機構的平均距離倒數,反映資訊傳遞效率。",
    "Eigenvector: 連結到其他高影響力機構的程度。",
    "PageRank: 根據網絡結構所計算的整體影響力指標。",
    "Cluster: 根據 Louvain 方法對整體網絡進行社群偵測的結果。"
  ))

doc <- body_add_flextable(doc, ft)
doc_path <- file.path(output_dir, paste0("Institutions_Centrality_Cluster_Top50_", timestamp, ".docx"))
print(doc, target = doc_path)
browseURL(doc_path)

Country collaboration network

# 計算國家合作網絡矩陣
library(bibliometrix)
dta2 <- metaTagExtraction(dta2, Field = "AU_CO", sep = ";")     #共同作者所屬國家
NetMatrix_collab_countries <- bibliometrix::biblioNetwork(
  dta2,
  analysis = "collaboration",  # 合作分析
  network = "countries",       # 分析國家合作
  sep = ";",                   # 使用分隔符號 ";"(依據資料格式)
  short = FALSE,               # 設定 TRUE,則所有出現頻率低於2的項目會被刪除
  shortlabel = TRUE,           # 參考文獻的標籤會以簡短格式儲存
  remove.terms = NULL,         # 通常用於剔除常見但無實質意義的詞語
  synonyms = NULL              # 統一詞彙表示,避免同一概念因不同表達方式而被分割成不同節點
  )

Plot Country collaboration network

output_dir <- "C:/Users/chfawu/Documents/outputs_collaboration"
dir.create(output_dir, showWarnings = FALSE, recursive = TRUE)

png_path <- file.path(output_dir, "Countries_Collaboration_Network_Top50.png")

png(filename = png_path,
    width = 1800, height = 1400, res = 200)

networkPlot(
  NetMatrix_collab_countries,
  normalize = TRUE,
  weighted = TRUE,
  n = 50,  # Top 50 國家
  Title = "Top 50 Countries Collaboration Network",
  type = "fruchterman",
  labelsize = 0.7,
  size = 5,
  cluster = "louvain",
  halo = TRUE
)
$graph
IGRAPH 3512bb2 UNW- 50 690 -- 
+ attr: alpha (g/n), ylim (g/n), xlim (g/n), rescale (g/l), asp (g/n),
| layout (g/n), main (g/c), name (v/c), deg (v/n), size (v/n),
| label.cex (v/n), color (v/c), community (v/n), label.dist (v/n),
| frame.color (v/c), label.color (v/c), label.font (v/n), label (v/c),
| weight (e/n), num (e/n), width (e/n), color (e/c), lty (e/n), curved
| (e/l)
+ edges from 3512bb2 (vertex names):
 [1] usa--china          usa--germany        usa--united kingdom
 [4] usa--canada         usa--italy          usa--australia     
 [7] usa--france         usa--netherlands    usa--japan         
+ ... omitted several edges

$graph_pajek
IGRAPH 3512320 UNW- 50 690 -- 
+ attr: name (v/c), deg (v/n), size (v/n), label.cex (v/n), id (v/c),
| weight (e/n), num (e/n)
+ edges from 3512320 (vertex names):
 [1] usa--china          usa--germany        usa--united kingdom
 [4] usa--canada         usa--italy          usa--australia     
 [7] usa--france         usa--netherlands    usa--japan         
[10] usa--spain          usa--switzerland    usa--korea         
[13] usa--belgium        usa--sweden         usa--israel        
[16] usa--austria        usa--brazil         usa--singapore     
[19] usa--india          usa--finland        usa--denmark       
+ ... omitted several edges

$cluster_obj
IGRAPH clustering multi level, groups: 3, mod: 0.031
+ groups:
  $`1`
   [1] "usa"                  "china"                "germany"             
   [4] "united kingdom"       "canada"               "australia"           
   [7] "netherlands"          "japan"                "korea"               
  [10] "israel"               "austria"              "singapore"           
  [13] "india"                "hong kong"            "turkey"              
  [16] "new zealand"          "philippines"          "malaysia"            
  [19] "saudi arabia"         "cyprus"               "georgia"             
  [22] "pakistan"             "united arab emirates"
  
  + ... omitted several groups/vertices

$cluster_res
           vertex cluster btw_centrality clos_centrality pagerank_centrality
1             usa       1        0.00000      0.00480769          0.17453607
2           china       1        1.78615      0.00833333          0.06417359
3         germany       1       10.97336      0.00862069          0.07914586
4  united kingdom       1        5.78210      0.00833333          0.09175024
5          canada       1        6.14598      0.00847458          0.05515666
7       australia       1       15.62253      0.00847458          0.04176735
9     netherlands       1       21.19166      0.00900901          0.04218205
10          japan       1       20.11023      0.00925926          0.01489889
13          korea       1        6.68749      0.00806452          0.01684306
16         israel       1       14.33818      0.00925926          0.01020759
17        austria       1       31.48550      0.00943396          0.01251060
19      singapore       1       35.00565      0.01020408          0.01244031
20          india       1       37.01869      0.00925926          0.00705758
25      hong kong       1       35.79689      0.00980392          0.00810157
26         turkey       1       59.46171      0.01010101          0.00592905
 [ reached 'max' / getOption("max.print") -- omitted 35 rows ]

$community_obj
IGRAPH clustering multi level, groups: 3, mod: 0.031
+ groups:
  $`1`
   [1] "usa"                  "china"                "germany"             
   [4] "united kingdom"       "canada"               "australia"           
   [7] "netherlands"          "japan"                "korea"               
  [10] "israel"               "austria"              "singapore"           
  [13] "india"                "hong kong"            "turkey"              
  [16] "new zealand"          "philippines"          "malaysia"            
  [19] "saudi arabia"         "cyprus"               "georgia"             
  [22] "pakistan"             "united arab emirates"
  
  + ... omitted several groups/vertices

$layout
           [,1]        [,2]
 [1,] -0.413178 -0.37587587
 [2,] -0.571550 -0.39521007
 [3,] -0.392603 -0.23585766
 [4,] -0.496898 -0.28685116
 [5,] -0.317422 -0.39828994
 [6,]  0.436498 -0.08772020
 [7,] -0.390634 -0.11486401
 [8,]  0.322418  0.02766094
 [9,] -0.212834 -0.30947013
[10,] -0.555863  0.03668761
[11,]  0.523154 -0.00110593
[12,]  0.430266  0.09931485
[13,] -0.452630  0.14297658
[14,]  0.519745 -0.16305906
[15,] -0.131126  0.76222166
[16,] -0.601896  0.24336313
[17,] -0.321171  0.07410879
[18,]  0.557839  0.21083127
[19,] -0.550800 -0.15171619
[20,] -0.745534  0.04492098
[21,]  0.209085 -0.10702761
[22,]  0.338120  0.23942200
[23,]  0.246397 -0.42104868
[24,] -0.142712  1.00000000
[25,] -0.747180 -0.19069651
[26,] -0.465986 -0.63151909
[27,]  0.153650  0.17658243
[28,]  0.343980 -0.22980634
[29,]  0.492452  0.44002318
[30,]  0.261175  0.47872437
[31,]  0.422723 -0.68453873
[32,]  0.550513 -0.38947037
[33,]  0.727916  0.20251781
[34,]  0.724595 -0.06681163
[35,]  0.578125 -0.55433482
[36,] -0.237275 -0.71420216
[37,] -0.390256  0.77393261
 [ 達到了 getOption("max.print") -- 省略最後 13 列 ]]

$S
90 x 90 sparse Matrix of class "dsCMatrix"
                                                                                       
usa 0.000138523 4.01208e-05 4.26045e-05 4.98296e-05 5.47813e-05 3.96929e-05 5.34328e-05
                                                                                       
usa 4.10844e-05 4.65846e-05 3.57291e-05 3.96137e-05 4.24805e-05 4.53732e-05 4.25123e-05
                                                                                       
usa 5.01042e-05 5.58334e-05 5.23686e-05 5.35624e-05 5.13049e-05 3.23821e-05 4.50482e-05
                                                                                       
usa 4.12818e-05 3.85456e-05 5.31706e-05 3.63917e-05 3.87865e-05 4.78235e-05 6.92617e-05
                                                                               
usa 5.61107e-05 2.80345e-05 4.1557e-05 4.9016e-05 5.07919e-05 2.6811e-05 ......

 ..............................
 ........suppressing 56 columns and 88 rows in show(); maybe adjust options(max.print=, width=)
 ..............................
                                                                                   
rwanda . . . . . . . . . . . 0.00166667 . . . . . . . . . . . . . . . . . . . . . .
             
rwanda ......

$nodeDegree
                         node   degree
usa                       usa 1.000000
germany               germany 0.915493
united kingdom united kingdom 0.859155
canada                 canada 0.816901
china                   china 0.774648
spain                   spain 0.774648
australia           australia 0.746479
italy                   italy 0.732394
france                 france 0.732394
switzerland       switzerland 0.732394
netherlands       netherlands 0.647887
belgium               belgium 0.605634
japan                   japan 0.535211
korea                   korea 0.521127
austria               austria 0.521127
brazil                 brazil 0.521127
singapore           singapore 0.521127
denmark               denmark 0.521127
sweden                 sweden 0.478873
finland               finland 0.478873
portugal             portugal 0.478873
ireland               ireland 0.464789
india                   india 0.450704
south africa     south africa 0.436620
hungary               hungary 0.422535
israel                 israel 0.408451
norway                 norway 0.408451
hong kong           hong kong 0.394366
turkey                 turkey 0.394366
chile                   chile 0.380282
czech republic czech republic 0.380282
poland                 poland 0.366197
argentina           argentina 0.366197
mexico                 mexico 0.352113
greece                 greece 0.323944
colombia             colombia 0.323944
iran                     iran 0.309859
 [ reached 'max' / getOption("max.print") -- omitted 53 rows ]

$params
                params                                 values
1            normalize                                   TRUE
2                    n                                     50
3                Title Top 50 Countries Collaboration Network
4                 type                            fruchterman
5                label                                   TRUE
6            labelsize                                    0.7
7            label.cex                                  FALSE
8          label.color                                  FALSE
9                 halo                                   TRUE
10             cluster                                louvain
11 community.repulsion                                    0.1
12                size                                      5
13            size.cex                                  FALSE
14              curved                                  FALSE
15             noloops                                   TRUE
16     remove.multiple                                   TRUE
17     remove.isolates                                  FALSE
18            weighted                                   TRUE
19            edgesize                                      1
20           edges.min                                      0
21               alpha                                    0.5
22             verbose                                   TRUE
dev.off()
agg_png 
      2 
browseURL(png_path)

Centrality and Cluster Analysis-Countries

library(igraph)
library(dplyr)
library(flextable)
library(officer)

# 建立 igraph 對象
g_country <- graph_from_adjacency_matrix(NetMatrix_collab_countries, mode = "undirected", weighted = TRUE)

# Top 50 國家(依 Betweenness)
btw_all <- betweenness(g_country, normalized = TRUE)
top50 <- order(btw_all, decreasing = TRUE)[1:50]
g50 <- induced_subgraph(g_country, vids = top50)
top50_names <- V(g50)$name

# 計算中央性指標
deg50 <- degree(g50, normalized = TRUE)
btw50 <- betweenness(g50, normalized = TRUE)
cls50 <- closeness(g50, normalized = TRUE)
eig50 <- eigen_centrality(g50)$vector
pr50  <- page_rank(g50)$vector

centrality_df <- data.frame(
  Country     = top50_names,
  Degree      = deg50,
  Betweenness = btw50,
  Closeness   = cls50,
  Eigenvector = eig50,
  PageRank    = pr50,
  row.names   = NULL
)

# Louvain 群集分析(全圖)
cl_country <- cluster_louvain(g_country)
membership_vec <- membership(cl_country)
centrality_df$cluster <- membership_vec[centrality_df$Country]

# 排序 + APA Word 輸出
centrality_df <- centrality_df[order(-centrality_df$Betweenness), ]
timestamp <- format(Sys.time(), "%Y-%m-%d_%H%M")

doc <- read_docx()
ft <- flextable(centrality_df) %>%
  theme_booktabs() %>%
  set_caption("Table 3. Top 50 Countries in the Collaboration Network: Centrality and Cluster Analysis") %>%
  bold(part = "header") %>%
  align(align = "center", part = "all") %>%
  fontsize(size = 10, part = "all") %>%
  add_footer_lines(values = c(
    "**註:本表排序依據為 Betweenness 中心性,代表節點在網絡中作為資訊橋梁之能力。**",
    "Degree: 國家的合作連結數,反映合作廣度。",
    "Betweenness: 國家在網絡中的中介程度。",
    "Closeness: 與所有其他國家的平均距離倒數。",
    "Eigenvector: 與高影響力國家合作的程度。",
    "PageRank: 結合網絡結構的整體影響力。",
    "Cluster: 根據 Louvain 方法對整體網絡進行社群偵測的結果。"
  ))

doc <- body_add_flextable(doc, ft)
doc_path <- file.path(output_dir, paste0("Countries_Centrality_Cluster_Top50_", timestamp, ".docx"))
print(doc, target = doc_path)
browseURL(doc_path)