The final activity for each learning lab provides space to work with data and to reflect on how the concepts and techniques introduced in each lab might apply to your own research.

To earn a badge for each lab, you are required to respond to a set of prompts for two parts: 

Part I: Reflect and Plan

Use your institutional library, Google Scholar, or search engine of your choice to locate a research article, presentation, or resource that applies social network analysis to an educational context or topic of interest. More specifically, locate a network study that makes use of network-level structural measures to describe mathematically the network being studied. You are also welcome to select one of the research papers listed in the essential readings that may have piqued your interest.

  1. Provide an APA citation for your selected study.

    • Yen, C. J., Bozkurt, A., Tu, C. H., Sujo-Montes, L., Rodas, C., Harati, H., & Lockwood, A. B. (2019). A predictive study of students’ self-regulated learning skills and their roles in the social network interaction of online discussion board. Journal of Educational Technology Development and Exchange (JETDE), 11(1), 2.
  2. Were the data collected on the complete, ego, or partial network? Describe the sources of these network data.

    • Becuase I see all participants (n=4) in the visualized network, I consider this is a complete network.
  3. What relations were measured and what instruments were used to measure them?

    • Particiapants’ discussion interactions were measured for two weeks. And to do the linear regression anlaysis for the relationship between individual’s SNA and their SRL, they used In-degre, Out-degree, Betweenness centrality, Closeness centrality, Eigenvector centrality, and Reciprocated vertex pair ratio , and Page Rank.

Think about a network that you may be interested in studying, and answer the following questions:

  1. Would your study employ a positional, relational, or event-based approach to specify the network’s boundary?

    • I believe my study is event-based approach because the data will be collected based on the each student’s action on their inital posts and/or the responses to other posts.
  2. What data would you want to collect for this study and how might you go about doing it?

    • Recently I collected graduate students’ interactions through the online discussions forums over 14 weeks. In the early next year, we will start cleaning the data to make the main two documents (i.e., node-list and Edge list)
  3. What relations would you measure and what individual attribute information might you collect?

    • In my current study, I am seeking the interaction between students in their weekly discussions, looking for interaction patterns (ideally the changes over time although it’s not still clear how to do so), and also their overall preferences in terms of interacting with specific group of people and the writing styles.
  4. How might you approach collecting this data for your study? 

    • I currently collected data, which means I have an aproaved IRB and data access since mid Noveber, 2023. So I am going to transfer the data to the proper datasets. Each student’s posts and comments will be collected with their basic demographic information.

Part II: Data Product

Using the data from our case study or one of the data sets provided in the data folder, your goal for this lab is to create a polished sociogram and write a brief narrative including some network measures to help describe your network. For example, you may be interested in comparing size, density and level of reciprocity of two networks.

Alternatively, you may use your own data set to create a sociogram and calculate network-level measures to describe it. 

I highly recommend creating a new R script in your lab-2 folder to complete this task. When your code is ready to share, use the code chunk below to share the final code for your model and answer the questions that follow.

