For the final project, you might want to use some data from an actual company to showcase the sort of analysis that you could do for the organization that you choose to focus on.

There is a great set of network data at https://github.com/schochastics/networkdata. You can install all of them with the following (you will only need to run this once - uncomment these lines, run them, and after that comment them out with # like I do below).

#install.packages('drat')
#drat::addRepo("schochastics")
#install.packages("networkdata")

After it’s installed, we load it and set options

knitr::opts_chunk$set(echo = TRUE)
library(networkdata)
library(igraph)
library(tidyverse)
library(ggraph)
library(tidygraph)

The data we want is stored in three igraph networks that came from observing and surveying managers in a high-tec company. They are called ht_advice, ht_friends, and ht_reports.

There are a few other data sources that might be interesting to you - you can look at all of them by running data(package = "networkdata")

I am giving some basic examples of some simple things you could do. I expect you to be creative and insightful, and to build on what I am doing.

Not all of your “visualizations” need to be network graphs. For example, this is one way to prepare a report about who is influential.

ht_advice <- ht_advice %>% as_tbl_graph() %>%
  activate(nodes) %>%
  mutate(betweenness = centrality_betweenness(),
         degree = centrality_degree(mode='in'),
         closeness = centrality_closeness(mode='in', normalized=T)
         )

ht_advice %>%
  select(betweenness, degree, closeness) %>%
  data.frame() %>%
  arrange(desc(betweenness))

You already know how to change the size/color of nodes based on one of these measures.

ht_advice %>%
  ggraph() + 
  geom_edge_fan(color='gray') +
  geom_node_point(aes(color=betweenness), size = 3) +
  scale_color_viridis_c() +
  theme_graph()
## Using `stress` as default layout