1. Learn
  2. /
  3. Courses
  4. /
  5. Case Studies: Network Analysis in R

Connected

Exercise

What's the distribution of centrality?

Recall that there are many ways that you can assess centrality of a graph. We will use two different methods you learned earlier: betweenness and eigen-centrality. Remember that betweenness is a measure of how often a given vertex is on the shortest path between other vertices, whereas eigen-centrality is a measure of how many other important vertices a given vertex is connected to. Before we overlay centrality on our graph plots, let's get a sense of how centrality is distributed.

Note that due to algorithmic rounding errors, we can't check for eigen-centrality equaling a specific value; instead, we check a range.

Instructions 1/2

undefined XP
  • 1
    • Use betweenness() to calculate the betweenness centrality of the directed graph retweet_graph.
    • Use summary() to get a summary of retweet_btw.
    • Use mean() to calculate the proportion of retweet_btw that is zero.
  • 2
    • Use eigen_centrality() to calculate the eigen-centrality of the directed graph retweet_graph and extract the vector element.
    • Get a summary of retweet_ec.
    • Calculate the proportion of retweet_ec that is less than almost_zero.