tsna : Tools for Temporal Social Network Analysis

We finally got the alpha release of the new tsna package up on CRAN! The goal is for the package to be a repository of algorithms and techniques for doing Social Network Analysis on longitudinal networks stored as networkDynamic objects. It includes:

The package vignette has lots more details.

As a quick example, the code below extracts a forward temporal path (think “what is the earliest journey a message could take from vertex 10 to each vertex in the network while respecting edge timing”) and plots it as a transmission tree, including the transmission time for each edge:


# load the libraries
library(tsna)
library(ndtv)
# load a dynamic network example
data("moodyContactSim")
# compute the forward temporal path from vertex 10 at time 0
v10path< -tPath(moodyContactSim,10)
# plotting trees still a little complicated, 
# but with Graphviz and ndtv we can do it
plot(v10path,
    coord=network.layout.animate.Graphviz(as.network(v10path),
          layout.par = list(gv.engine='dot')),
    edge.label.col='blue',
    main='earliest fwd path transmission times from vertex 10')

v10_fwd_path

One thought on “tsna : Tools for Temporal Social Network Analysis”

Leave a Reply

Your email address will not be published. Required fields are marked *