网络科学简介
1 COMPLEX SYSTEMS
The Bridges of Konigsberg
Can one walk across the seven bridges and never cross the same bridge twice and get back to the starting place?
Euler’s theorem (1735):
- If a graph has more than two nodes of odd degree, there is no path.
- If a graph is connected and has no odd degree nodes, it has at least one path.
Networks and graphs
- components: nodes, vertices N
- interactions: links, edges L
- system: network, graph (N,L)
network often refers to real systems:www,、social network、metabolic network.
Language: (Network, node, link)
graph: mathematical representation of a network(web graph,social graph (a Facebook term))
Language: (Graph, vertex, edge)
UNDIRECTED VS. DIRECTED NETWORKS
Undirected
co-authorship、actor network、protein interactions
%matplotlib inline
import matplotlib.pyplot as plt
import networkx as nx
Gu = nx.Graph()
for i, j in [(1, 2), (1, 4), (4, 2), (4, 3)]:
Gu.add_edge(i,j)
nx.draw(Gu, with_labels = True)
Directed
urls on the www、phone calls、metabolic reactions
import networkx as nx
Gd = nx.DiGraph()
for i, j in [(1, 2), (1, 4), (4, 2), (4, 3)]:
Gd.add_edge(i,j)
nx.draw(Gd, with_labels = True, pos=nx.circular_layout(Gd))
Degree, Average Degree and Degree Distribution
nx.draw(Gu, with_labels = True)
Undirected network:
nx.draw(Gd, with_labels = True, pos=nx.circular_layout(Gd))
2 Gephi大数据可视化
Gephi是一个在NetBeans平台上用Java编写的开源网络分析和可视化软件包。
Gephi特点:
1) 快速由内置的OpenGL引擎提供支持,Gephi能够利用非常大的网络推送信封。
2)简单易于安装和使用。
3)架构构建在Netbeans平台之上,支持模块化扩展Gephi及插件开发。
注意:
1 Gephi中CSV文件分为两种:节点及其属性,边及其属性。Gephi在只导入边数据时,会自动创建节点信息,反之不然,即使不会报错,显示出来的结果也不可解释。
Gephi学习参考
以下视频教程非常有帮助,2.0X速度能较快的看完(貌似可以)。
学习视频:udemy
学习参考:
数据可视化工具Gephi在社交网络数据分析中的运用| [镝数 刘勇]
Gephi可视化(一)——使用Gephi Toolkit创建Gephi应用
Gephi可视化(二)——Gephi Toolkit叫板Prefuse
Introduction to Network Visualization with GEPHI