Introd u ction to Net w orks IN TR OD U C TION TO N E TW OR K AN ALYSIS IN P YTH ON Eric Ma Data Carpentr y instr u ctor and a u thor of n xv i z package
Net w orks ! E x amples : Social Transportation Model relationships bet w een entities INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Net w orks ! Insights : Important entities : in �u encers in social net w ork Path � nding : most e � cient transport path Cl u stering : � nding comm u nities INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Net w ork Str u ct u re INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Net w ork Str u ct u re INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Net w ork Str u ct u re INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Net w ork Str u ct u re INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Net w orkX API Basics import networkx as nx G = nx.Graph() G.add_nodes_from([1, 2, 3]) G.nodes() [1, 2, 3] G.add_edge(1, 2) G.edges() [(1, 2)] INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Net w orkX API Basics G.node[1]['label'] = 'blue' G.nodes(data=True) [(1, {'label': 'blue'}), (2, {}), (3, {})] INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Net w orkX API Basics nx.draw(G) import matplotlib.pyplot as plt plt.show() INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Let ' s practice ! IN TR OD U C TION TO N E TW OR K AN ALYSIS IN P YTH ON
T y pes of graphs IN TR OD U C TION TO N E TW OR K AN ALYSIS IN P YTH ON Eric Ma Data Carpentr y instr u ctor and a u thor of n xv i z package
Undirected graphs Facebook social graph INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Undirected graphs import networkx as nx G = nx.Graph() type(G) networkx.classes.graph.Graph INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Directed graphs Directed : T w i � er social graph INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Directed graphs D = nx.DiGraph() type(D) networkx.classes.digraph.DiGraph INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
T y pes of graphs M u lti ( Di ) Graph : Trip records bet w een bike sharing stations INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
M u lti - edge ( Directed ) graphs M = nx.MultiGraph() type(M) networkx.classes.multigraph.MultiGraph MD = nx.MultiDiGraph() type(MD) networkx.classes.multidigraph.MultiDiGraph INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Weights on graphs Edges can contain w eights INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Weights on graphs Edges can contain w eights INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Weights on graphs Edges can contain w eights INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Self - loops Nodes that are connected to themsel v es INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Let ' s practice ! IN TR OD U C TION TO N E TW OR K AN ALYSIS IN P YTH ON
Net w ork v is u ali z ation IN TR OD U C TION TO N E TW OR K AN ALYSIS IN P YTH ON Eric Ma Data Carpentr y instr u ctor and a u thor of n xv i z package
Irrational v s . Rational v is u ali z ations INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Vis u ali z ing net w orks Matri x plots Arc plots Circos plots INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Vis u ali z ing net w orks Matri x plots Arc plots Circos plots INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Matri x plot INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Matri x plot INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Matri x plot INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Matri x plot INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Directed matrices INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Vis u ali z ing net w orks Matri x Plots Arc Plots Circos Plots INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Arc plot INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Vis u ali z ing net w orks Matri x Plots Arc Plots Circos Plots INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Circos plot INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Circos plot INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
n xv i z API import nxviz as nv import matplotlib.pyplot as plt ap = nv.ArcPlot(G) ap.draw() plt.show() INTRODUCTION TO NETWORK ANALYSIS IN PYTHON
Let ' s practice ! IN TR OD U C TION TO N E TW OR K AN ALYSIS IN P YTH ON
Recommend
More recommend