Skip to content
Visual AnalyticsNodes, edges and the shape of a network

Formulas for this chapter

Density (undirected)

Density = e / (n(n-1)/2)

Whenever a question asks how connected an undirected network is overall. Count the edges first, and check with sum of degrees = 2e.

e
Number of edges actually present
n
Number of nodes, including singletons
n(n-1)/2
Maximum possible edges if every node joined every other

Density (directed)

Density = e / (n(n-1))

For a directed network, where each pair can be joined in both directions, so the maximum is twice the undirected one. Say which formula you are using; the two answers differ by exactly a factor of 2.

e
Number of directed edges (arrows)
n
Number of nodes
n(n-1)
Maximum possible directed edges

Degree sum check

SUM of degrees = 2e (undirected) · SUM in-degrees = SUM out-degrees = e (directed)

After counting edges or degrees, before any centrality arithmetic. It catches a missed or double-counted edge in one line.

degree
Number of edges at a node
e
Number of edges in the network
Step 5 of 27
The real wordsTheory

What node and edge properties are used for

When you draw a network, three node properties are available and each should carry meaning.

  • Size: a node's importance, usually a centrality score
  • Colour: a category, such as its community or department
  • Position: structure, since closely connected nodes are placed near each other by the layout

And for edges: weight as thickness, direction as an arrowhead, type as colour or style.

Size by centrality, colour by community. That single sentence describes almost every Gephi picture in this course.