cancel
Showing results forΒ 
Search instead forΒ 
Did you mean:Β 

Neo4j graph visualization in JupyterLab

xavier_lefumeux
Node Link

Hi ladies & gents,

I've just been discovering Jupyter(Lab) notebooks on one side (new need in my day to day's official job) and playing with Neo4j for few months on the other side. Within my local test&crash sandbox (Debian VM with Docker running in VirtualBox on my Windows laptop), I do have a docker version of several tools including among others:

  • jupyterlab minimal notebook version for documentation needs
  • draw.io for architecture design, business process or uml diagrams
  • and neo4j latest for everything I do with graphs

I did install Neo4j python drivers (official and py2neo one

s) in jupyterlab and am able to query the neo4j instance in docker from there (cells with python kernel), retrieving data with cypher queries...

My intent would be to display graphical outputs of my graphs into jupyterlab cells.
Ultimately, including neo4j browser or bloom's rendering would be ideal for documentation purposes.

Could someone advise on how to get into that direction ?

My first tries were as simple as generating neo4j outputs in the browser as svg or png stored then at a given jupyterlab location, so that it can be rendered as images then in the notebook.
Being unable at the moment to display neo4j browser in jupyterlab so that to capture as a screenshot what is displayed there, I would be looking for the following solutions :

  • embed a graphical toolkit in jupyterlab being able to display the neo4j graph in the way it is being done in neo4j browser so that it can be caught and rendered then in pdf or html or latex export formats
  • make the neo4j browser as an extension in jupyterlab and cover the same needs
  • or anything that could make the trick here πŸ™‚

Note: I'm not a python guru, used to code in java or scala when I was a developer and quite still new to neo4j and jupyter to some extent but still willing to learn

Thanks in advance for any feedback, guidance or hint on this topic

Best regards
Xav

4 REPLIES 4

oleg_neo4j
Graph Buddy

Hi Xavier, were you able find a way to display Neo4j graphs in Jupyter(Lab)?

xavier_lefumeux
Node Link

Hi Oleg,

Thanks for getting in touch on this topic.

Unfortunately, not yet.

Still using either image rendering as an intermediate step for graphical rendering from Neo4j or python drivers for querying graphs for table formating from within JupyterLab.

Actually, I've been working on JupyterLab, DrawIO, GitLab and BonitaBPM working together to implement a full process of creation, sharing, publishing, reviewing and approval for Technical Architecture documentation. I'm in the field of IT Cloud & Legacy infrastructure at the moment, maintaining an image of the infrastructure as an architecture view between several layers. The data set I'm using is extracted from various IT tools such as: Netbox & NLyte for DCIM, EfficientIP for IPAM, vCenter for VM... This is not meant at being a uCMDB but rather, in comparison with DrawIO schemas, a way to check on expected architecture "on paper" versus the reality coming from various Source of Truth data sets. Using graphs, I'm able then to provide different views on this data, like application to infrastructure mapping, consistency checks, correlation rules, what if scenario... through cypher queries.

I've realized that embedding the graphical view avialble in Neo4j Browser or Bloom in a python framework such as JupyterLab is far from being obvious :). At least from my little window.

I was hoping to be able to render as an IFrame the Neo4j URL with some parameters (like a Cypher query) and programmatically, save the rendered output into the notebook like nbconvert does as attachments or in a separate folder.

I've been looking into that direction lately. But I'm afraid I have several steps / difficulties in there to get close to a solution. I guess a more inclusive solution would be to embed neo4j browser as a JupyterLab extension (like there is one for DrawIO).

Will keep you / the community posted if I figure out something.
Any help / hint appreciated though
Xavier

I am also following, so please do update if you find a path(s) forward!

Niko-La
Node

@xabierarbonies @oleg_neo4j where you guys able to find a way to make the graph interactive in jupyterlab?