การวิเคราะห์เครือข่ายเบื้องต้นด้วย 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