NetworkX -
python graph analysis and
      visualization
        2012/09/20
         Jimmy Lai
  r97922028 [at] ntu.edu.tw
Installation
• pip install numpy
• pip install matplotlib
• pip install networkx




                 NetworkX http://networkx.github.com/   2
Tutorials
• Stanford U., CS224W, Social and Information
  Network Analysis
  – Course: http://www.stanford.edu/class/cs224w/
  – Slides:
    http://www.stanford.edu/class/cs224w/nx_tutorial/nx_tutorial.pdf

• U. Cambridge, CM542, Social and
  Technological Network Analysis
  – Course:
    http://www.cl.cam.ac.uk/~cm542/teaching/2011/stna2011.html
  – Slides: http://www.cl.cam.ac.uk/~cm542/teaching/2011/stna-
    pdfs/stna-lecture11.pdf
                       NetworkX http://networkx.github.com/            3
Demo
• PTT八卦版                          • 分析使用者的重要性
• Node:                                  – PageRank
  – 使用者
  – 文章
• Edge:
  – 使用者 --推--> 文章
  – 使用者 --噓--> 文章




              NetworkX http://networkx.github.com/    4
NetworkX http://networkx.github.com/   5
NetworkX http://networkx.github.com/   6
Top users
DreamYeh 0.00310173351497
incar 0.00274399852138
tonyselina 0.00256215934766
tenderman 0.00200241377213
freewash 0.00189949431094
IEhacker 0.00171091474032
Maiar 0.00162013779898
bbbruce 0.00160444345986
ispy03532003 0.00140382201689
PacificBlue 0.00138277783666
herman602 0.00134605308113
spfd 0.00123863235122
flash0576 0.00122555809167
McRay 0.00120868349687
nightcatman 0.00119601538797
Su22 0.0011917242292
jesil 0.0011887974345

 NetworkX http://networkx.github.com/   7

NetworkX - python graph analysis and visualization @ PyHug

  • 1.
    NetworkX - python graphanalysis and visualization 2012/09/20 Jimmy Lai r97922028 [at] ntu.edu.tw
  • 2.
    Installation • pip installnumpy • pip install matplotlib • pip install networkx NetworkX http://networkx.github.com/ 2
  • 3.
    Tutorials • Stanford U.,CS224W, Social and Information Network Analysis – Course: http://www.stanford.edu/class/cs224w/ – Slides: http://www.stanford.edu/class/cs224w/nx_tutorial/nx_tutorial.pdf • U. Cambridge, CM542, Social and Technological Network Analysis – Course: http://www.cl.cam.ac.uk/~cm542/teaching/2011/stna2011.html – Slides: http://www.cl.cam.ac.uk/~cm542/teaching/2011/stna- pdfs/stna-lecture11.pdf NetworkX http://networkx.github.com/ 3
  • 4.
    Demo • PTT八卦版 • 分析使用者的重要性 • Node: – PageRank – 使用者 – 文章 • Edge: – 使用者 --推--> 文章 – 使用者 --噓--> 文章 NetworkX http://networkx.github.com/ 4
  • 5.
  • 6.
  • 7.
    Top users DreamYeh 0.00310173351497 incar0.00274399852138 tonyselina 0.00256215934766 tenderman 0.00200241377213 freewash 0.00189949431094 IEhacker 0.00171091474032 Maiar 0.00162013779898 bbbruce 0.00160444345986 ispy03532003 0.00140382201689 PacificBlue 0.00138277783666 herman602 0.00134605308113 spfd 0.00123863235122 flash0576 0.00122555809167 McRay 0.00120868349687 nightcatman 0.00119601538797 Su22 0.0011917242292 jesil 0.0011887974345 NetworkX http://networkx.github.com/ 7