MiRA logo

MiRA — Multilayer Interactive Rendering Application

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 eight 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, "setA_type": "pollinator" }
  ],
  "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. Use the optional setA_type layer column to pin which node_type is rendered on top — by ecological convention the higher trophic level (pollinators, parasites, dispersers). 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 Domain Reference Type Size Attributes
Canary Islands pollination network Ecology Vitali et al. 2024
Data: Dryad
Undirected · bipartite
Spatial
5 layers · 235 nodes
651 intra + 154 inter links
layers nodes links
Siberian host–parasite network Ecology Pilosof et al. 2017
Data: Pilosof et al. 2017
Originally: Krasnov et al. 2009
Mixed · bipartite
Temporal
6 layers · 78 nodes
1,817 intra + 284 inter links
nodes state nodes links
Basque Country spatial pollination network Ecology Magrach et al. 2024
Data: EuPPollNet
Undirected · bipartite
Spatial
5 layers · 137 nodes
376 intra + 142 inter links
layers nodes links
Portuguese temporal seed dispersal network Ecology Costa et al. 2020
Data: figshare
Mixed · bipartite
Temporal
5 layers · 29 nodes
170 intra + 43 inter links
nodes links
P. falciparum var gene recombination network Population genetics Larremore et al. 2013
Data: GitHub
Undirected · unipartite
Multiplex
9 layers · 307 nodes
2,763 state nodes · 35,306 links
nodes
Human disease multiplex network Biomedicine Halu et al. 2019
Data: MultiplexDiseasome (ODbL)
Undirected · unipartite
Multiplex
2 layers · 478 nodes
2,098 intra + 199 inter links
nodes links
Human brain structural connectome Neuroscience Keresztes et al. 2022
Data: braingraph.org (OASIS-3, CC-BY)
Undirected · unipartite
Temporal
3 layers · 124 nodes
372 state nodes · 1,827 intra + 220 inter links
nodes links
Human chaperone co-expression network Molecular Biology Shemesh et al. 2021
Data: Supplementary (Nature Comms.)
Undirected · unipartite
Multiplex
8 layers · 50 hub proteins
6,640 intra + 1,400 interlayer links
family core_variable stress weight
Plasmid genetic-similarity network in dairy cows Microbiology Shapiro et al. 2023
Data: GitHub
Undirected · unipartite
Multiplex
15 layers · 1,344 nodes
1,471 state nodes · 101 intra + 2,384 inter links
nodes state nodes links

Visualization Modes

