Network Graphs

A network graph shows data points, or nodes, associated together by links, or edges, to see relationships between data in directed graphs or hierarchies. 

Flow uses a force-directed graph algorithm to create Network Graphs. This is based on the D3 implementation of force-3d. The implementation in Flow can be pretty straightforward or more sophisticated in nature. For many cases, the default settings are adequate to show quite beautiful graphs. If you'd like to read more about the original D3 algorithms, this is a good explanation.

Dataset preparation

Dataset preparation can be complicated and may require programming skills at this time. The dataset that will show a network graph must contain an "id" column which must be unique for every row in the dataset, and a "connections by id" column which lists the ids of every row to be connected to.

image.png

In the above example, the Network Graph has 10 nodes, and nodes A, B, and C have connections to nodes 1 through 6 as indicated by the connections column. The connections column requires a list of ids, separated by the "|" pipe character (SHIFT-backslash on most keyboards).

MtNimage.png

For more on How to get from Flat Data to a Network Graph, see https://docs.flow.gl/books/flow-documentation/page/how-to-get-from-flat-data-to-a-network-graph 

Forces

NOTE: if you are adjusting parameters and not seeing any difference, it is likely because other forces are overwhelming the parameter you are updating. Experiment with other parameters as well.

The graph is created by "forces" that iteratively push and pull on each other, so the nodes algorithmically create patterns based on the links present.

The default force is a "link force" which has an attraction force (strength) between connected nodes. If we just apply a link force, the connected nodes will be attracted toward each other, but there will be no forces repelling non-connected nodes.

image.png

To remedy this, we can add either Attract-Repulse or Anti-collision forces.

image.png

In addition to strength, link distance is the suggested distance between nodes, an important parameter that will dictate how closely clustered our graph will end up, although it could be overcome by Attract-Repulse forces.