Session Ready
Exercise

Visualize nodes by degree

Now that we've taken a look at our graph and explored some of the basic properties of it, let's think a bit more about our network. We observed that there are some highly connected nodes and many outlier points. We visualize this by conditionally plotting the graph and coloring some of the nodes by in and out degree. Let's think about the nodes as three different types:

  • high retweeters and highly retweeted.
  • users who retweeted only once (have an in-degree of 0 and an out-degree of 1).
  • users who were retweeted only once (have an in-degree of 1 and an out-degree of 0).

This will help us get more information about what's going on in the ring around the cluster of highly connected nodes.

Instructions 1/3
undefined XP
  • 1
  • 2
  • 3
  • Calculate the "in" degree distribution of retweet_graph.
  • Do the same for the "out" degrees.
  • Make the condition where people tweeted once but never retweeted. They have "in" degree one and "out" degree zero.
  • Make the condition where people never tweeted but retweeted once. They have "in" degree zero and "out" degree one.