Skip to content

Glossary · Interaction

Graph Clustering

Also known as: Node Clustering, Compound Nodes.

Grouping graph nodes by a shared attribute (department, region, type) and aggregating the edges between groups so users can collapse and expand whole subgraphs.

Real-world graphs often contain natural groupings — employees by department, services by region, processes by team. Graph clustering exposes these groupings in the visualization: nodes belonging to the same group are visually associated (often with a surrounding shape), and the edges between groups are aggregated into thicker summary edges.

Clustering serves two goals. First, it gives the viewer a high-level map: instead of 5,000 individual nodes, they see 12 clusters with weighted connections. Second, it enables drill-down — click a cluster to expand it and reveal its members, click again to collapse.

In TopoKit, the clustering API is `cluster.by(field)` with optional edge aggregation and collapsible groups. It works with any layout algorithm.