Introduktion till nätverksanalys i Python
Eric Ma
Data Carpentry instructor and author of nxviz package

Vilken central nod kan vara viktigast?

$$\frac{\text{Antal grannar jag har}}{\text{Antal grannar jag maximalt kan ha}}$$
Exempel på noder med hög gradcentralitet:
Informationsspridare på Twitter
Flygplatshubbar
Superspridare av sjukdomar
G.edges()
EdgeView([(1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (1, 7), (1, 8), (1, 9)])
list(G.neighbors(1))
[2, 3, 4, 5, 6, 7, 8, 9]
list(G.neighbors(8))
[1]
list(G.neighbors(10))
NetworkXError: The node 10 is not in the graph.
nx.degree_centrality(G)
{1: 1.0,
2: 0.125,
3: 0.125,
4: 0.125,
5: 0.125,
6: 0.125,
7: 0.125,
8: 0.125,
9: 0.125}
Introduktion till nätverksanalys i Python