Six modes are available, switched via the top toolbar strip. The left sidebar is dynamic — its panels (Data, Layers, Nodes, Intralayer Links, Interlayer 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

Intralayer Links

Interlayer Links shown when dataset has interlayer 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, Intralayer Links, Interlayer 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.

Grid View

Each layer is rendered in its own mini panel arranged in a responsive grid (a small-multiples or matrix view). All cells share the same axes and node identities, making it easy to compare intralayer structure across layers side-by-side without the visual clutter of the 3D stack.

Interactions

Sidebar Controls

The sidebar mirrors Network Mode minus controls that don't apply to a 2D grid. The Layers panel hides Stacking, Layer Spacing, and Layer Color By; the Nodes panel hides Transform Nodes; the Intralayer Links panel hides the manual color picker; and the Interlayer Links panel is hidden entirely. The following grid-specific control is added:

Bipartite Layers

When a layer is declared bipartite (layer.bipartite = true with a node_type attribute on its nodes), Grid View positions Set A nodes on the upper row and Set B on the lower row inside each cell, just like the bipartite layout in Network Mode. If the Set Names checkbox is on (Layers panel), each cell's left margin labels the two sets with their setALabel and setBLabel values, coloured in the canonical blue/pink set palette.

Σ 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

Nodes are not draggable in Meta-Network mode — positions are fully governed by the chosen layout (Circular / Force / Two-row). Use Reset Layout to re-run the algorithm.

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.
Save Session — export the full visualization state to a .json file. See Save / Load Session.
Load Session — restore a previously saved session file. See Save / Load Session.
Load Session from URL — paste a public URL to a session JSON file and restore it directly. GitHub Gist URLs are resolved automatically. See Sharing Online.

Save / Load Session

Sessions let you save your entire visualization state to a portable .json file and restore it later — resuming exactly where you left off, or sharing a specific view with a collaborator.

Saving a Session

Click the Save Session button in the top toolbar strip. In Chrome and Edge a native Save dialog appears; in Firefox and Safari the file downloads automatically as session.json. Saving is available in any visualization mode as long as data is loaded.

Loading a Session

Click the Load Session button and select a previously saved .json session file. The app does not need to have data loaded first — loading a session imports everything from the file.

What is Saved

What is Not Saved

Sharing sessions: Because the session file contains the raw data, you can send it to a collaborator who can open it directly — they do not need the original data file.

Sharing Online via GitHub Gist

You can share a session with anyone by hosting the JSON file on a public URL. GitHub Gist is a free and easy option — no repository required.

Step 1 — Save your session

Click the Save Session button to download your session as session.json.

Step 2 — Upload to GitHub Gist

  1. Go to gist.github.com (sign in or use anonymous).
  2. Set the filename to something descriptive, e.g. my-network-session.json.
  3. Open your session.json file in a text editor, select all, and paste the contents into the Gist editor.
  4. Click Create public gist. Copy the URL from your browser's address bar — it looks like:
    https://gist.github.com/yourname/abc123def456

Step 3 — Share the link

Send your collaborator the Gist URL. They can load it directly in MiRA:

  1. Click the Load Session from URL button in the toolbar.
  2. Paste the Gist URL (either the page URL or the raw file URL — both are accepted).
  3. Click OK. The session is fetched and restored automatically.
Tip: GitHub Gist URLs are resolved automatically — you do not need to find the "Raw" link. Any public URL pointing directly to a JSON file also works (Dropbox, GitHub raw files, etc.).

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.


Visualization Guidelines

Multilayer networks are inherently complex. Unlike monolayer networks visualized in 2D, the 3D representation adds visual depth and structure — but also visual complexity. The more layers and interlayer links present, the more entangled the canvas becomes. MiRA is designed to help you navigate this complexity: threshold links, apply different layouts, use summary visualizations (Layer Mode, Meta-Network Mode), and filter data in Data Mode. As a practical side effect, reducing what is drawn also speeds up interaction.

1. Screen and Display Recommendations

MiRA runs in any modern browser and works on a laptop, but the best experience comes with a large display. The 3D canvas benefits directly from available screen real estate: more layers, nodes, and links are visible simultaneously without zooming, and the spatial relationships between layer planes are far easier to read on a wider canvas.

2. Managing Visual Complexity

Tame the links first

Links are the dominant source of both visual clutter and rendering slowness. Before exploring the 3D canvas, open Dashboard Mode to inspect the link weight distribution. Knowing whether weights span a narrow or wide range tells you immediately how aggressively to threshold — and whether thresholding will meaningfully reduce what is drawn on screen.

Interlayer links are hidden by default, and deliberately so: they cross between layer planes and can quickly obscure the intralayer structure if enabled globally. When you are ready to explore cross-layer connections, reveal them gradually — one pair of layers at a time — using the layer-pair filter in the Interlayer Links panel.

Use layer count as a guide for mode selection

Layer count matters more than node count for visual readability. A network with 20 layers becomes very difficult to interpret in Network Mode because the 3D planes stack and occlude each other. If you have many layers:

Subset the data for more comfortable exploration

Use Data Mode to filter the network to the layers, nodes, or links relevant to your question before switching to Network Mode. A focused subset is almost always more readable — and faster to interact with. You can always clear the filter and return to the full dataset.

Focus on individual nodes

Clicking on any node — or searching by name in the search bar — highlights all of that node's connections simultaneously, both within its layer and across all other layers. Instead of trying to read the full network at once, start with the specific nodes your question is about and trace their connections outward from there.

Color one thing at a time

Choose one attribute to encode as node color, and optionally one for link color. Encoding both simultaneously makes it harder to extract either signal. For multiple attributes, use Dashboard Mode, which displays each in its own chart.

Node labels

Node labels are visually cluttering in large networks. Enable them on hover (not permanently) for exploratory work, and reserve permanent labels for small, publication-ready networks.

3. Match the Mode to the Goal

MiRA offers six modes. Using the right one for your question can give you very different — and complementary — perspectives on your network.

Goal Recommended mode
Full multilayer structure, specific node connectionsNetwork Mode (default)
Geographic distribution of layersMap Mode
How similar or connected are my layers?Layer Mode
Full interaction graph, ignoring layer identityMeta-Network Mode
Summary statistics, degree distributions, similarity matricesDashboard Mode
Inspect, filter, or subset the raw dataData Mode

The Network Mode 3D canvas is best for getting an overall gestalt of the multilayer structure. It is not always the best tool for a specific analytical question — and for large networks it is the most demanding mode computationally.

4. Workflow for Large Networks

  1. Load the full dataset — MiRA can parse large files; loading is a one-time cost.
  2. Start in Dashboard Mode — get an immediate quantitative overview (node counts, link distributions, layer similarity) without rendering the 3D canvas.
  3. Use Layer Mode to understand inter-layer relationships before zooming in.
  4. Subset in Data Mode — filter to the layers or nodes of interest.
  5. Switch to Network Mode with the filtered subset — and raise the weight threshold as needed.
  6. Use Meta-Network Mode to see the aggregated interaction topology across your selected layers.

Quick reference — if the network feels slow

When a network feels slow to drag or rotate, try these in order:

  1. Raise the Intralayer Min Weight threshold — the single most impactful control.
  2. Hide interlayer links if they are currently shown.
  3. Disable permanent node labels — switch to hover-only.
  4. Filter layers using Data Mode to reduce the number of planes rendered.
  5. Switch to Layer Mode or Meta-Network Mode — both use simpler rendering pipelines than the 3D canvas.

5. Local Machine and Browser Effects

MiRA renders using the browser's Canvas 2D API, which runs on the CPU — there is no GPU shader acceleration. Rendering performance is directly tied to processor speed.

Factor Effect
CPU speedPrimary driver of drag smoothness and frame rate
HiDPI / Retina displayDoubles the pixel count rendered; can roughly halve canvas performance vs. a 1080p display
BrowserChrome and Edge have meaningfully faster Canvas 2D performance than Firefox and Safari
RAMAffects loading and parsing of large datasets; less relevant during interactive rendering
Number of visible elementsScales linearly — every additional link, node, or layer polygon adds to the per-frame cost

6. Stress Test

MiRA was stress-tested with a synthetic temporal network designed to push rendering limits:

Layers8 (T1–T8)
Physical nodes100
State nodes800
Intralayer links8,000 (1,000 per layer, Poisson weights mean≈2, range 1–10)
Interlayer links7,000 (1,000 per consecutive layer pair)
Total links15,000

Test machine: MacBook Pro M1, 32 GB RAM, Google Chrome.

Result: The network loaded and rendered without issues. Navigation (drag, zoom, rotate) was smooth even with all 15,000 links shown at once. Dashboard Mode, Layer Mode, and Meta-Network Mode all performed well regardless of link count, as they use simpler rendering pipelines than the 3D canvas.

This network is available as a built-in example dataset (Stress Test) in MiRA's demo dialog.


Integration with the emln R Package

The emln R package provides three functions to load and export multilayer networks directly into MiRA — 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 MiRA 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 MiRA 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 MiRA. 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 MiRA. 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.