Quantcast
Channel: CodeSection,代码区,数据库(综合) - CodeSec
Viewing all articles
Browse latest Browse all 6262

Neo4j basic visualization (spoon,Zeppelin)

$
0
0

I started using Neo4j about 7 months ago and loved it from the first successful LOAD CSV on. As my skills of cypher and modeling increased, the bigger was the need for visualizing data and drilling down. For some time I had a problem, that I knew how to write the query to extract data from Neo4j, but no proper way for visualizing results. Today I am going to share with you two basic options, that i’ve learned along the way.

Spoon.js

Let me first introduce an awesome project, called spoon.js. All you have to do is to open inspector in your Neo4j browser and paste script below to the consoleand you are ready to start.

$ . getScript ( ‘ https://cdn.rawgit.com/jexp/spoon-neo4j/master/spoon.js ‘ );

You can also check the github repo here

With this simple step you get basic visualizations directly in Neo4j browser.


Neo4j basic visualization (spoon,Zeppelin)

If you are skilled with cypher, the spoon can take you pretty far, since you do all the filtering and aggregating in query, before returning the data you want. You can also fake timeseries plots by using unix time, obviously it’s not good for any kind of analysis, but can be fun.


Neo4j basic visualization (spoon,Zeppelin)

Since this is the first version of the spoon.js i think the future is bright for what may come out of this.

Apache zeppelin

Zeppelin is a web based notebook that enables interactive data visualizations. Once you have installed zeppelin, all you have to do is to set up the translator for Neo4j and you are ready to go. It is fairly simple to setup, just follow instructions from this link .


Neo4j basic visualization (spoon,Zeppelin)

Principle is the same as in spoon, you write the cypher query and choose the visualization you want and that’s it, except that in zeppelin, there are a few more options for customizing your visualization.


Neo4j basic visualization (spoon,Zeppelin)

Depending on how you export data to zeppelin you can interact with the visualization by picking sum,count,etc of the value to be shown plus you can show more values on y axis easily and you can use groups to group by values.


Neo4j basic visualization (spoon,Zeppelin)

All in all these are two of the most basic and simple visualizations to use, which require nothing more than a cypher query. But they both lack the ability to easily drill down, and they aren’t good at drawing a timeline or a nice looking stacked area charts. What they lack, they make up with the simplistic approach, so I would recommend them to anyone new to Neo4j. For more advanced use-cases I did a Neo4j to ELK stack using apoc library, whichI will show you how to do next time.


Viewing all articles
Browse latest Browse all 6262

Trending Articles