Multilayer Network Visualizer logo

Multilayer Network Visualizer

Interactive manual — all features, modes, and controls


Import Network Data

The Data panel is always visible in the left sidebar, regardless of active mode.

Load Example Data

Opens a dialog with seven built-in datasets. See Built-in Datasets below for the full list.

Load User Data (JSON)

Upload a .json file formatted according to the JSON format below.

{
  "directed": false,
  "directed_interlayer": false,
  "layers": [
    { "layer_id": 1, "layer_name": "Forest", "latitude": 42.3, "longitude": 3.1, "bipartite": true }
  ],
  "nodes": [
    { "node_id": "sp_1", "node_name": "Bee", "node_type": "pollinator" }
  ],
  "extended": [
    { "layer_from": "Forest", "node_from": "Bee", "layer_to": "Forest", "node_to": "Flower", "weight": 1.5 }
  ],
  "state_nodes": [
    { "layer_name": "Forest", "node_name": "Bee" }
  ]
}

Global fields

layers array

nodes array

extended array

One row per edge. Intralayer and interlayer edges both go here.

state_nodes array

Enumerates every (layer, node) pair present. Required for correct rendering.

Load User Data (CSV)

Load network data from CSV files. A modal dialog accepts up to four files:

Bipartite declaration: bipartite is never auto-detected. Mark a layer as bipartite via the bipartite=TRUE column in the layers file, and provide a node_type column in the nodes file. Each bipartite layer must have exactly two distinct node_type values among its own nodes. Diagonal-coupling networks (e.g. plant–pollinator + plant–herbivore) are supported: different layers may share one node set but pair it with a different partner set, resulting in more than two node_type values globally — this is fine as long as each individual layer has exactly two.

The Directed checkbox marks all edges as directed before loading. Comma, tab, and semicolon delimiters are auto-detected.

Note: The (layer, node) pairs are derived automatically from the edge list — you do not need to supply them. The optional State Node Attributes file lets you attach per-layer attributes to those pairs without modifying any other file.

Example — four-file import (temporal network with per-layer abundance)

network_edges.csv (required)

layer_from,node_from,layer_to,node_to,weight
1982,Apodemus_agrarius,1982,Ixodes_ricinus,1
1982,Apodemus_peninsulae,1982,Ixodes_ricinus,1
1983,Apodemus_agrarius,1983,Ixodes_ricinus,1

network_layers.csv (optional)

layer_id,layer_name
1,1982
2,1983

network_nodes.csv (optional — physical attributes, same across all layers)

node_name,body_mass_g
Apodemus_agrarius,22
Apodemus_peninsulae,28
Ixodes_ricinus,0.003

network_state_nodes.csv (optional — per-layer attributes, can differ across layers)

layer_name,node_name,abundance,module
1982,Apodemus_agrarius,82,3
1982,Apodemus_peninsulae,14,3
1983,Apodemus_agrarius,61,2
1983,Apodemus_peninsulae,19,1

After loading, abundance and module appear in the Color By and Size By dropdowns as State attributes, and their values reflect the specific layer each node is in.


Built-in Example Datasets

Dataset Reference Type Layers Notes
Canary Islands pollination network Vitali et al. 2024 Undirected bipartite 5 Spatial pollination; GPS coordinates → Map Mode and geographic Layer View
Basque Country spatial pollination Magrach et al. (EuPPollNet) Undirected bipartite 5 Spatial pollination; GPS coordinates
Portuguese temporal seed dispersal Costa et al. 2020 Undirected bipartite, directed interlayer 5 Temporal (annual 2012–2016); interlayer weights = abundance ratio t+1/t
Chilean intertidal food web Kéfi et al. 2016 Directed unipartite 3 Multiplex: trophic, positive non-trophic, negative non-trophic interactions
Siberian host–parasite network Pilosof et al. 2017 Undirected bipartite, directed interlayer 6 Temporal (annual 1982–1987)

Visualization Modes

Six modes are available, switched via the top toolbar strip. The left sidebar is dynamic — its panels (Data, Layers, Nodes, Links, Search, and others) change automatically to show controls relevant to the active mode.

Network Mode Default

All layers rendered simultaneously in a continuous 3D coordinate space.

Navigation

Interactions

Sidebar Controls

Layers

Nodes

Links

Search

Map Mode

