开始使用免费开始使用

Characterizing the network (III)

The last exercise was on degree centrality; this time round, let's recall betweenness centrality!

A small note: if executed correctly, this exercise may need about 5 seconds to execute.

本练习是课程的一部分

Introduction to Network Analysis in Python

查看课程

练习说明

  • Plot the betweenness centrality distribution of the GitHub collaboration network. You have to follow exactly the same four steps as in the previous exercise, substituting nx.betweenness_centrality() in place of nx.degree_centrality().

交互式实操练习

通过完成这段示例代码来试试这个练习。

# Import necessary modules
import matplotlib.pyplot as plt
import networkx as nx

# Plot the degree distribution of the GitHub collaboration network
____
____
编辑并运行代码