DEV Community

Tito Osadebey
Tito Osadebey

Posted on

Getting Started with Apache AGE: A Comprehensive Guide (Part 3)

In this article, we would be looking at AGE Viewer. AGE Viewer is a web-based tool that is used to visualize the relationships between nodes, edges and the output of cypher queries in AGE. It can handle large and complex graph data.

Installing AGE Viewer
npm is required to install AGE Viewer. You can install through the terminal with:

nvm install 14.16.0
Enter fullscreen mode Exit fullscreen mode

Next, go into the directory where you downloaded AGE and download AGE Viewer there:

git clone https://github.com/apache/age-viewer.git
Enter fullscreen mode Exit fullscreen mode

Launching AGE Viewer

cd age-viewer
npm run setup
npm run start 
Enter fullscreen mode Exit fullscreen mode

This should open AGE Viewer in a browser on your PC and you should see some empty boxes requiring details to connect to a database. Ensure you type in the right details. In my case, it will be:
Image description
If connected successfully, you should see something similar to the image below with your details, the nodes and edges.
Image description

Visualizing Queries
We can visualize queries now that we have AGE Viewer set up. Let’s see all the nodes present in this graph.

SELECT * FROM cypher('test', $$ MATCH (v) RETURN v $$) as (v agtype);
Enter fullscreen mode Exit fullscreen mode

Image description

We can also visualize the relationship between nodes that have similar tribes:

SELECT * FROM cypher('test', $$ MATCH (v)-[r:IS]-(v2) RETURN v, r, v2 $$) AS (v agtype, r agtype, v2 agtype);
Enter fullscreen mode Exit fullscreen mode

Image description

Conclusion
Visualizing data is very important for efficient data extraction, analysis and event prediction. AGE Viewer helps ease this process with its awesome functionalities. In this post, we just scratched the surface on what is an ideal tool for data visualization in graph database systems which would be a great asset for data scientists, analysts and everyone working with data.

References
For more information on Apache AGE, visit:
AGE website
AGE GitHub
AGE Viewer

Top comments (0)