Week 8

Dad Joke

What is brown and sticky?

A stick.

Housekeeping

  • Social Search assignment
    • Try to find someone with driver’s license from HI
    • No group texts
    • Diagram search network
    • Instructions on website

Also upcoming

  • Visualization Challenge
    • Start from existing dataset (Dutch school student behavior or Harry Potter)
    • Come up with a question
    • Create a network visualization that helps to answer that question
    • Working in pairs is great

Anatomy of ggraph

G |> 
activate(nodes) |> 
mutate(centrality = centrality_eigen()) |> 
ggraph(layout = 'kk') + 
geom_edge_fan(aes(width=weight), color = 'gray') + 
geom_node_point(aes(size=centrality), color = 'gold')

Loads the graph, which is stored as the variable G (the |> sends the output to the next line)

Selects the nodes “spreadsheet” to edit. To activate the edges, run activate(edges)

Calculates the eigenvector centrality and saves it as a new column in the nodes spreadsheet. Note that we keep using |> until we get to ggraph()

Tells R we want to take the network and make a plot from it. This is where we set the layout

Remember to add edges first.

The first argument is the “aesthetic mapping” - this maps aspects of the plot to variables in your data. In this case, we change the width of the edges based on the variable “weight”, which must be in our edges “spreadsheet”

We can also change the look of the plot universally. These options go outside of aes()

This code does similar operations to the nodes. It changes the size based on the centrality (which we calculated and defined in line 3) and changes the color of all nodes to gold

Review Questions

  • What is a “path”? What is the “path length” of a path?
  • What is the “geodesic distance” or “diameter” of a network?
  • What is triadic closure?
  • Why would we expect networks with high triadic closure to have high geodesic distance?
  • What was the Travers and Milgram experiment?
  • How can we have such high triadic closure but still have short path lengths? What was the key insight from Watts and Strogatz?

Questions from 3-2-1s

  • The video also mentioned that you are likely to be connected to someone in Manila as you are to someone in your hometown.
  • What is the exact definition of a groupy network? Is it just the nature of most networks that exist in the real world?

R Co-working time