Multilayer Social Networks

 Multilayer Social Networks

R and python libraries

Many methods mentioned in the book have been made available as an R library, first published in January 2017. A python porting has also been recently released. Both libraries are mostly written in C++ and contain external functions from eclat (www.borgelt.net/eclat.html) for association rule mining, Eigen (eigen.tuxfamily.org) and spectra (https://spectralib.org) for matrix manipulation, Infomap (www.mapequation.org) for the Infomap community detection method, and Howard Hinnant's date and time library (https://github.com/HowardHinnant/date).

The R library is available on CRAN, so it is sufficient to type install.packages("multinet") on an R shell to install it (linux, mac or windows). You can then import the library: library(multinet) and have a look at the help: library(multinet). To learn how to use the library you may be interested in our article on the Journal of Statistical Software or in the material we use for our tutorial, previously given at the SunBelt, Social Informatics and IC2S2 conferences.

The python library is available on PyPI, so it is sufficient to type pip install uunet on a python shell to install it. You can then import the library: import uunet.multinet as ml and have a look at the help: help(ml). The tutorial folder includes a jupyter notebook showing how to use the python version.

Code repositories

While you would typically install the library directly from R, its code is available if you want to look at it or extend it. The code of the python version is also available.

A superset of the methods implemented in the R library is available as a C++ library. This can be useful to those wanting to modify existing algorithms, and also contains methods currently under evaluation that have not yet been exported to the R library.

Other software resources

Other researchers have also developed code to analyze multilayer networks. Various software tools have been developed under the EU FP7 projects PLEXMATH and LASAGNE. multiplex and multigraph are two R libraries for the analysis of multiplex networks and for visualizing multigraphs.