Python 網路分析入門
Eric Ma
Data Carpentry instructor and author of nxviz package
例子:
社群
運輸
建立實體之間的關係模型
洞見:
重要節點:社群網路的影響者
路徑搜尋:最高效的運輸路徑
分群:找出社群




import networkx as nxG = nx.Graph()G.add_nodes_from([1, 2, 3])G.nodes()
NodeView([1, 2, 3])
G.add_edge(1, 2)G.edges()
EdgeView([(1, 2)])
G.nodes[1]['label'] = 'blue'G.nodes(data=True)
[(1, {'label': 'blue'}), (2, {}), (3, {})]
nx.draw(G)import matplotlib.pyplot as plt plt.show()

Python 網路分析入門