I am streaming graphs from neo4j to Gephi using the apoc.gephi.add(). The method only passes one property of the node as a node label in Gephi. Which is not only desired node label I want. Is there a way to transfer other property as a node label to Gephi?
For example, My query is as below:
MATCH p=(a:Artist)-[r:LOVES]->(b:Artist) WITH p LIMIT 5
call apoc.gephi.add('http://localhost:8080','workspace2', p) yield nodes, relationships, time
return nodes, relationships, time
In the above query, it only shows the names of the artists.
The above nodes has other properties like type, year_of_work etc. I want to display the other properties too in the node in Gehi. The apoc method only pass one property as node label. Following is the Node table in Gephi.
So is there a way to pass other properties? Is there any other way to stream a graph in Gephi from neo4j with the desired behavior?
This functionality was just recently added. You can use:
MATCH p=(a:Artist)-[r:LOVES]->(b:Artist) WITH p LIMIT 5
call apoc.gephi.add('http://localhost:8080','workspace2',p,'weight',['type', 'year_of_work']) yield nodes, relationships, time
return nodes, relationships, time
Where fourth parameter can be used to export weight, and fifth parameter as an array of all the properties you want to export from both nodes and relationships. Check documentation for more.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With