cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Is it possible to construct a graph model using Padgett's data on marriage ties using Neo4j?

Kevin6482
Node Clone

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).

3X_4_8_486cc5e6cabed026f66709e719fadaf4e9e30059.jpeg

1 ACCEPTED SOLUTION

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

View solution in original post

5 REPLIES 5

Hello @Kevin6482

I'm not sure about what you would like to get as result?

Regards,
Cobra

@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).

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

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).

Good job, I don't see anything wrong

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online