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で学ぶネットワーク分析入門