Hi all,

Is there a way to create a multilayer network from a group of data.frames?

This would make it very easy to import data to create multigraphs in graph-tool. This is possible for example in igrap library and for MuxViz in R( https://github.com/manlius/muxViz).

In Muxviz, for example, one can create a multilayer network using three data.frames. I copy some of the explanation below from their documentation:

###  Node list

One df with following columns :
  • nodeID: [mandatory] numerical integer id to identify each node
  • nodeLabel: [optional] string specifying the label attribute
  • nodeX: [optional] float value specifying the Cartesian coordinate x for the layout
  • nodeY: [optional] float value specifying the Cartesian coordinate x for the layout
  • nodeLat: [optional] float value specifying the latitude for the geographic layout
  • nodeLong: [optional] float value specifying the longitude for the geographic layout

###  Edges list

One or more df with data on the edges. A typical edges list is expected to be a file with at most three columns, giving the list of edges from a node (first column) to other nodes (second column), possibly weighted by an integer or floating number (third column). For instance:

1 2 0.5
1 3 1.4
18 124 0.1

### input df

Muxviz also uses a third data.frame that brings information on the list of layers to be included in a multiplex, the corresponding labels and the possible layout file to define node properties (e.g., ID, labels, geographic coordinates, etc).

best wishes,

Rafael H M Pereira