TempGraphViz

An interactive GUI designed for exploring, analyzing, and visualizing temporal graphs.


Installation

TempGraphViz is part of the Python Package Index and can be installed via pip install tempnetviz.

To start the GUI, simply run python -m tempgraphviz.main_gui.


Quickstart

Your data should be stored in a single folder, as .csv files. Each .csv file representing a graph at a given time point of the analysis. Run python -m tempnetviz.main_gui. Then:

  1. Click Open in the GUI to select the folder containing your .csv files.
  2. Use the Sub-graph selector to choose one or multiple layers to visualize or analyze.
  3. Adjust the metrics to explore structural properties of your data. You can apply a graph cut (edge pruning) for better readability on large graphs.
  4. Switch between Graph, Histogram, and Animation views to gain different insights.

You can apply aesthetic changes (e.g. edge/nodes widths, colors...) to the results via the Settings button.

image info


Main Functionalities

Structure visualization

Once you have selected the input files to be visualized, the default view will be a 3D stack that lets you see how connections evolve as a function of time. You can also compute various metrics that quantify the importance of the nodes in the graph. More important nodes will be displayed larger as others. In this example, a colormap was also applied via the settings to make the results more explicit.

Graph Structure

Metrics distribution

Visualize how metrics evolve over time using histograms. By default, the different time steps are stacked on top of each other for easier comparison. In this example, deep blue corresponds to early times and deep red to the last datapoints. You can also plot each time step side by side by changing the corresponding option in the settings.

histogram

Graph animation

It is also possible to display the time evolution of the graph as an animation

Animation of temporal graph

Temporal Layout

You can also display the results as a temporal layout. At each timestep, this representation orders the nodes on the y axis to reduce edge-overlap. In this example, the color and thickness of node a shows its strength value. Example of temporal layout


Example on real data

Let us now apply TempNetViz to real data. Here we will reproduce the results of the article Stable clique membership in mouse societies requires oxytocin-enabled social sensory states. This study shows that in groups of mice living in semi-naturalistic environments, highly social and stable cliques tend to emerge (so called rich-club). The data needed to reproduce this example can be found here. After loading the data, the corresponding multi-layer graph looks like this:

Loaded data

We first apply a graph cut to prune some of the weakest edges. If we did not do this, the graph would be fully connected, which would mask any differences in connectivity. For that we use the "mutual nearest neighbors" option, as we care about reciprocal edges. We choose the value of 3. We now have a graph which is a bit easier to understand:

Graph pruning

Finally, to visualize the particularly influencial nodes, we select the "rich-club" metric, and choose a degree of 3. That means that we retain only nodes with degree >= 3.

Stable rich club

We see that at each time step, some node come in an out of the rich-club, but some consistently stay in it over the whole experiment. In the article, the emergence of these stable rich-club was linked to the oxytocin pathways. Importantly, mice with impaired cortical oxytocin signaling were unable to enter such stable rich-clubs