Hello everyone,
I have a graph which includes a hierarchy of nuts regions, among others.
This is the cypher which was used to create the hierarchical relationships between the different levels of regions:
MATCH (n3:Nuts3)
MATCH (n2:Nuts2 {code: left(n3.code, 4)})
MERGE (n3)-[:PART_OF]->(n2);
MATCH (n2:Nuts2)
MATCH (n1:Nuts1 {code: left(n2.code, 3)})
MERGE (n2)-[:PART_OF]->(n1);
MATCH (n1:Nuts1)
MATCH (c:Country {code: left(n1.code, 2)})
MERGE (n1)-[:PART_OF]->(c);
So basically, every NUTS 3 region (the lowest level) is a part of a NUTS 2 region which is in turn part of a NUTS 1 region.
However, when I CALL db.schema.visualization
, I get the following:
Can someone explain to me where the self-ties and the reciprocal ties between Nuts1 and Nuts2 come from? Is the creation of the ties a bad way to do it? Or did I misunderstand something about the schema visualization?
Best
Jakob