Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
10-23-2018 01:14 PM
Neo4j has a useful procedure called
call apoc.export.graphml.query(
'MATCH (n) OPTIONAL MATCH p = (n)-[r]-(m) RETURN n,r,m',
'yourPath/exportQuery.graphml', {useTypes:true})
This can allow you to easily visualize your data in yEd by yWorks, a very useful diagramming tool that can handle lightweight models at scale and provide different ways to organize and visual your data which is not offered in the Neo4j Browser. However, the current procedure outputs a fairly barebones graphml file, it only uses one shape (squares) and only 1 color (banana yellow). Despite the usefulness of seeing the graph topology and structure, it is also useful to see the various types of nodes that may be present in the graph as well. However, much of the meta data still gets transferred to the graphml file despite it not being used.
I have made a pretty simple python script that reads in a graphml file and dictionary object which states the shape and color of different node labels in the graph and then colorizes and labels the data with both id keys and shapes. The script can be found here: https://github.com/bsquire0128/Squire-Product-Catalog/blob/master/colorize_graphml.py feel free to check it out and use it. Below is an example of the difference between the graphml yEd visualizations.
Before:
After:
Cheers and Happy graphing
10-24-2018 03:23 AM
Thanks for submitting!
I’ve added a tag that allows your blog to be displayed on the community home page!
All the sessions of the conference are now available online