Introducing Neomap, a Neo4j Desktop application for spatial data

Estelle Scifo
Nov 16, 2019 · 4 min read

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.

Image for post
Image for post
neomap 0.3.1 opening

Installation

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.

Image for post
Image for post
install.graphapp.io

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:

Image for post
Image for post

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)

Image for post
Image for post
Add a new application

5. In the popup window, select “neomap”.

Image for post
Image for post
+Add neomap

We’re done! Neomap is now available for all the graphs in that project. Let’s discover how to use it.

Usage

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:

Layer type

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.

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):
- latitude
- longitude
- tooltip (optional): the data to display on marker hover in case of marker rendering (see below).

Image for post
Image for post
Layer type choice

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.

MATCH (n:Location) 
RETURN n.location.latitude as latitude, n.location.latitude as latitude, n.name as tooltip

Map rendering

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)

Image for post
Image for post
Map rendering choice

You can add as many layers as you want, mixing the layer type and the rendering at your convenience.

Image for post
Image for post
Example rendering with two layers: one heatmap layer and one marker layer.

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:

Live Demo Video for neomap

More information and documentation about future versions will be made available on the project wiki: https://github.com/stellasia/neomap/wiki

Next steps

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!

https://github.com/stellasia/neomap/

Thanks for reading and enjoy mapping your graph data!

Neo4j Developer Blog

Developer Content around Graph Databases, Neo4j, Cypher…

Estelle Scifo

Written by

PhD, Data Scientist, Python developer — Graphie award 2019 @Neo4j — author @PacktPub — https://www.linkedin.com/in/estellescifo/

Neo4j Developer Blog

Developer Content around Graph Databases, Neo4j, Cypher, Data Science, Graph Analytics, GraphQL and more.

Estelle Scifo

Written by

PhD, Data Scientist, Python developer — Graphie award 2019 @Neo4j — author @PacktPub — https://www.linkedin.com/in/estellescifo/

Neo4j Developer Blog

Developer Content around Graph Databases, Neo4j, Cypher, Data Science, Graph Analytics, GraphQL and more.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store