Social Networks Software at the Command Line

Benjamin E. Lind

9 February 2015

There is No Panacea

Software is a social artifact

 

Academic developers write software for their own needs as a researcher

 

It's a mistake to assume that the developers' needs match your own

If a software package does not exactly meet your needs, you will need to either use an additional package or write your own functions

What are Your Needs?

  • Features
    • Social Networks or Network Science?
    • Simple Graphs or "Not-Simple Graphs?"
    • Metrics, Simulation, Modeling, or Visualization?
  • How to Construct a Network?
    • Conventional or Flexible?
  • Speed and Network Size
  • Practical or Educational?
    • Do you want to learn or just get it done?

Platforms

  • R
  • Python
  • Julia
  • C++

Unless you really like C++ and dislike the above languages, I wouldn't recommend pure C++ for social network analysis to anyone in the room

Package Families

Grouped by Some Common Theme

  • sna
    • statnet
    • igraph
  • tnet
  • RSiena
    • NetSim
  • RNetLogo
  • Visualization
    • d3Network
    • rgexf
    • ndtv
  • Everything else

Metrics

  • sna
    • Many standard and classic social network metrics
    • Hard to find many features elsewhere
  • igraph
    • Standard metrics and those in network science
  • tnet
    • Two-mode
    • Weighted
    • Dynamic

Modeling

  • statnet
    • ERGM, STERGM, BERGM
    • Relational event modeling
    • Degree distribution, latent clusters, motifs...
  • RSiena
    • Network and behavioral evolution
  • sna
    • Blockmodels
    • Bias networks
    • GLM, QAP, CUG
  • igraph
    • Blockmodels, community detection
    • Degree distribution
    • Hierarchical structures

Simulations

  • statnet
    • ERGM estimates to simulated networks
    • Permutation and QAP
  • igraph
    • "Games"
    • Rewiring
  • sna
    • Erdős–Rényi-style random networks
  • tnet
    • Permutations
    • Rewiring
  • Agent-based models
    • NetSim (RSiena tradition)
    • RNetLogo

Visualizations

  • Within R for typical needs
    • sna
    • network (in statnet)
    • igraph
  • Dynamic
    • networkDynamic and ndtv (in statnet)
  • d3Network for D3.js
  • rgexf to export to Gephi

Network Construction

  • Most rigid
    • sna (simple is best)
    • tnet
  • Somewhat flexible
    • network
    • igraph
    • networkDynamic
  • Relatively flexible
    • NetSim
    • RSiena
  • Very flexible
    • None

Speed

  • Not so fast
    • sna
    • tnet
  • Somewhat fast
    • statnet
  • Very fast
    • igraph

Educational vs. Practicality

  • Good for education
    • sna
    • tnet
  • Good for practical needs
    • Within network packages in R, practicality is usually proporational to the research problem

Modules

  • networkX
  • igraph
  • networkit
  • graph-tool
  • snap
  • as well as some agent-based modeling modules

The Modules are Roughly Comparable

  • Compared to R
    • All come from a network science rather than social network background
    • None have modeling flexibility like statnet, Rsiena
  • Exceptions to comparability within Python
    • networkX
      • Many (most?) features, e.g., 2-mode analysis
      • Written only in Python, so easy to read code
      • Very slow, the others are very fast
    • snap has opaque naming conventions
    • graph-tool is limited in terms of simulations
  • In general, they're all quite serviceable

Packages

  • Graphs
    • GraphCentrality
    • GraphLayout
    • TikzGraphs
    • RandomGraphs
  • LightGraphs
  • SimpleGraphs

Python modules are easily accessible
R code can be accessed as well

Benefits

  • Educational rather than practical
    • It will improve your programming skills
    • Must think about types and network construction
    • Limited existing functionality
      • Must write programs when needed
      • Requires you understand the process
  • Decent speed
  • Community

Libraries

  • Boost Graph
  • igraph
  • NetworKit
  • snap

Social Networks Software

By Benjamin Lind

Social Networks Software

  • 3,508