library(tidyverse) # data wrangling
library(igraph) # graph construction and algorithms
library(kableExtra) # nicer tables for the report
library(checkdown) # in-line knowledge checks
library(scales) # color/size scaling for the network plot
library(networkD3) # interactive D3.js force-directed graphs
library(igraph)
g5 <- graph_from_literal(
Jaason-Vanessa,
Jaason-Samuel,
Jaason-Jessica,
Jaason-Philipa,
Jaason-Joanne,
Jaason-Classmate,
Jaason-Coworker,
Samuel-Jessica,
Samuel-Philipa,
Jessica-Joanne,
Philipa-Joanne,
Classmate-Coworker,
Vanessa-Coworker
)
set.seed(580)
layout <- layout_with_fr(g5)
plot(
g5,
layout = layout_with_fr(g5),
vertex.size = 35,
vertex.color = "lightblue",
vertex.frame.color = "steelblue",
vertex.label.color = "black",
vertex.label.cex = 0.9,
vertex.label.family = "sans",
edge.color = "grey65",
edge.width = 1.5,
margin = 0.25,
main = "My Professional and Personal Social Network"
)
My social network is centered around myself, as I serve as the primary connection between family members, graduate school faculty, professional contacts, and former coworkers. Several smaller clusters exist among university faculty and coworkers, indicating strong existing relationships. The PageRank analysis identified me as the most influential node because I connect multiple groups that would otherwise have few direct connections.