Get startedGet started for free

Comparing mention and retweet graph

By looking at the ratio of in degree to out degree, we can learn something slightly different about each network. In the case of a retweet network, it will show us users who are often retweeted but don't retweet (high values), or those who often retweet but aren't retweeted (low values). Similarly, if you have a in/out ratio of close to 1 in a mention graph, then the conversation is relatively equitable. However, a low ratio would imply that a given user often starts conversations but they aren't responded to. When you compare the density plots of the different networks, consider what you'd expect. Which network do you expect to be more skewed and which do you expect to have a ratio closer to 1?

This exercise is part of the course

Case Studies: Network Analysis in R

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Read this code
mention_data <- data_frame(
  graph_type = "mention",
  degree_in = degree(mention_graph, mode = "in"),
  degree_out = degree(mention_graph, mode = "out"),
  io_ratio = degree_in / degree_out
)

# Create a dataset of retweet ratios from the retweet_graph
retweet_data <- data_frame(
  graph_type = "___",
  degree_in = degree(___, mode = "___"),
  degree_out = degree(___, mode = "___"),
  io_ratio = degree_in / degree_out
)
Edit and Run Code