← All field notes
NOTE 03 / NETWORK ANALYSIS

Reading the shape of a network

Components, degrees, and density reveal different things. Learn what these measurements say, and what they leave out.

5 min readNodefield Lab

A layout is only one view.

Move a node in the lab and the graph’s appearance changes. Its connectivity does not. Components, degrees, and density describe properties of the edge structure rather than positions on the screen.

These notes assume a simple undirected graph: no self-loops and no parallel edges. That assumption matters when counting possible connections.

FIG. 03 / Count connections, not pixels. Drawing an edge longer does not change a metric.

Components: who can reach whom?

A connected component is a maximal set of nodes joined by paths. Every node belongs to exactly one component. A node with no incident edge is still a component of size one. NetworkX’s component reference gives the formal definition.

The Three islands sample has nine nodes, with component sizes 4, 4, and 1. No path crosses between those groups. The distance from a node in the first group to one in the second is infinite, rather than zero. Adding just one edge between the two groups merges them into a component of eight.

Degree: count the local connections.

A node’s degree is the number of incident edges. The lab’s degree bars count edges without using their weights; weighted degree (sometimes called strength) would be another measurement. A highly connected node can be locally prominent without being a bridge between regions.

Each undirected edge contributes one to both endpoint degrees, so the sum of all degrees is 2E. The average is therefore 2E / V for V greater than zero. A ring of ten nodes has ten edges and average degree two.

Density: compare with all possible edges.

With V nodes there are V(V − 1) / 2 possible undirected edges. Density is the fraction present: 2E / (V(V − 1)). See the NetworkX density definition for the undirected and directed formulas.

For the ten-node ring, density is 10/45, about 22.2%. A complete graph has density one. This lab reports zero for fewer than two nodes, where no pair exists. Density is not a measure of reliability: two graphs can have identical node and edge counts yet very different bottlenecks.

Read the measurements together.

Averages can hide variation. The degree chart reveals uneven connectivity, while components reveal reachability. Shortest paths add cost information that degree and density ignore. None of these alone describes the whole network.

The metrics page includes distances from the selected source to every node. Use it to distinguish a locally well-connected node from a node that provides cheap access to the rest of the graph.

Join two islands.

Inspect Three islands in Network Metrics. Open Playground, add a connection between the two clusters, then return to Metrics. Your local graph carries across.

Analyze the islands ↗

Continue the experiment.

These notes describe the algorithms used in this lab. The linked references provide deeper treatments and alternative implementations. Choose a small graph and test one assumption at a time.

← Back to all field notes