Session Ready
Exercise

Visualize the degree centrality distribution of the forums projection

This exercise is also to reinforce the concepts of degree centrality and projections. This time round, you'll plot the degree centrality distribution for the 'forum' projection. Follow the same steps as in the previous exercise!

Instructions
100 XP
  • Get the nodes of the 'forum' partition into a list called forum_nodes.
  • Create the forums nodes projection as a graph called G_forum.
  • Calculate the degree centrality of G_forum using nx.degree_centrality(). Store the result as dcs.
  • Plot the histogram of degree centrality values.