Hi All,
I would need help in creating my neo4j graph.
I have 2 files:
1 is persons.csv
id, person_name, Age
1,James Smith, 27
2,Mary Anne, 32
3,John Doe, 22
and i have a relationship file: social_connect.csv
id1, id2, interaction_count
1,2,34
I want to display all nodes with the actual names displayed, this includes a node for John doe with no connection
I have the below cypher to load the nodes:
load csv with headers from "file:///persons.csv" as csvline
create (p:Person {id:toInteger(csvline.id), name:csvline.person_name , age:csvline.Age})
I also have the below code which loads the relationships and create a network graph for it.
load csv with headers from "file:///social_connect.csv" as connection
merge (n: Person {Name: connection.id1})
merge (m: Person {Name: connection.id2})
merge (n) - [r:connect] ->(m)
ON CREATE SET r.weight = toInt(n.interaction_count)
But i would like to connect the two data and then show unconnected Persons.
Any help would be much appreciated. Thank you