Session Ready
Exercise

Betweenness centrality

Betweenness centrality for retweet and reply networks signals users who bridge between different Twitter communities. These communities may be tied together by topic or ideology.

networkx has been imported as nx. The networks G_rt and G_reply, and column_names = ['screen_name', 'betweenness_centrality'] have been loaded for you.

Instructions
100 XP
  • Calculate betweenness centrality for the retweet network using nx.betweenness_centrality().
  • Do the same for the reply network.
  • Create a DataFrame out of retweet centralities.
  • Do the same for the reply network.