Javascript code to calculate relevant metrics for social network analysis using a 2d adjacency matrix as input.