Layers placed on an interactive Leaflet world map. Only available when the dataset includes latitude and longitude on its layers.

Sidebar Controls

Same as Network Mode (Layers, Nodes, Links sections). Map-specific controls appear in the bottom bar:

Layer Mode

Each layer becomes an interactive bubble in a force-directed meta-graph. Individual nodes are abstracted away.

Interactions

Sidebar Controls

Layers

Edges

Geographic Mode GPS datasets only

When every layer in the dataset has latitude and longitude, Layer View activates in Geographic mode automatically — bubbles are pinned to their real-world coordinates on a Leaflet satellite map background.

Σ Meta-Network Mode

Aggregates all intralayer links across every layer into a single, flat 2D network of unique physical nodes. Use this mode to see the full interaction graph of your multilayer network, independent of which layer each interaction was observed in.

Activate via the Σ button in the top toolbar strip. Clicking it again returns to Network Mode.

Interactions

Node selection

Edge selection

Navigation

Sidebar Controls

Aggregation

Edge thickness in the canvas scales linearly with weight.

Layout

Appearance

Layer Filter

A draggable, collapsible Select Layers panel appears in the top-right corner. By default all layers are included (no filtering). Click a layer name to activate it; click again to deactivate. All / Clear buttons select or deselect every layer at once.

When one or more layers are active, only nodes and edges that have links in those layers remain fully opaque; the rest fade to near-invisible. This lets you isolate temporal or spatial slices of the aggregated network.

The Search Nodes panel in the sidebar (below the main controls) works like network-mode search:

Dashboard Mode

Replaces the canvas with analytics panels. All sections are collapsible — click a header to expand/collapse.

Sidebar Controls

KPI Cards

Five headline numbers: total unique nodes, total layers, total intralayer links, total interlayer links, and mean edge density.

Per-Layer Bar Charts

Side-by-side bars per layer: node count, intralayer links, interlayer links, and edge density. The highest-value bar is accent-colored. For bipartite networks the node-count chart becomes a stacked bar split by Set A and Set B. Clicking a layer name highlights it in the background network.

Link Weight Distributions

Two histograms showing the distribution of edge weights across the network.

Only shown when the dataset has weighted edges (all weights = 1 still displays, confirming the network is unweighted).

Node × Layer Presence Matrix

Heatmap of which nodes appear in which layers. A toggle switches orientation between Layer rows × Node cols (default, exploits screen width) and Node rows × Layer cols. Sort buttons reorder alphabetically or by participation count.

Layer Similarity (Jaccard)

Square heatmaps where rows and columns are layers. Each cell = Jaccard similarity (0 = white → 1 = accent).

Diagonal = 1 by computation. Empty layers → gray (NaN).

Degree Distributions

Histograms of node degree for the full network and per layer. Bipartite: separate histograms for Set A and Set B.

Node Participation

Bar chart showing how many layers each node appears in, sorted by count. Bipartite: Set A and Set B shown separately.

Data Mode

A tabular inspection and subsetting interface for your network data — similar to Gephi's Data Laboratory. Switch to Data Mode via the grid icon in the top toolbar strip.

Tables

Four tabs display different aspects of the loaded network:

Click any column header label to sort by that column. Click again to reverse the sort order. A third click removes sorting.

Column Filters

Each column header shows a funnel icon (▼). Click it to open a filter popup for that column:

Active filters are indicated by a highlighted (indigo) funnel icon. Multiple column filters combine with AND logic — a row must match all active filters to appear.

Click Reset inside any popup to clear that column's filter.

Row Selection

Click any row to select it (highlighted in indigo). Multi-select is supported:

When rows are selected, a purple action bar appears at the top showing the count. Click Filter to selection to subset the network to only the selected rows. Click Clear to deselect all.

Subsetting

Filters and selections in Data Mode propagate to Network and Map modes. When a subset is active:

Subsets are derived from the active tab: filtering the Nodes tab subsets by node names; filtering Layers subsets by layer names; filtering Links subsets by individual link keys.

Tip: Use column filters to narrow the table first, then use row multi-select + Filter to selection for precise control over which items appear in the visualization.

Layer Colors

The Layers tab includes a color picker in each row. Changing a layer's color here updates it everywhere:

Default colors are assigned from a built-in palette and can be customized at any time.

CSV Export

Click the Export CSV button to download the currently visible (filtered) rows as a .csv file. The export respects all active column filters and row selections — only what you see in the table is exported.


