Graph Visualization With Neo4j Using Neovis.js

Leveraging Graph Algorithms For Data Visualization

In this post we’ll use a Neo4j Sandbox instance to start with a Twitter dataset, run PageRank and community detection on the data. Then show how to embed a graph visualization in a web app using Neovis.js.
This screencast shows how to use the Neovis.js library to create graph data visualizations styled to the results of graph algorithms with data from Neo4j.
  1. Binding node size to a centrality algorithm, such as degree, PageRank, or betweenness centrality. This allows us to see at a glance the most important nodes in the network.
  2. Visually grouping communities or clusters in the graph is done through the use of color, so that we can quickly identify these distinct groupings.
  3. Styling relationship thickness proportionally to an edge weight, in social network data this might be the number of interactions between two characters, in logistics and routing data it might be the distance between two distribution centers and is useful for pathfinding algorithms (such as A* or Dijkstra’s).

Getting Started With The Dataset

The data model for the Twitter Trolls dataset includes Tweets, Users, Hashtags, URLs shared in Tweets and mentions and retweets.
Here we have a tweet that was posted by a user, that another user retweeted. This implies a user-user retweets relationship. Our first step will be to find those inferred retweets relationships and run our graph algorithms.
Free download: O’Reilly “Graph Algorithms on Apache Spark and Neo4j”



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

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