agensgraph4jupyter

An agensgraph visualizer for Jupyter


Keywords
jupyter, agensgraph, graphdb
License
MIT
Install
pip install agensgraph4jupyter==0.1.1

Documentation

Agensgrap4jupyter

A tool to visualize graph database queries from Neo4j in the Jupyter Notebook.

Install

pip install agensgraph4jupyter

screen shot 2016-04-15 at 13 13 33

Docs

First thing you must do is call the agensgraph4jupyter.init_notebook_mode() to load all the javascript.

import agensgraph4jupyter
agensgraph4jupyter.init_notebook_mode()

Then execute a query using [iomedhealth/agensgraph] and give the result to the draw() function.

import agensgraph

conn = agensgraph.connect("dbname=my_db")
cur = conn.cursor()
cur.execute("SET graph_path=my_graph;")

cur.execute("""
MATCH 
   (p1 {id: 123456}),
   (p2 {id: 373205}),
   path=shortestpath((p1)-[*1..8]->(p2))
RETURN path;
""")

agensgraph4jupyter.draw(cur.fetchall())

Licence

The MIT License (MIT) | See LICENSE.md

Copyright (c) 2018 IOMED Medical Solutions S.L