Head's Up! Site migration is underway. Expect disruption to service on Thursday, Feb. 9!
β04-11-2021 08:15 AM
I was just wondering whether it is possible to construct a graph model using Florentine Families dataset in Neo4j using below image. Relationship type and direction( which are mandatory in neo4j graph model) were missing in this data, only family nodes are provided. Is there a way to construct a graph model? (Please refer below image).
Solved! Go to Solution.
β04-13-2021 05:18 AM
You could create Person
nodes and undirected KNOWS
relationships. To created undirected relationships, you just need to don't specify a direction and that's all.
Little example to create two nodes:
MERGE (:Person {name: "PAZZI", eid: 0})
MERGE (:Person {name: "SALVIATI", eid: 1})
Little example to create one relationship:
MATCH (a:Person {eid: 0}), (b:Person {eid: 1})
MERGE (a)-[:KNOWS]-(b)
After you could use a cypher projection and GDS Centrality Algorithms to get the information you want.
I hope it helps you to get you started
Regards,
Cobra
β04-12-2021 02:13 PM
β04-13-2021 04:34 AM
@Cobra Thanks for responding. I would like to construct a graph model and compute the centrality measures for each node (Degree Centrality, Betweenness Centrality, Closeness Centrality, etc).
β04-13-2021 05:18 AM
You could create Person
nodes and undirected KNOWS
relationships. To created undirected relationships, you just need to don't specify a direction and that's all.
Little example to create two nodes:
MERGE (:Person {name: "PAZZI", eid: 0})
MERGE (:Person {name: "SALVIATI", eid: 1})
Little example to create one relationship:
MATCH (a:Person {eid: 0}), (b:Person {eid: 1})
MERGE (a)-[:KNOWS]-(b)
After you could use a cypher projection and GDS Centrality Algorithms to get the information you want.
I hope it helps you to get you started
Regards,
Cobra
β04-13-2021 01:17 PM
Many thanks @Cobra. I created the graph model and also created a named graph with orientation : UNDIRECTED to compute measures of centrality (please correct me if I'm wrong).
β04-13-2021 01:19 PM
Good job, I don't see anything wrong
All the sessions of the conference are now available online