forked from laser-institute/network-analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScript Lab 2 SNA.R
29 lines (24 loc) · 1.07 KB
/
Script Lab 2 SNA.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
library(janitor)
library(tidyverse)
library(tidygraph)
library(ggraph)
dlt1_ties <- read_csv("lab-2/data/dlt1-edges.csv",
col_types = cols(Sender = col_character(),
Receiver = col_character(),
`Category Text` = col_skip(),
`Comment ID` = col_character(),
`Discussion ID` = col_character())) |>
clean_names()
dlt1_actors <- read_csv("lab-2/data/dlt1-nodes.csv",
col_types = cols(UID = col_character(),
Facilitator = col_character(),
expert = col_character(),
connect = col_character())) |>
clean_names()
dlt1_network <- tbl_graph(edges = dlt1_ties,
nodes = dlt1_actors,
node_key = "uid",
directed = TRUE)
plot(dlt1_network)
autograph(dlt1_network)
reciprocity(dlt1_network)