The data we are going to use in the rest of this chapter is a randomly generated geometric graph. This kind of graph has many interesting features, one of them being its ability to reproduce the behavior of some real-life graphs such as social graphs.
After downloading the data and placing it in the import folder of our graph, we can use the following Cypher statement to import it into Neo4j:
LOAD CSV FROM "file:///graph_T2.edgelist" AS row
FIELDTERMINATOR " "
MERGE (u:Node {id: toInteger(row[0])})
MERGE (v:Node {id: toInteger(row[1])})
MERGE (u)-[:KNOWS_T2]->(v)
The graph contains only 500 nodes and 3,565 relationships, which is the reason why we can ignore the warning regarding the Eager operator in the preceding query.
The training set contains edges that were already present in the graph at time t2. So let's also import the graph at a prior time, t1. At that moment, the nodes are the same as the already existing ones, so we...