Top Toolbar Strip

A full-width frosted-glass strip pinned to the top of the canvas. Buttons from left to right:

Icon Action
? Help — opens this manual in a new tab. In the app, clicking it first shows a context-sensitive quick-help popup for the current mode.
Network Mode — return to the default 3D oblique multilayer canvas.
Map Mode — toggle geographic Map Mode (only visible when dataset has coordinates).
Layer Mode — toggle Layer Mode (interactive meta-graph of layers).
Σ Meta-Network Mode — aggregate all intralayer links into a single 2D monolayer network.
Dashboard Mode — toggle analytics dashboard.
Data Mode — tabular inspection and subsetting (nodes, links, layers, state nodes).
+ Zoom In
Zoom Out
Reset Reset Viewport — reset zoom, pan, and 3D angle. In Layer Mode, also unpins all bubbles and re-runs the force layout.
Toggle Legend — show or hide the dynamic legend panel.
Snapshot — high-resolution export. Choose PNG, JPG, or PDF; optionally include the backdrop grid.

Dynamic Legend

A legend panel appears in the bottom-right corner whenever color or size mappings are active. Legends expand automatically when you select an attribute. Toggle panel visibility with the legend button in the top toolbar strip.


Integration with the emln R Package

The emln R package provides three functions to load and export multilayer networks directly into MultilayerViz — no manual file preparation required.

library(emln)
net <- load_emln(60)               # load a built-in dataset

# Open directly in the browser
srv <- plot_multilayer(net, bipartite = TRUE)
httpuv::stopServer(srv)            # stop server when done

# Or export to JSON / CSV for manual upload
multilayer_to_json(net, file = "network.json", bipartite = TRUE)
multilayer_to_csv(net, dir = "out/", prefix = "net60", bipartite = TRUE)

plot_multilayer()

Converts the multilayer object to JSON and opens MultilayerViz in the default browser, served over a local HTTP server. The network loads automatically — no file selection needed.

ArgumentDefaultDescription
multilayerA multilayer object from create_multilayer_network() or load_emln().
bipartiteFALSESet TRUE explicitly for bipartite networks. Requires a node_type (or legacy node_group / type) column with exactly two distinct values.
directedNULLIf NULL, auto-detected from edge symmetry. Set explicitly if auto-detection is wrong (e.g. pollinator networks store edges one-way but are ecologically undirected).
port8080Starting port for the local HTTP server. Next available port is tried automatically if busy. Actual port printed to console; retrieve with srv$getPort().
viz_pathNULLPath to the MultilayerViz directory. If NULL, uses the copy bundled with the installed emln package. Pass explicitly to use a different version of the app.
browsergetOption("browser")Browser command. On macOS, "chrome" is automatically expanded to open -a 'Google Chrome'.

Returns: the httpuv server handle. Call httpuv::stopServer(srv) or close R to shut it down. To kill all app servers from the terminal: lsof -ti TCP:8000-8200 | xargs kill -9

multilayer_to_json()

Exports the network to the JSON format expected by MultilayerViz. Returns the JSON string, or writes it to a file.

ArgumentDefaultDescription
multilayerA multilayer object.
fileNULLIf provided, writes JSON to this file path. If NULL, returns the JSON string invisibly.
bipartiteFALSESame as plot_multilayer(). Adds bipartite: true to every layer in the JSON.
directedNULLSets the top-level directed field in the JSON. Auto-detected if NULL.

Legacy column renaming: the nodes table column node_group or type is automatically renamed to node_type (the canonical name) in the output.

multilayer_to_csv()

Exports the network as CSV files matching the CSV import schema — ready to drag-and-drop into MultilayerViz. Three files are always written (_edges, _layers, _nodes); a fourth _state_nodes file is added automatically when the multilayer object contains per-layer node attributes (e.g. abundance, module).

ArgumentDefaultDescription
multilayerA multilayer object.
dirOutput directory. Created automatically if it does not exist.
prefix"network"File name prefix. Always produces <prefix>_edges.csv, <prefix>_layers.csv, <prefix>_nodes.csv; optionally <prefix>_state_nodes.csv.
bipartiteFALSEWhen TRUE, adds a bipartite column to the layers CSV and writes node_type to the nodes CSV.
directedNULLNot written to files — set directed/undirected in the app's CSV import dialog at load time.