Neo4j is one of the, if not THE, most famous graph database. It comes with Neo4j Browser that includes a powerful graph visualization tool. However, this tool is not well suited for nodes with geographical attributes that we prefer visualizing on a map. Neomap was born to address this issue.
If you haven’t already, you will have to install Neo4j Desktop. It’s an awesome application from which you can manage your local and remote graphs, installed plugins and, most important for us today, applications. Installation instructions for Neo4j desktop depending on your OS can be found on the Neo4j website.
Once Neo4j Desktop is installed and running, we can move on to the neomap installation.
You can now also find neomap on the Neo4j Graph App Gallery install.graphapp.io
1. First step is to visit https://github.com/stellasia/neomap/releases and download the last release’ .tgz: neomap-<version>.tgz (neomap-0.3.1.tgz at the time of writing)
2. In Neo4j Desktop and go to “Graph Applications” view:
3. Drag and drop the tarball you downloaded earlier below “Install Graph Application”
If you have an older version you might want to remove that one.
After having agreed to trust this new application, it will be installed in Neo4j Desktop and available to be added in any of your projects.
4. In a given project, click to “Add Application” (it should be next to “Neo4j Browser” which is installed by default)
5. In the popup window, select “neomap”.
We’re done! Neomap is now available for all the graphs in that project. Let’s discover how to use it.
Let’s learn about the functionalities by going through the interface. All configurations are done in the left panel, where you can create the layers that will be displayed on the right side map.
Two main options are to be considered:
The simple mode
In the simple mode, you choose the node labels that will be shown on the map together with the properties to be used as latitude/longitude and the tooltip.You can also configure the LIMIT of rows to be fetched.
NOTE: If you display too many markers, the rendering performance will slow down.
If you need more configuration, like including WHERE clause, you will have to use the advanced mode.
The advanced mode
There, you can write the cypher query you need.
The only constraint is that it must RETURN at least the following columns (all the other will be ignored):
- tooltip (optional): the data to display on marker hover in case of marker rendering (see below).
Note: Currently the Neo4j spatial Point type is not yet supported. If you want to use it you can use a Cypher query like this in an Advanced Layer.
RETURN n.location.latitude as latitude, n.location.latitude as latitude, n.name as tooltip
Each node will be shown as a pin marker. Some options are specific to marker layers:
- Color: marker color
- Tooltip (in simple layer mode): the property to use in popups.
A heatmap will be created based on the nodes distribution at the location.
Options specific to heatmap layers are:
- Radius: radius for heatmap points (default: 30) (source)
You can add as many layers as you want, mixing the layer type and the rendering at your convenience.
On the map top right corner, you can list all layers and hide/show them if you need to. If a layer is not needed anymore, you can delete it permanently by clicking the red “Delete” button in the layer list from the left side bar.
Check out the video on YouTube for a live demo:
More information and documentation about future versions will be made available on the project wiki: https://github.com/stellasia/neomap/wiki
neomap was started during Global Graph Hack 2019 (a one month hackathon) but it is still an evolving project. For instance, I plan to implement support for Neo4j’s spatial types in the very near future.
If you like the project and would like to contribute, I welcome all kind of contributions, for instance:
- Help with fixing the open issues in GitHub (including both bugs and planned features implementation)
- Report bugs
- Suggest new features that would be helpful to you
And in any case, don’t hesitate to star the project on GitHub if you think it’s a useful tool!
Thanks for reading and enjoy mapping your graph data!