NDTV.jl

Turn observed network activity into animations, timelines, and filmstrips. NDTV.jl takes DynamicNetworks.jl data, computes layouts over time, and exports visual artifacts for inspecting and communicating changing relationships.

First analysisLearn the model or dataReference and detail
Export a first animationChoose a layoutCompare export formats
Supported scope

Layouts encode graph structure, not physical positions or an inferred movement process. Interpolation is a visual transition between frames. HTML and SVG exports are self-contained outputs; video and GIF export require the external tools documented in the export guide.

Installation

Use Julia 1.12 or newer and the shared workspace installation guide. These development packages are not yet registered; the guide prepares the required sibling checkouts and a Julia environment for the examples.

Quick Start

Create a small contact sequence and export an HTML animation with a deterministic circular layout:

using DynamicNetworks, NDTV

dnet = DynamicNetwork(4; observation_start=0.0, observation_end=10.0)
activate_vertices!(dnet, collect(1:4), 0.0, 10.0)
activate!(dnet, 0.0, 5.0; edge=(1, 2))
activate!(dnet, 3.0, 9.0; edge=(2, 3))
layout = render_animation(dnet; algorithm=CircleLayout(), n_frames=6)
export_html(layout, "network.html")

Open network.html in a browser to inspect the selected frames. Each frame shows everything active during its slice of the window, so short spells are not lost between frames. For quantitative reachability or duration analysis, continue with TSNA.jl.

Visualization Types

TypeFunctionDescription
Animationrender_animationSmooth layout transitions across time
Timelinetimeline_plotASCII activity timeline
Proximityego_timelineEgo-centric activity view
Transmissiontransmission_timelineDiffusion event visualization
FilmstripfilmstripMultiple snapshots at specified times
Single snapshotcompute_slice_layoutLayout at a single time point

Documentation

Theoretical Background

Force-Directed Layout

The Fruchterman-Reingold algorithm treats the network as a physical system:

  • Repulsive forces push all vertex pairs apart: $f_r(d) = k^2 / d$
  • Attractive forces pull connected vertices together: $f_a(d) = d^2 / k$
  • Simulated annealing gradually reduces the temperature to settle into a stable layout

Where $k = \sqrt{\text{area} / n}$ is the optimal spacing and $d$ is the distance between vertices.

Dynamic Layout Stability

With FRLayout() and anchoring enabled, a frame starts from the previous frame's coordinates before applying the force-directed updates. This can reduce visual jumps, but does not constrain actors to fixed positions. CircleLayout() and MDSLayout() recompute their deterministic layouts; anchoring does not change those algorithms. New or changing contacts can still lead to substantial movement in the drawing.

Interpolation

Between computed layout frames, positions are interpolated:

  • Linear: $p(t) = p_1 + \alpha \cdot (p_2 - p_1)$
  • Ease: Smooth acceleration and deceleration using cubic easing

References

  1. Bender-deMoll, S., Morris, M., Moody, J. (2008). Prototype packages for managing and animating longitudinal network data: dynamicnetwork and rSoNIA. Journal of Statistical Software, 24(7), 1-36.

  2. Fruchterman, T.M.J., Reingold, E.M. (1991). Graph drawing by force-directed placement. Software: Practice and Experience, 21(11), 1129-1164.

  3. Torgerson, W.S. (1952). Multidimensional scaling: I. Theory and method. Psychometrika, 17(4), 401-419. — the classical (strain) MDS that MDSLayout implements.

    Note: Kamada, T., Kawai, S. (1989), "An algorithm for drawing general undirected graphs" (Information Processing Letters, 31(1), 7-15), is cited here only for contrast. Its iterative spring-energy minimization is not implemented in NDTV.jl; the layout formerly named KKLayout is classical MDS.

  4. Moody, J., McFarland, D., Bender-deMoll, S. (2005). Dynamic network visualization. American Journal of Sociology, 110(4), 1206-1241.

Citation

If you use NDTV.jl in your work, please cite it using the entry in CITATION.bib:

@misc{SNWJNDTVJL,
  author = {Santoni, Simone},
  title = {NDTV.jl: Network Dynamic Temporal Visualization for Julia},
  year = {2026},
  url = {https://github.com/statistical-network-analysis-with-Julia/NDTV.jl},
  note = {Homepage: https://statistical-network-analysis-with-Julia.github.io/NDTV.jl; GitHub: https://github.com/statistical-network-analysis-with-Julia}
}

Module

NDTV — Module
NDTV.jl - Network Dynamic Temporal Visualization

Provides tools for visualizing dynamic networks including animations, timeline plots, filmstrip displays, and layout algorithms.

Vertex identity is stable across time: position dictionaries are keyed by the network's persistent vertex IDs even when vertices activate and deactivate. Structural layouts (FRLayout, MDSLayout) are computed on the vertices active in each slice only; an inactive vertex keeps the position it last had (or will first have), so it never distorts the active picture.

Port of the R ndtv package from the StatNet collection.

source