Graph components have a clear mathematical definition. In a given component, two nodes are always connected to each other through a path but are not connected to any other nodes out of the component. There are two versions of connected components:
- Strongly connected components: These make sure that the path between two nodes in the same component exists in both directions.
- Weakly connected components: A single direction is enough for weakly connected components.
Let's see an example of this in Neo4j. In this section, we are also going to use, for the first time in this book, the write procedure to store the algorithm results in Neo4j. We will also introduce a new JavaScript library to customize the visualization of large graphs.
Let's start with the following directed graph:
The Cypher code used to create the graph is available on GitHub (https://github.com/PacktPublishing/Hands-On-Graph-Analytics-with-Neo4j/blob/master...