I created an application which embedded Neo4j. In that application I created and stored some nodes with some relationships. My application has saved this database to a file. I would like to visualise that data. I know I can see graphs if I fire up the Neo4j server but I do not know how to import my neo4j.db file into the Neo4j server so that I can visualise it. Any suggestions would be greatly appreciated.
-
2To make the Neo4j server use your own db, just edit the `conf/neo4j-server.propereties` file, set the `org.neo4j.server.database.location=/path/to/your/database.db` property and fire it up with `./bin/neo4j start`. – May 29 '14 at 09:22
-
For general visualization info check this page: http://neo4j.org/develop/visualize and especially the articles from Max de Marzi http://maxdemarzi.com – Michael Hunger May 31 '14 at 08:59
-
@MichaelHunger the visualization link is dead – ComputerScientist Jun 27 '16 at 12:07
2 Answers
Depending on your use case you might have different solutions:
- Use a web-based visualization
- Use a desktop application to visualize your data
Use web-based visualization
In this case you have to take care of the web-app to visualize the data. You have basically two solutions out there: Javascript or Java applets.
For the Javascript side you have many choices: D3js, VivaGraph, SigmaJS, KeyLines.
The first three are open source and free while the last one has a commercial licence and non-free.
There're already a million questions about these libraries on SO, so I'll link you to some of those to understand the various differences.
Desktop Application
The main solutions in this case I would recommend you, depending on the kind of data are: either Gephi or Cytoscape.
In both cases I believe you have to write your own adapter to communicate with your application.
Architecture Reference
The architecture in both cases will be the following:
- The controller renders a webpage with the JS visualisation framework you want to use
- The controller offers a couple of JSON endpoints the client can use to query the data from the Neo4J embedded
- Each query fetch the data, put in a model and render the JSON to send to the client
-
I have used D3 before but with my data structure in JSON format. When I look at the Neo4j database file, I have no idea how and where it has structured the data; it's just a series of folders. This is where I am stuck. – May 28 '14 at 22:42
-
You can still use the embedded Neo4J to query the data, without exporting the raw folders outside the application. – MarcoL May 29 '14 at 08:28
If you're NOT using neo4j 2.0+ then really good way to visualize your graph is by using neoclipse. https://github.com/neo4j-contrib/neoclipse/downloads it's really handy and it has cypher support too.
Or
another quick hack is to copy your db folder (which you created by using embedded database) into $NEO4j_HOME/data/
and
change $NEO4j_HOME/conf/neo4j-server-properties file to point to
and
start your server (bin/.neo4j start). You'll be able to visualize your database at localhost:7474 I hope it helps!

- 485
- 2
- 15