Let’s start by installing the packages that we’re going to use to analyze our data, knowing that we want to conduct social network analysis and that we want to create sophisticated sociograms. We’ll need the following packages:
{tidyverse} which offers multiple R packages
{tidygraph} for working with relational data
{ggraph} to support network visualizations
{readxl} for easier importing from Excel
library(tidyverse)
library(tidygraph)
library(ggraph)
library(readxl)
For this independent analysis, I’ll be using the two datasets from the Social Network Analysis and Education companion site that were already included in the ‘data’ folder for this project. We also used them during the Unit 1 Case Study. Let’s start by reading each of the documents into R:
student-reported-friends, which will become student_friends and contains data reported by the students on their various social relationships with each other
teacher-reported-friends, which will become teacher_friends and contains data reported by the teacher on various social relationships between the students
student_friends <- read_excel("data/student-reported-friends.xlsx",
col_names = FALSE)
teacher_friends <- read_excel("data/teacher-reported-friends.xlsx",
col_names = FALSE)
student_friends_valued <- read_excel("data/student-reported-valued.xlsx",
col_names = FALSE)
One of the questions I had during the case study was whether there was any relationship between a student’s gender or achievement level with the accuracy of the teacher’s identification of that student’s friendships. With that in mind, I formalized the following questions:
Are there visible patterns between level of achievement and the accuracy of the teacher’s reporting?
Are there visible pattern between gender and the accuracy of the teacher’s reporting?
Before starting to explore our data, we’ll want to do some of the same wrangling and clean-up that we used in the case study (which makes sense, since we’re using the same data.) First, we need to assign row and column names to our student_friends data frame. Then, we can read in the existing student_attributes and student_edges documents to provide us the information we need to build out the matrix, nodes, and edges that will form the basis of our network analysis.
rownames(student_friends) <- 1:27
colnames(student_friends) <- 1:27
student_attributes <- read_excel("data/student-attributes.xlsx")
student_edges <- read_csv("data/student-edges.csv")
student_matrix <- as.matrix(student_friends)
student_network <- as_tbl_graph(student_matrix,
directed = TRUE)
student_network <- tbl_graph(edges = student_edges,
nodes = student_attributes,
directed = TRUE)
student_attributes
## # A tibble: 27 × 5
## id gender achievement gender_num achievement_num
## <dbl> <chr> <chr> <dbl> <dbl>
## 1 1 female high 1 1
## 2 2 male average 0 2
## 3 3 female average 1 2
## 4 4 male high 0 1
## 5 5 female average 1 2
## 6 6 female average 1 2
## 7 7 female high 1 1
## 8 8 female average 1 2
## 9 9 female high 1 1
## 10 10 male low 0 3
## # … with 17 more rows
student_edges
## # A tibble: 203 × 3
## from to weight
## <dbl> <dbl> <dbl>
## 1 1 2 1
## 2 1 4 1
## 3 1 5 1
## 4 1 6 1
## 5 1 7 1
## 6 1 8 1
## 7 1 9 1
## 8 1 12 1
## 9 1 17 1
## 10 1 21 1
## # … with 193 more rows
student_matrix
## 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
## 1 0 1 0 1 1 1 1 1 1 0 0 1 0 0 0 0 1 0 0 0 1 0 1 0 1 0 1
## 2 1 0 0 0 1 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0
## 3 1 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## 4 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0
## 5 1 1 0 1 0 1 1 1 1 0 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 0 1
## 6 1 0 0 0 1 0 0 0 1 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0
## 7 1 0 1 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0
## 8 1 0 1 1 1 0 1 0 1 1 1 0 1 0 0 0 0 0 0 0 1 0 0 1 1 1 1
## 9 1 0 0 0 0 1 1 0 0 0 1 0 1 0 0 0 0 1 0 1 1 0 1 1 1 1 1
## 10 1 1 1 1 1 0 1 1 0 0 1 1 1 0 0 0 1 0 0 0 1 1 0 0 0 0 1
## 11 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 0 0 1 0 1 1 0 1 0 1 0 1
## 12 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1
## 13 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1
## 14 0 0 0 1 0 1 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0
## 15 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
## 16 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0
## 17 1 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0
## 18 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0
## 19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## 20 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
## 21 1 1 0 1 1 0 1 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 1 1 1
## 22 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 1 0
## 23 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
## 24 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
## 25 1 0 0 0 1 0 0 0 1 0 1 1 0 0 0 0 0 1 0 0 1 1 1 0 0 0 1
## 26 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0
## 27 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 0 0 0 1 0 0 1 0 1 0 0
student_network
## # A tbl_graph: 27 nodes and 203 edges
## #
## # A directed simple graph with 2 components
## #
## # Node Data: 27 × 5 (active)
## id gender achievement gender_num achievement_num
## <dbl> <chr> <chr> <dbl> <dbl>
## 1 1 female high 1 1
## 2 2 male average 0 2
## 3 3 female average 1 2
## 4 4 male high 0 1
## 5 5 female average 1 2
## 6 6 female average 1 2
## # … with 21 more rows
## #
## # Edge Data: 203 × 3
## from to weight
## <int> <int> <dbl>
## 1 1 2 1
## 2 1 4 1
## 3 1 5 1
## # … with 200 more rows
We’ll also assign row names and column names for our teacher_friends data frame. I could have generated a new teacher_edges document, but since I had already done so in the case study, I simply uploaded the document into this project as well. Then we build the matrix, edges, and nodes that we will need to analyze the teacher-identified network.
rownames(teacher_friends) <- 1:27
colnames(teacher_friends) <- 1:27
teacher_edges <- read_csv("data/teacher-edges-AE.csv")
teacher_matrix <- as.matrix(teacher_friends)
teacher_network <- as_tbl_graph(teacher_matrix,
directed = TRUE)
teacher_network <- tbl_graph(edges = teacher_edges,
nodes = student_attributes,
directed = TRUE)
teacher_edges
## # A tibble: 69 × 3
## from to weight
## <dbl> <dbl> <dbl>
## 1 1 4 1
## 2 1 12 1
## 3 1 27 1
## 4 2 3 1
## 5 2 8 1
## 6 2 10 1
## 7 2 16 1
## 8 2 22 1
## 9 3 2 1
## 10 3 8 1
## # … with 59 more rows
teacher_matrix
## 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
## 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
## 2 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0
## 3 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0
## 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0
## 5 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1
## 6 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## 7 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## 8 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0
## 9 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
## 10 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0
## 11 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
## 12 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
## 13 1 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
## 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
## 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
## 16 0 1 1 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
## 17 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
## 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
## 19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## 21 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
## 22 0 1 1 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
## 23 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## 24 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
## 25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
## 26 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## 27 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
teacher_network
## # A tbl_graph: 27 nodes and 69 edges
## #
## # A directed simple graph with 6 components
## #
## # Node Data: 27 × 5 (active)
## id gender achievement gender_num achievement_num
## <dbl> <chr> <chr> <dbl> <dbl>
## 1 1 female high 1 1
## 2 2 male average 0 2
## 3 3 female average 1 2
## 4 4 male high 0 1
## 5 5 female average 1 2
## 6 6 female average 1 2
## # … with 21 more rows
## #
## # Edge Data: 69 × 3
## from to weight
## <int> <int> <dbl>
## 1 1 4 1
## 2 1 12 1
## 3 1 27 1
## # … with 66 more rows
Reflecting on my research questions, I decided that I also wanted a data frame that contained all of the attributes that might be relevant in answering them. That meant collecting, generating, or reorganizing a few different variables:
Creating edges_count values for both the “from” (how many friends student X said they had) and “to” (how many students said student X was their friend)
I would need to create this for both the teacher_edges (or teacher-reported network) and the student_edges (or student-reported network)
This would then allow me to calculate the difference in number of friendships (how many the teacher said a student had VS. how many a student said they had)
After creating both teacher_edges_count and student_edges_count, I wanted to join them together in a full_attributes data frame along with key information from the original student_attributes dataset (e.g. gender, achievement, etc.)
To do this, I needed to carefully use either the ‘to’ or ‘from’ columns (whichever one was being counted at the time) to generate a new ‘id’ column so that I could later join all of the datasets together into one large data frame. It’s during this process that I also noticed that student #19 had no data listed in either the student network or the teacher-identified network, so I would need to pay attention during joining to make sure this student didn’t get lost.
teacher_edges_count_from <- teacher_edges |>
count(from) |>
mutate("id" = from) |>
mutate("teacher_count_from" = n)
teacher_edges_count_to <- teacher_edges |>
count(to) |>
mutate("id" = to) |>
mutate("teacher_count_to" = n)
teacher_edges_count_from
## # A tibble: 25 × 4
## from n id teacher_count_from
## <dbl> <int> <dbl> <int>
## 1 1 3 1 3
## 2 2 5 2 5
## 3 3 5 3 5
## 4 4 2 4 2
## 5 5 4 5 4
## 6 6 1 6 1
## 7 7 1 7 1
## 8 8 5 8 5
## 9 9 2 9 2
## 10 10 5 10 5
## # … with 15 more rows
teacher_edges_count_to
## # A tibble: 23 × 4
## to n id teacher_count_to
## <dbl> <int> <dbl> <int>
## 1 1 4 1 4
## 2 2 5 2 5
## 3 3 5 3 5
## 4 4 3 4 3
## 5 5 3 5 3
## 6 7 1 7 1
## 7 8 5 8 5
## 8 9 3 9 3
## 9 10 5 10 5
## 10 11 2 11 2
## # … with 13 more rows
student_edges_count_from <- student_edges |>
count(from) |>
mutate("id" = from) |>
mutate("count_from" = n)
student_edges_count_to <- student_edges |>
count(to) |>
mutate("id" = to) |>
mutate("count_to" = n)
student_edges_count_from
## # A tibble: 26 × 4
## from n id count_from
## <dbl> <int> <dbl> <int>
## 1 1 13 1 13
## 2 2 6 2 6
## 3 3 4 3 4
## 4 4 5 4 5
## 5 5 17 5 17
## 6 6 7 6 7
## 7 7 6 7 6
## 8 8 14 8 14
## 9 9 13 9 13
## 10 10 14 10 14
## # … with 16 more rows
student_edges_count_to
## # A tibble: 26 × 4
## to n id count_to
## <dbl> <int> <dbl> <int>
## 1 1 16 1 16
## 2 2 7 2 7
## 3 3 4 3 4
## 4 4 13 4 13
## 5 5 13 5 13
## 6 6 7 6 7
## 7 7 10 7 10
## 8 8 8 8 8
## 9 9 12 9 12
## 10 10 5 10 5
## # … with 16 more rows
After checking each data frame to confirm they were accurately wrangled, I started to join the data frames together. I started with the teacher_edges counts for both “to” and “from”, joining them on “id” and using the ‘select’ function to clean them up. I did the same thing with the student_edges counts before combining both the teacher_edges_count and student_edges_count with the student_attributes data frame. This created the full_attributes data frame.
I also cleaned up some of the column names to be more specific and reordered achievement to make more sense once we started to build visualizations.
teacher_edges_count <- left_join(teacher_edges_count_from, teacher_edges_count_to,
by = "id")
teacher_edges_count <- select(teacher_edges_count, id, teacher_count_from, teacher_count_to)
teacher_edges_count
## # A tibble: 25 × 3
## id teacher_count_from teacher_count_to
## <dbl> <int> <int>
## 1 1 3 4
## 2 2 5 5
## 3 3 5 5
## 4 4 2 3
## 5 5 4 3
## 6 6 1 NA
## 7 7 1 1
## 8 8 5 5
## 9 9 2 3
## 10 10 5 5
## # … with 15 more rows
student_edges_count <- inner_join(student_edges_count_from, student_edges_count_to,
by = "id")
student_edges_count <- select(student_edges_count, id, count_from, count_to)
student_edges_count
## # A tibble: 26 × 3
## id count_from count_to
## <dbl> <int> <int>
## 1 1 13 16
## 2 2 6 7
## 3 3 4 4
## 4 4 5 13
## 5 5 17 13
## 6 6 7 7
## 7 7 6 10
## 8 8 14 8
## 9 9 13 12
## 10 10 14 5
## # … with 16 more rows
full_attributes <- student_attributes |>
left_join(student_edges_count, by='id') |>
left_join(teacher_edges_count, by='id')
full_attributes$achievement <- factor(full_attributes$achievement,
levels = c("low", "average", "high"))
full_attributes
## # A tibble: 27 × 9
## id gender achievement gender_num achieve…¹ count…² count…³ teach…⁴ teach…⁵
## <dbl> <chr> <fct> <dbl> <dbl> <int> <int> <int> <int>
## 1 1 female high 1 1 13 16 3 4
## 2 2 male average 0 2 6 7 5 5
## 3 3 female average 1 2 4 4 5 5
## 4 4 male high 0 1 5 13 2 3
## 5 5 female average 1 2 17 13 4 3
## 6 6 female average 1 2 7 7 1 NA
## 7 7 female high 1 1 6 10 1 1
## 8 8 female average 1 2 14 8 5 5
## 9 9 female high 1 1 13 12 2 3
## 10 10 male low 0 3 14 5 5 5
## # … with 17 more rows, and abbreviated variable names ¹achievement_num,
## # ²count_from, ³count_to, ⁴teacher_count_from, ⁵teacher_count_to
Once I had the full_attributes data frame, I wanted to also add columns that displayed the difference in value between the number of friendships that the teacher said a student had, and the number of friendships that the students reported. I decided to do this for both the ‘from’ counts (teacher_count_from - count_from) and the ‘to’ counts (teacher_count_to - count_to).
After scanning the resulting values, it was not surprising to see that the teacher had consistently under-counted the number of friendships each student had. It makes sense that on average, the values returned for the difference between the networks would be negative. Each individual student has a more comprehensive view of their relationships in the network than the teacher would have as an observer of that network.
full_attributes <- full_attributes |>
mutate("from_diff" = teacher_count_from - count_from)
full_attributes <- full_attributes |>
mutate("to_diff" = teacher_count_to - count_to)
full_attributes
## # A tibble: 27 × 11
## id gender achiev…¹ gende…² achie…³ count…⁴ count…⁵ teach…⁶ teach…⁷ from_…⁸
## <dbl> <chr> <fct> <dbl> <dbl> <int> <int> <int> <int> <int>
## 1 1 female high 1 1 13 16 3 4 -10
## 2 2 male average 0 2 6 7 5 5 -1
## 3 3 female average 1 2 4 4 5 5 1
## 4 4 male high 0 1 5 13 2 3 -3
## 5 5 female average 1 2 17 13 4 3 -13
## 6 6 female average 1 2 7 7 1 NA -6
## 7 7 female high 1 1 6 10 1 1 -5
## 8 8 female average 1 2 14 8 5 5 -9
## 9 9 female high 1 1 13 12 2 3 -11
## 10 10 male low 0 3 14 5 5 5 -9
## # … with 17 more rows, 1 more variable: to_diff <int>, and abbreviated variable
## # names ¹achievement, ²gender_num, ³achievement_num, ⁴count_from, ⁵count_to,
## # ⁶teacher_count_from, ⁷teacher_count_to, ⁸from_diff
I did notice that some those ‘from_diff’ and ‘to_diff’ values were more negative than others, and I was curious to start modeling those values in context with various student attributes to see if patterns would emerge.
I decided to create two bar graphs with the full_attributes data: one that would plot the to_diff values and one that would plot the from_diff values. Both graphs would use color to differentiate the students by gender, and both graphs would be faceted across achievement levels.
to_diff_plot <- ggplot(data = full_attributes) +
geom_bar(aes(x = id, weight = to_diff, fill = gender)) +
facet_grid(.~achievement) +
labs(title="Difference in # of 'To' Friendships Per Student",
x ="Student ID", y = "Teacher Count - Student Count")
to_diff_plot
from_diff_plot <- ggplot(full_attributes) +
geom_bar(aes(x = id, weight = from_diff, fill = gender)) +
facet_grid(.~achievement) +
labs(title="Difference in # of 'From' Friendships Per Student",
x ="Student ID", y = "Teacher Count - Student Count")
from_diff_plot
to_diff_plot_gender <- ggplot(data = full_attributes) +
geom_bar(aes(x = id, weight = to_diff, fill = gender)) +
labs(title="Difference in # of 'To' Friendships Per Student",
x ="Student ID", y = "Teacher Count - Student Count")
from_diff_plot_gender <- ggplot(full_attributes) +
geom_bar(aes(x = id, weight = from_diff, fill = gender)) +
labs(title="Difference in # of 'From' Friendships Per Student",
x ="Student ID", y = "Teacher Count - Student Count")
to_diff_plot_gender
from_diff_plot_gender
The resulting graphs are interesting. At a glance, we can see that in both plots, the difference between the teacher’s observed network and the student’s reported network is the least negative for low-achieving students. The high-achieving facet for both plots is extremely negative with nearly all students reporting at least 7 friendships that the teacher did not identify.
It’s harder to observe any visible patterns by gender. For one, the gender groups are not as evenly distributed as the achievement groups. While the achievement groups are split almost equally across the 27 students (low 10/average 9/high 8), the gender balance skews female (16 female, 11 male). Compounding that, though, is the fact that there is little-to-no teacher-reported data on three male students (#18, #19, and #20). That leaves only 8 male students to compare to the 16 female students when using the differences between student-reported and teacher-reported.
However, these plots also gave me a focal point as I began to build a sophisticated sociogram to represent both of these networks. I wanted to see if there would be any visible patterns within a sociogram along gender or achievement attributes, so I made sure to build those into my visualization. There were also several students who were outliers in the bar graphs (e.g. those the teacher most accurately observed friendships for, resulting in a difference of ‘0’ - student #10, #15, #23, and #24.)
student_network_groups <- student_network |>
activate(nodes) |>
mutate(group = group_components())
teacher_network_groups <- teacher_network |>
activate(nodes) |>
mutate(group = group_components())
my_colors <- RColorBrewer::brewer.pal(5, "Greys")[2:4]
ggraph(student_network_groups, 'stress') +
geom_edge_link(arrow = arrow(length = unit(1, 'mm')),
end_cap = circle(3, 'mm'),
start_cap = circle(3, 'mm'),
alpha = .2) +
geom_node_point(aes(fill = gender,
color = achievement,
size = local_size()),
shape = 21,
stroke = 3) +
scale_color_manual(values = my_colors, limits = c("low", "average", "high")) +
geom_node_text(aes(label = id),
repel=TRUE) +
theme_graph(background = "white",
foreground = NULL) +
labs(title="Student-Reported Network")
ggraph(teacher_network_groups, 'stress') +
geom_edge_link(arrow = arrow(length = unit(1, 'mm')),
end_cap = circle(3, 'mm'),
start_cap = circle(3, 'mm'),
alpha = .2) +
geom_node_point(aes(fill = gender,
color = achievement,
size = local_size()),
shape = 21,
stroke = 3) +
scale_color_manual(values = my_colors, limits = c("low", "average", "high")) +
geom_node_text(aes(label = id),
repel=TRUE) +
theme_graph(background = "white",
foreground = NULL) +
labs(title="Teacher-Reported Network")