# YOUR FINAL CODE HERE
library(janitor)
## 
## Attaching package: 'janitor'
## The following objects are masked from 'package:stats':
## 
##     chisq.test, fisher.test
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.2     ✔ readr     2.1.4
## ✔ forcats   1.0.0     ✔ stringr   1.5.0
## ✔ ggplot2   3.4.2     ✔ tibble    3.2.1
## ✔ lubridate 1.9.2     ✔ tidyr     1.3.0
## ✔ purrr     1.0.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(tidygraph)
## 
## Attaching package: 'tidygraph'
## 
## The following object is masked from 'package:stats':
## 
##     filter
library(ggraph)
library(igraph)
## 
## Attaching package: 'igraph'
## 
## The following object is masked from 'package:tidygraph':
## 
##     groups
## 
## The following objects are masked from 'package:lubridate':
## 
##     %--%, union
## 
## The following objects are masked from 'package:dplyr':
## 
##     as_data_frame, groups, union
## 
## The following objects are masked from 'package:purrr':
## 
##     compose, simplify
## 
## The following object is masked from 'package:tidyr':
## 
##     crossing
## 
## The following object is masked from 'package:tibble':
## 
##     as_data_frame
## 
## The following objects are masked from 'package:stats':
## 
##     decompose, spectrum
## 
## The following object is masked from 'package:base':
## 
##     union
#first two columns correspond UID in the actors file
#dlt1_ties
dlt1_ties <- read_csv("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("data/dlt1-nodes.csv", 
                        col_types = cols(UID = col_character(), #treat the UID just like a string so we can use them as node names
                                         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)
ggraph(dlt1_network) +
  geom_node_point() +
  geom_edge_link()
## Using "stress" as default layout
## Warning: Using the `size` aesthetic in this geom was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` in the `default_aes` field and elsewhere instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.

ggraph(dlt1_network, layout = "fr") +
  geom_edge_link(alpha = .2) + #decrease the transparency of lines/edges to highlight the nodes
  geom_node_point(aes(color = role1, 
                      size = local_size())) + #make the connection more visible
  theme_graph()

ggraph(dlt1_network, layout = "stress") +
  geom_edge_link(alpha = .2) +
  geom_node_point(aes(color = role1,
                      size = local_size())) +
  theme_graph()

ggraph(dlt1_network, layout = "graphopt") +
  geom_edge_link(alpha = .2) +
  geom_node_point(aes(color = role1,
                      size = local_size())) +
  theme_graph()

ggraph(dlt1_network, layout = "kk") +
  geom_edge_link(alpha = .2) +
  geom_node_point(aes(color = role1,
                      size = local_size())) +
  theme_graph()

ggraph(dlt1_network, layout = "linear", circular = TRUE) +
  geom_edge_link(alpha = .2) +
  geom_node_point(aes(color = role1,
                      size = local_size())) +
  theme_graph()

#dlt2_ties
dlt2_ties <- read_csv("data/dlt2-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()
## Warning: The following named parsers don't match the column names: Receiver,
## Category Text, Comment ID, Discussion ID
dlt2_actors <- read_csv("data/dlt2-nodes.csv",
                        col_types = cols(UID = col_character(),
                                         Facilitator = col_character(),
                                         expert = col_character(),
                                         connect = col_character()))  |>
  clean_names()
## Warning: The following named parsers don't match the column names: UID,
## Facilitator
dlt2_network <- tbl_graph(edges = dlt2_ties,
                          nodes = dlt2_actors,
                          node_key = "uid",
                          directed = TRUE)

ggraph(dlt2_network, layout = "fr") +
  geom_edge_link(alpha = .2) +
  geom_node_point(aes(color = role, 
                      size = local_size())) +
  theme_graph()

ggraph(dlt2_network, layout = "graphopt") +
  geom_edge_link(alpha = .2) +
  geom_node_point(aes(color = role, 
                      size = local_size())) +
  theme_graph()

ggraph(dlt2_network, layout = "kk") +
  geom_edge_link(alpha = .2) +
  geom_node_point(aes(color = role, 
                      size = local_size())) +
  theme_graph()

ggraph(dlt2_network, layout = "linear", circular = TRUE) +
  geom_edge_link(alpha = .2) +
  geom_node_point(aes(color = role, 
                      size = local_size())) +
  theme_graph()

#comparisons

autograph(dlt1_network)

autograph(dlt2_network)

edge_density(dlt1_network)
## [1] 0.01279988
edge_density(dlt2_network)
## [1] 0.0106966
gorder(dlt1_network) # # of vertices
## [1] 445
gorder(dlt2_network) # # of vertices
## [1] 492
gsize(dlt1_network) # #of edges
## [1] 2529
gsize(dlt2_network) # #of edges
## [1] 2584
centr_degree(dlt1_network, mode = "all")
## $res
##   [1]  53   7   6  16  33  33  58  31  14  20 121  24  35  25  31   3  24  19
##  [19]  79   3   2  23   6  57  12  34  31   1  35  90   1  15  23  39  34  47
##  [37]  11   9  18   1  35  19   8 117   3  11   5   6  42  30  19  17  35  42
##  [55]   4  24  11  39  21  65  53  33  36  45   3   8  30  61  10   4  13   6
##  [73]   2  16  10   5  11   6   4   7   9   7  14   5   7   1  12  30   1   4
##  [91]  18  33   3   7   7  12   5  28   6  29  12   6  14  21   5   6  19   4
## [109]  22   4   1   5  10  11  26  35   6   6   7   3  11   3   5   2   1   3
## [127]   2  24  14   1   5   6   9   2   2  25  30   9   4   3   5  14   6  21
## [145]   2   3  13   8   1   4   2   5   3  10  18   3  11  15   5   3  18   7
## [163]  12   1   8   6  14   2   5   9   7   8   9   2   5  14  15   8   6   1
## [181]   3  10  12  12  14   2   3   4   3   5   4  18  22   6  12   5   7  36
## [199]  14   5  22  13  12   2  17   3  16   7   3   2  10  12   1   2   5   7
## [217]  13   5  30   1  10   2  39   2   1  15   2   2   1   3   7   3   1  37
## [235]   4   3   1   2   3   2   3   4   8   1   3   6   8   9  12   4   5   3
## [253]   3   2   2   5   4   5   3   1   2   4   1   2   4   5   2   9   3   2
## [271]   4   2   4   1   5   5   6   5  12   3   8   1   1   2   6   2   4   2
## [289]   3   1   1   2   3   1   5   1   2   3   2  15  14   5   7   2   2   4
## [307]   6   8   1  30   1   1   1   2   2   1   6   4   4   3   2   5   3   4
## [325]   2   3   1   1   9   3   6   1   2   2   6  12   4   4   2   3  11   4
## [343]   2   2   3   3   5   1   1   6   6   1   2   3   4   5   2   2   1   4
## [361]  21   1   1   1   1   2   1   1   1   1   1   1   1   1   1   3   2   2
## [379]   2   1   1   2   1   1   1   1   1   2   1   1   1   1   1   1   1   1
## [397]   3   1   2   1   1   1   2   1   1   3   1   1   2   3   1   1   2   1
## [415]   2   1   1   1   1   1   1   4   1   1   1   1   1   1   1   1   1  43
## [433]   2   3   1   1   2   2   2   1   0   0   0 581 332
## 
## $centralization
## [1] 0.6429242
## 
## $theoretical_max
## [1] 394272
centr_degree(dlt2_network, mode = "all")
## $res
##   [1]   0   1   4   4   0   7   5   3   0   5   4   2   8  14   0   0  21   2
##  [19]  16  10   2   6 147   6   0  56   1  30   3  43   0  31  41  11   5   1
##  [37]   4  33   0  17  47   1  31   6   0   4   0   2   8   1   3   9   4   1
##  [55]   1   2   1   0   6   5   1   3  40   4   0   1   1   3   7   6   1   7
##  [73]   1   8   7   1   4   0   0   1   1   2  20   9   0   1   7   3   0  11
##  [91]   1   2  10   7   2   1   1  28   1  15   6   1   1   0   0   5  11   2
## [109]   2  16   5  10   0   9   0   1   5   4  48   3   1   7   2  11  77   5
## [127]   5   7   5   7   2   2   4   3  43   0  37   1   1   2   0  38   1   1
## [145]   1   0   6   4  15   3   1   9   1   1  19   5  45 256   1  25  14   2
## [163]   0   3   2   2  21   2   7   9  15   2   1   3   0  21   4  15   1   5
## [181]   5   2 104  11   4  57   7   8  19  14   0   2   0   0  29  13  24  12
## [199]   1  16   0   2   6   0   1   1  13  23   2   1   1  18  34  32   1  12
## [217]   3   2   0   5   1   6  72   5   0   5   3   0  63   1   1   2  21   1
## [235]   2   4   1   0   3   2  12   1   0   8  43  25   0   0   0   2   2   0
## [253]   2   0  22   2  10   1   0   2   1   0   3   6   6  26  60   6   3   3
## [271]  30   9   5   3   1   0  16   2   3  19   3   6   3   5   5   1   8  21
## [289]   3   0   1  76   4   0   0   5   1   6   2  15  14 531  52  12   1   2
## [307]  14   2  12  37   1   1   7   1   0   7  19  15   1   0  28  11   2   1
## [325]   0   6   0  11  33   0   3   2  12   3  19  23   7   1   3   5   8  30
## [343]   1  13   6   4  18  11   2   3   3   0   1   1   4   3   6  26   1   7
## [361]  68  14   1   1   1   1  15   0   2   1   5   9   4  21  13   1   0  16
## [379]   6   5  10   5   2   6   1   1  55  61   2   0   1   1   1   8   3  31
## [397]   1   8   1   0   7   1   8   1  15   2   9   1   3   2  31   2   6   2
## [415]   1   1  32   0  31   2  12  40  15   2   1  14   1  17   4  11   2   2
## [433]  18   7   1  40  38   0   0   5   2   1   0   0  20   1  14   1   1   1
## [451]   2   1   9   3  16   0  28   4   7  49   1   3   7   1   1   9   1   1
## [469]   0   1  12   1   0  10   7   0  44   1   2   3  18   6  16   5  32  15
## [487]   0   1   1   1   9   1
## 
## $centralization
## [1] 0.5311161
## 
## $theoretical_max
## [1] 482162
#centralization
centr_degree(dlt1_network, mode = "out")
## $res
##   [1]  33   5   4  14  17  24  26  18  12  12  74  18  15  20  18   1  22  19
##  [19]  35   2   0  15   0  36   6  12  18   1  23  58   1   4   6  22  19  21
##  [37]   4   2  13   1   6   9   7  70   2   9   5   4  23  14  13  13  16  28
##  [55]   4  20   4  16  14  40  24  17  25  19   2   4   9  40   6   1  12   3
##  [73]   2  10   7   4   8   3   4   6   6   6  13   0   6   1   9  14   1   3
##  [91]  11  16   2   1   3  12   5  12   3   7   3   6   9  15   3   4  15   4
## [109]  18   2   1   2   6   5   6   3   1   5   2   2  10   1   5   2   1   3
## [127]   2  14   8   1   4   2   7   2   2  13   8   6   4   3   3   9   6  12
## [145]   1   2  12   8   1   2   1   2   0   6   9   2   8   7   4   3  12   3
## [163]  10   1   5   6   3   2   5   7   6   6   6   1   0   8   6   5   6   1
## [181]   1   0   9   9  13   2   0   3   0   4   3   2  11   1   4   5   6  16
## [199]   8   3  11  13   2   2  12   2   7   2   1   2   4   7   1   2   5   2
## [217]   6   2  13   1   2   1  15   2   1   8   1   2   1   3   7   3   1   0
## [235]   3   3   1   2   2   2   3   4   3   1   3   5   6   3   7   3   1   1
## [253]   1   1   2   2   1   4   3   1   1   2   0   2   1   4   2   2   3   1
## [271]   2   1   0   1   4   4   5   5   4   3   3   1   1   1   4   0   1   2
## [289]   3   1   1   1   1   1   1   1   2   3   2   3   3   4   2   2   1   0
## [307]   3   0   1   1   1   1   1   2   2   1   5   2   2   3   1   1   2   0
## [325]   1   3   1   1   6   2   4   1   2   0   2   3   1   3   1   2   2   1
## [343]   1   1   1   2   3   1   1   1   1   1   2   3   3   2   2   1   1   4
## [361]  20   1   1   1   1   2   1   1   1   1   1   1   1   1   1   3   2   2
## [379]   2   1   1   2   1   1   1   1   1   2   1   1   1   1   1   1   1   1
## [397]   3   1   2   1   1   1   2   1   1   3   1   1   2   3   1   1   1   1
## [415]   2   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1  38
## [433]   1   2   1   1   1   1   1   1   0   0   0 106  56
## 
## $centralization
## [1] 0.2259389
## 
## $theoretical_max
## [1] 197580
centr_degree(dlt1_network, mode = "in")
## $res
##   [1]  20   2   2   2  16   9  32  13   2   8  47   6  20   5  13   2   2   0
##  [19]  44   1   2   8   6  21   6  22  13   0  12  32   0  11  17  17  15  26
##  [37]   7   7   5   0  29  10   1  47   1   2   0   2  19  16   6   4  19  14
##  [55]   0   4   7  23   7  25  29  16  11  26   1   4  21  21   4   3   1   3
##  [73]   0   6   3   1   3   3   0   1   3   1   1   5   1   0   3  16   0   1
##  [91]   7  17   1   6   4   0   0  16   3  22   9   0   5   6   2   2   4   0
## [109]   4   2   0   3   4   6  20  32   5   1   5   1   1   2   0   0   0   0
## [127]   0  10   6   0   1   4   2   0   0  12  22   3   0   0   2   5   0   9
## [145]   1   1   1   0   0   2   1   3   3   4   9   1   3   8   1   0   6   4
## [163]   2   0   3   0  11   0   0   2   1   2   3   1   5   6   9   3   0   0
## [181]   2  10   3   3   1   0   3   1   3   1   1  16  11   5   8   0   1  20
## [199]   6   2  11   0  10   0   5   1   9   5   2   0   6   5   0   0   0   5
## [217]   7   3  17   0   8   1  24   0   0   7   1   0   0   0   0   0   0  37
## [235]   1   0   0   0   1   0   0   0   5   0   0   1   2   6   5   1   4   2
## [253]   2   1   0   3   3   1   0   0   1   2   1   0   3   1   0   7   0   1
## [271]   2   1   4   0   1   1   1   0   8   0   5   0   0   1   2   2   3   0
## [289]   0   0   0   1   2   0   4   0   0   0   0  12  11   1   5   0   1   4
## [307]   3   8   0  29   0   0   0   0   0   0   1   2   2   0   1   4   1   4
## [325]   1   0   0   0   3   1   2   0   0   2   4   9   3   1   1   1   9   3
## [343]   1   1   2   1   2   0   0   5   5   0   0   0   1   3   0   1   0   0
## [361]   1   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
## [379]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
## [397]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   1   0
## [415]   0   0   0   0   0   0   0   3   0   0   0   0   0   0   0   0   0   5
## [433]   1   1   0   0   1   1   1   0   0   0   0 475 276
## 
## $centralization
## [1] 1.05702
## 
## $theoretical_max
## [1] 197580
centr_degree(dlt2_network, mode = "out")
## $res
##   [1]   0   0   1   0   0   4   4   0   0   1   2   1   0   9   0   0   2   1
##  [19]   7   5   2   3  66   5   0  35   1  21   2  26   0  16  15   5   0   1
##  [37]   4   6   0   3  24   0   9   3   0   2   0   1   0   0   2   3   3   0
##  [55]   0   1   1   0   2   2   0   1  11   4   0   1   1   1   4   4   0   4
##  [73]   1   2   6   1   3   0   0   0   1   1   6   2   0   1   7   2   0   2
##  [91]   1   1   7   1   1   0   0  20   1   9   1   0   0   0   0   1   2   2
## [109]   1  14   4   7   0   7   0   0   2   0  34   3   1   5   0   7  37   3
## [127]   1   5   4   6   1   1   2   1  21   0  25   0   1   2   0  22   0   1
## [145]   1   0   3   3  10   1   1   7   1   1  12   0  16 166   1  12   4   0
## [163]   0   2   1   2   9   2   2   2   8   2   0   2   0   4   2   2   0   4
## [181]   2   2  64   9   3  23   5   1  10   7   0   1   0   0  13  10   6   6
## [199]   0   6   0   0   3   0   0   0  12   9   0   1   0  14  12  15   1   3
## [217]   1   1   0   0   0   6  43   3   0   2   2   0  27   1   0   2  14   1
## [235]   1   2   0   0   1   0  10   0   0   3   2  23   0   0   0   0   1   0
## [253]   1   0   7   1   2   1   0   1   1   0   2   5   5  18  32   5   0   1
## [271]  17   7   2   2   1   0  12   2   0  14   1   6   2   1   3   1   0  19
## [289]   3   0   0  59   0   0   0   2   1   4   2   0   9 101  34   8   1   0
## [307]  13   0   7  23   0   1   7   0   0   4  12  11   0   0  11   2   0   0
## [325]   0   3   0   2   9   0   2   1   7   0  17   7   4   0   3   4   3  25
## [343]   0   8   4   4  17   5   2   0   1   0   0   1   0   0   3  17   0   7
## [361]  37  12   1   1   1   0   4   0   1   0   2   7   1  19   8   0   0  10
## [379]   4   4   6   3   1   4   1   0  29  29   0   0   0   1   1   1   3  22
## [397]   0   6   0   0   6   1   2   1  14   2   2   1   2   0  17   1   1   1
## [415]   1   0  26   0  14   1   2  33   8   0   1   8   0   7   3   6   1   2
## [433]  12   1   0  27  28   0   0   2   0   1   0   0   7   1   8   0   0   1
## [451]   0   1   6   0   7   0  20   1   2  35   0   0   6   1   0   4   1   1
## [469]   0   0   7   1   0   4   0   0  17   0   1   1   7   6   8   2  21   4
## [487]   0   1   0   0   6   0
## 
## $centralization
## [1] 0.3273889
## 
## $theoretical_max
## [1] 241572
centr_degree(dlt2_network, mode = "in")
## $res
##   [1]   0   1   3   4   0   3   1   3   0   4   2   1   8   5   0   0  19   1
##  [19]   9   5   0   3  81   1   0  21   0   9   1  17   0  15  26   6   5   0
##  [37]   0  27   0  14  23   1  22   3   0   2   0   1   8   1   1   6   1   1
##  [55]   1   1   0   0   4   3   1   2  29   0   0   0   0   2   3   2   1   3
##  [73]   0   6   1   0   1   0   0   1   0   1  14   7   0   0   0   1   0   9
##  [91]   0   1   3   6   1   1   1   8   0   6   5   1   1   0   0   4   9   0
## [109]   1   2   1   3   0   2   0   1   3   4  14   0   0   2   2   4  40   2
## [127]   4   2   1   1   1   1   2   2  22   0  12   1   0   0   0  16   1   0
## [145]   0   0   3   1   5   2   0   2   0   0   7   5  29  90   0  13  10   2
## [163]   0   1   1   0  12   0   5   7   7   0   1   1   0  17   2  13   1   1
## [181]   3   0  40   2   1  34   2   7   9   7   0   1   0   0  16   3  18   6
## [199]   1  10   0   2   3   0   1   1   1  14   2   0   1   4  22  17   0   9
## [217]   2   1   0   5   1   0  29   2   0   3   1   0  36   0   1   0   7   0
## [235]   1   2   1   0   2   2   2   1   0   5  41   2   0   0   0   2   1   0
## [253]   1   0  15   1   8   0   0   1   0   0   1   1   1   8  28   1   3   2
## [271]  13   2   3   1   0   0   4   0   3   5   2   0   1   4   2   0   8   2
## [289]   0   0   1  17   4   0   0   3   0   2   0  15   5 430  18   4   0   2
## [307]   1   2   5  14   1   0   0   1   0   3   7   4   1   0  17   9   2   1
## [325]   0   3   0   9  24   0   1   1   5   3   2  16   3   1   0   1   5   5
## [343]   1   5   2   0   1   6   0   3   2   0   1   0   4   3   3   9   1   0
## [361]  31   2   0   0   0   1  11   0   1   1   3   2   3   2   5   1   0   6
## [379]   2   1   4   2   1   2   0   1  26  32   2   0   1   0   0   7   0   9
## [397]   1   2   1   0   1   0   6   0   1   0   7   0   1   2  14   1   5   1
## [415]   0   1   6   0  17   1  10   7   7   2   0   6   1  10   1   5   1   0
## [433]   6   6   1  13  10   0   0   3   2   0   0   0  13   0   6   1   1   0
## [451]   2   0   3   3   9   0   8   3   5  14   1   3   1   0   1   5   0   0
## [469]   0   1   5   0   0   6   7   0  27   1   1   2  11   0   8   3  11  11
## [487]   0   0   1   1   3   1
## 
## $centralization
## [1] 0.8650671
## 
## $theoretical_max
## [1] 241572
dlt1_network <- dlt1_network |>
  activate(nodes) |>
  mutate(in_degree = centrality_degree(mode = "in"))

dlt1_network
## # A tbl_graph: 445 nodes and 2529 edges
## #
## # A directed multigraph with 4 components
## #
## # A tibble: 445 × 14
##   uid   facilitator role1  experience experience2 grades location region country
##   <chr> <chr>       <chr>       <dbl> <chr>       <chr>  <chr>    <chr>  <chr>  
## 1 1     0           libme…          1 6 to 10     secon… VA       South  US     
## 2 2     0           class…          1 6 to 10     secon… FL       South  US     
## 3 3     0           distr…          2 11 to 20    gener… PA       North… US     
## 4 4     0           class…          2 11 to 20    middle NC       South  US     
## 5 5     0           other…          3 20+         gener… AL       South  US     
## 6 6     0           class…          1 4 to 5      gener… AL       South  US     
## # ℹ 439 more rows
## # ℹ 5 more variables: group <chr>, gender <chr>, expert <chr>, connect <chr>,
## #   in_degree <dbl>
## #
## # A tibble: 2,529 × 9
##    from    to timestamp    discussion_title  discussion_category parent_category
##   <int> <int> <chr>        <chr>             <chr>               <chr>          
## 1   360   444 4/4/13 16:32 Most important c… Group N             Units 1-3 Disc…
## 2   356   444 4/4/13 18:45 Most important c… Group D-L           Units 1-3 Disc…
## 3   356   444 4/4/13 18:47 DLT Resources—Co… Group D-L           Units 1-3 Disc…
## # ℹ 2,526 more rows
## # ℹ 3 more variables: discussion_identifier <chr>, comment_id <chr>,
## #   discussion_id <chr>
dlt1_network |>
  as_tibble()
## # A tibble: 445 × 14
##    uid   facilitator role1 experience experience2 grades location region country
##    <chr> <chr>       <chr>      <dbl> <chr>       <chr>  <chr>    <chr>  <chr>  
##  1 1     0           libm…          1 6 to 10     secon… VA       South  US     
##  2 2     0           clas…          1 6 to 10     secon… FL       South  US     
##  3 3     0           dist…          2 11 to 20    gener… PA       North… US     
##  4 4     0           clas…          2 11 to 20    middle NC       South  US     
##  5 5     0           othe…          3 20+         gener… AL       South  US     
##  6 6     0           clas…          1 4 to 5      gener… AL       South  US     
##  7 7     0           inst…          2 11 to 20    gener… SD       Midwe… US     
##  8 8     0           spec…          1 6 to 10     secon… BE       Inter… BE     
##  9 9     0           clas…          1 6 to 10     middle NC       South  US     
## 10 10    0           scho…          2 11 to 20    middle NC       South  US     
## # ℹ 435 more rows
## # ℹ 5 more variables: group <chr>, gender <chr>, expert <chr>, connect <chr>,
## #   in_degree <dbl>
ggraph(dlt1_network,layout = "fr") +
  geom_edge_link(alpha = .2) +
  geom_node_point(aes(size = in_degree, color = role1)) +
  theme_graph()

#
dlt2_network <- dlt2_network |>
  activate(nodes) |>
  mutate(in_degree = centrality_degree(mode = "in"))

dlt2_network |>
  as_tibble()
## # A tibble: 492 × 14
##      uid facilitator role  experience2 experience grades location region country
##    <dbl>       <dbl> <chr>       <dbl>      <dbl> <chr>  <chr>    <chr>  <chr>  
##  1     1           0 curr…           2         17 gener… IN       Midwe… US     
##  2     2           0 other           1          3 prima… NC       South  US     
##  3     3           0 inst…           2         20 gener… US       South  US     
##  4     4           0 inst…           2         12 middle TX       South  US     
##  5     5           0 other           1          0 gener… CAN      Inter… CA     
##  6     6           0 inst…           1          7 gener… CAN      Inter… CA     
##  7     7           0 oper…           1          6 gener… RI       North… US     
##  8     8           0 curr…           2         12 middle ME       North… US     
##  9     9           0 other           2         11 gener… VA       South  US     
## 10    10           0 inst…           3         21 gener… WV       South  US     
## # ℹ 482 more rows
## # ℹ 5 more variables: group <chr>, gender <chr>, expert <chr>, connect <chr>,
## #   in_degree <dbl>
ggraph(dlt2_network,layout = "fr") +
  geom_edge_link(alpha = .2) +
  geom_node_point(aes(size = in_degree, color = role)) +
  theme_graph()

#Density
edge_density(dlt1_network) #very low density
## [1] 0.01279988
graph.density(dlt1_network)
## [1] 0.01279988
edge_density(dlt2_network) # very low density as well
## [1] 0.0106966
graph.density(dlt2_network)
## [1] 0.0106966
#Reciprocity
reciprocity(dlt1_network) #very low .1997
## [1] 0.1997544
reciprocity(dlt2_network)
## [1] 0.2500977
#
dlt1_network <- dlt1_network |>
  activate(edges) |>
  mutate(reciprocated = edge_is_mutual())

dlt1_network
## # A tbl_graph: 445 nodes and 2529 edges
## #
## # A directed multigraph with 4 components
## #
## # A tibble: 2,529 × 10
##    from    to timestamp    discussion_title  discussion_category parent_category
##   <int> <int> <chr>        <chr>             <chr>               <chr>          
## 1   360   444 4/4/13 16:32 Most important c… Group N             Units 1-3 Disc…
## 2   356   444 4/4/13 18:45 Most important c… Group D-L           Units 1-3 Disc…
## 3   356   444 4/4/13 18:47 DLT Resources—Co… Group D-L           Units 1-3 Disc…
## 4   344   444 4/4/13 18:55 Most important c… Group O-T           Units 1-3 Disc…
## 5   392   444 4/4/13 19:13 Most important c… Group U-Z           Units 1-3 Disc…
## 6   219   444 4/4/13 19:16 Most important c… Group M             Units 1-3 Disc…
## # ℹ 2,523 more rows
## # ℹ 4 more variables: discussion_identifier <chr>, comment_id <chr>,
## #   discussion_id <chr>, reciprocated <lgl>
## #
## # A tibble: 445 × 14
##   uid   facilitator role1  experience experience2 grades location region country
##   <chr> <chr>       <chr>       <dbl> <chr>       <chr>  <chr>    <chr>  <chr>  
## 1 1     0           libme…          1 6 to 10     secon… VA       South  US     
## 2 2     0           class…          1 6 to 10     secon… FL       South  US     
## 3 3     0           distr…          2 11 to 20    gener… PA       North… US     
## # ℹ 442 more rows
## # ℹ 5 more variables: group <chr>, gender <chr>, expert <chr>, connect <chr>,
## #   in_degree <dbl>
ggraph(dlt1_network, layout = "linear", circular = TRUE) +
  geom_node_point(aes(size = in_degree)) +
  geom_edge_link(aes(color = reciprocated),
                 alpha = .2) +
  theme_graph()

dlt2_network <- dlt2_network |>
  activate(edges) |>
  mutate(reciprocated = edge_is_mutual())

dlt2_network
## # A tbl_graph: 492 nodes and 2584 edges
## #
## # A directed multigraph with 69 components
## #
## # A tibble: 2,584 × 10
##    from    to timestamp title             category parent description comment_id
##   <int> <int> <chr>     <chr>             <chr>    <chr>  <chr>            <dbl>
## 1    37   461 9/27/13   Greetings from N… Introdu… Group… Please int…          3
## 2   434   434 9/27/13   Sherry Hahn       Introdu… Group… Please int…          4
## 3   302   434 9/27/13   Sherry Hahn       Introdu… Group… Please int…          5
## 4    60   434 9/27/13   Sherry Hahn       Introdu… Group… Please int…          7
## 5   128   434 9/29/13   Sherry Hahn       Introdu… Group… Please int…         38
## 6   158   434 9/30/13   Sherry Hahn       Introdu… Group… Please int…         75
## # ℹ 2,578 more rows
## # ℹ 2 more variables: discussion_id <chr>, reciprocated <lgl>
## #
## # A tibble: 492 × 14
##     uid facilitator role   experience2 experience grades location region country
##   <dbl>       <dbl> <chr>        <dbl>      <dbl> <chr>  <chr>    <chr>  <chr>  
## 1     1           0 curri…           2         17 gener… IN       Midwe… US     
## 2     2           0 other            1          3 prima… NC       South  US     
## 3     3           0 instr…           2         20 gener… US       South  US     
## # ℹ 489 more rows
## # ℹ 5 more variables: group <chr>, gender <chr>, expert <chr>, connect <chr>,
## #   in_degree <dbl>
ggraph(dlt2_network, layout = "linear", circular = TRUE) +
  geom_node_point(aes(size = in_degree)) +
  geom_edge_link(aes(color = reciprocated),
                 alpha = .2) +
  theme_graph()

#

#diameter & distance
diameter(dlt1_network)
## [1] 8
diameter(dlt2_network)
## [1] 8
mean_distance(dlt1_network)
## [1] 3.030694
mean_distance(dlt2_network)
## [1] 3.03815
#transitivity
transitivity(dlt1_network) #very small. 8%
## [1] 0.08880774
transitivity(dlt2_network) # 12%
## [1] 0.1248291

Narrative

  • When I compared the DLT1 and DLT2 networks, DLT1 has higher centrality(64%) and in-degree, which may mean that only specific few people were receiving more responses than others. DLT2 network is less centralized (53%) has higher out-degree than in-degree, which may mean that more people are interacting and responded to broader population in the group. Other than that I didn’t see any distinct differences in terms of network density, transitivity (DLT2 has 4% higher transitivity), network diameter, or reciprocity (also, DLT2 has 5% higher). Visually “ggplot” with layout = “linear”, circular = TRUE allowed me to see the mathematical differences I mentioned above a bit more clearly than other visualization support.

To receive credit for this assignment and earn your first SNA LASER Badge, you will first need to knit and publish this page to Posit Cloud. Next, share the link to published webpage under one of the Badge Artifact columns on the 2023 LASER Scholar Information and Documents spreadsheet: https://go.ncsu.edu/laser-sheet. Once your instructor has checked your link, you will be provided a physical version of the badge pictured at the top of this document!