Question

I'm using Neo4j for a research project and am struggling with a small problem.

The underlying data is a highly linked graph and I'm not able to visualize it in a good manner. As you can see in the screenshot, the relationships are overlapping and I can always just click the top one for further information. I already tried two approaches: try to hide relationships in the visualized result (Neo4j Browser with Cypher queries) and I was looking for alternatives to neo4j's built in visualization.

So my desired approach would be to just hide relationships from the visualized result. But even queries such as MATCH (a)-[t]->(b) WHERE t.probability > 0.1 RETURN a,b,t return less nodes and still display all relationships between this few nodes.

Does anybody know how to hide different relationships in the result? Or if it is not possible with neo4j's built in solution an open source or at least free visualization tool recommendation would be highly appreciated.

Some info about my graph: it displays a transition map (A Bayesian Network) of 10 zones and the probabilities of moving from one zone to another. There are a couple of relationships between each node, representing different time intervals. So in example 'Moving from A to B in less than an hour has a probability of 42%'

Cypher query result

Was it helpful?

Solution

Neo4j server does an extra query for relationships after it retrieved the nodes, I'm not aware of an easy way to prevent that.

You could use something that uses a different approach to visualization.

E.g. like my demo app here that uses alchemy.js for visualization:

http://jexp.github.io/cy2neo/

OTHER TIPS

Zonic,

If you click on a node or relationship, you will get a pop-up that has an option to view the graph stylesheet. From the dialog that pops up, you can download the contents, then modify the relationships that you don't wish to see to make the lines and text white. Drag and drop the modified, downloaded .grass file back into the stylesheet dialog, and see if that helps.

You could also try the gephi application and see what that does for you. It's free, and it is focused on visualization.

Grace and peace,

Jim

maybe you would like to try external applications as stated in this answer:

neo4j, Sorry! Too many neighbours

Do you mean basic filtering of the relationships, like this...

MATCH (a:Person)-[t:IS_RELATED_TO]->(b:Person) WHERE t.probability > 0.1 RETURN a,b,t

You can hide the extra relationships by turning off auto-complete with the switch in the bottom-right corner. By default Neo4j also fetches and displays relationships between returned nodes, even if they were not part of your query. With auto-complete turned off, Neo4j will only displayed the relationships returned by the actual query.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top