Community detection, also called clustering, identifies communities in a graph: densely interconnected groups of nodes whose members have comparatively fewer connections to other groups. A friendship group is a useful model: its members interact often, while an occasional connection to someone outside the group does not make that person part of the group. section 1.1 section 5.1
The outlined groups make the main idea visible: dense ties within each group distinguish a community from a single link between otherwise separate friend groups. section 5.1
The technique helps reveal graph structure that is hard to extract from a visualization alone, especially as a network grows. Its results can expose disconnected and isolated nodes as well as multiple highly connected groups in the main graph. These groups can support friendship or content recommendations, user segmentation, and network characterization. section 1.1 section 1.3
Follower network
In a social network, nodes represent users and relationships represent follows or other interactions. Community detection can find tightly connected groups of users. In a small friendship network, Frodo, Samwise, and Jack form a community because each is connected to the others; Jack’s tie to Ganesh alone does not place Ganesh in that community, because Ganesh lacks ties to the rest of the group. section 1.1 section 5.1
Community detection is one category of graph algorithm, alongside centrality algorithms, which identify influential nodes. Algorithm output can also become input to machine-learning workflows for predicting links or classifying data points. The task begins with a graph model: entities become nodes and their connections become relationships. section 1.3 section 2.0
Prepare the graph shape before running a community detection algorithm:
- Recognize that many centrality and community detection algorithms expect a graph with one node type and one relationship type. section 2.0
- Transform graphs with multiple node or relationship types into the shape expected by the algorithm rather than changing the algorithm to fit the data. section 2.0
- Use graph query languages or built-in database tools to carry out the required transformations; data wrangling is a substantial part of graph analytics work. section 2.0
For network analysis, Cypher and the Neo4j Graph Data Science library can be used with community detection and centrality algorithms. Alongside measures such as node and relationship counts, connected-component sizes, and average local clustering coefficient, detected communities help characterize how a network is organized. section 5.1



