Skip to main content

yFiles Graphs for Jupyter logo

PyPI - Version PyPI - Downloads Docs - Latest

A graph diagram visualization widget for Jupyter Notebooks and Labs powered by yFiles for HTML.

Easily visualize graphs from various sources: Networkx✅, igraph✅, neo4j✅, pygraphviz✅, and any structured Python dictionaries and lists. Many more formats supported indirectly via Networkx imports!

The widget is supported in the default Jupyter environments, but also in other environments like VS Code or Google Colab.

yFiles Graphs for Jupyter

Try the Showcase notebook on Google Colab here. Or see the simple Introduction notebook.

yfiles-jupyter-graphs-for-neo4j

For working with Neo4j databases, we built yfiles-jupyter-graphs-for-neo4j, an open-source extension on top of yfiles-jupyter-graphs. This extension provides an easier Python interface for the driver and allows direct configuration of data mappings depending on the label or type of the node or relationship.

So if you are planning to use the extension with Neo4j databases, consider using yfiles-jupyter-graphs-for-neo4j.

yfiles-jupyter-graphs-for-kuzu

For working with Kuzu databases, we built yfiles-jupyter-graphs-for-kuzu, an open-source extension on top of yfiles-jupyter-graphs. This extension provides a specifically tailored API for easier and more domain specific usage in Kuzu databases (see Kuzu integration guide).

yfiles-jupyter-graphs-for-sparql

For working with RDF databases and SPARQL queries, we built yfiles-jupyter-graphs-for-sparql, an open-source extension on top of yfiles-jupyter-graphs. This extension provides a specifically tailored API for easier and more domain specific usage in RDF databases with SPARQL.

Supported Environments

Requirements

Installation

If you already have Jupyter installed, just pip install the prebuilt extension from the Python Package Index.

pip install yfiles_jupyter_graphs

[!IMPORTANT]
To install yfiles_jupyter_graphs from within a Jupyter Notebook cell, use %pip instead of !pip to ensure that it is installed in the correct Python environment.

If you want to start clean and get a fresh new Jupyter Lab with the widget readily installed and available, you can use docker, too:

From a shell, create a docker image that contains all that is required:

mkdir yfiles-jupyter && cd yfiles-jupyter
echo -e "FROM jupyter/scipy-notebook\nRUN pip install yfiles-jupyter-graphs" > Dockerfile
docker build -t yfiles-jupyter-graphs-on-docker .

(the above has been tested successfully with scipy-notebook:lab-3.4.7 and yfiles-jupyter-graphs==1.2.1), but we want to make sure that it will also work with upcoming versions - file an issue if it doesn't work for you!)

You can then create a fresh new instance of your server from this image like so:

docker run -it -p 8888:8888 --name yfiles-jupyter yfiles-jupyter-graphs-on-docker

Usage

In a notebook which has the widget installed in the server, in a Python cell, you can then do this:

"""Execute in jupyter notebook or jupyter lab"""
from yfiles_jupyter_graphs import GraphWidget
# shows empty widget
GraphWidget()

You can find the full documentation here.

Features

neighborhood sidebar See Node Neighborhood
Open In Colab
layouts Choose Graph Layout
Open In Colab
data sidebar Investigate Nodes or Edges Data
Open In Colab
search sidebar Search for Nodes or Edges
Open In Colab
importer Import Graph Data
Open In Colab
element color mapping Make Data Dependent Property Changes
Open In Colab
heat mapping Define a Heatmap Background
Open In Colab
leaflet mapping Use a Map Background
Open In Colab
nested graph Visualize nested data
Open In Colab

For example code look here.

Google Colab Examples

You can try the example notebooks in Google Colab by opening GitHub notebook URL: https://colab.research.google.com/github/yWorks/yfiles-jupyter-graphs/blob/main/examples/<notebook.ipynb>.

For example the Introduction notebook:
https://colab.research.google.com/github/yWorks/yfiles-jupyter-graphs/blob/main/examples/01_introduction.ipynb

Documentation

You can find the documentation here.

Code of Conduct

This project and everyone participating in it is governed by the Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to contact@yworks.com.

Feedback

This widget is by no means perfect. If you find something is not working as expected we are glad to receive an issue report from you. Please make sure to search for existing issues first and check if the issue is not an unsupported feature or known issue. If you did not find anything related, report a new issue with necessary information. Please also provide a clear and descriptive title and stick to the issue templates. See issues.

Dependencies

License

See LICENSE file.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yfiles_jupyter_graphs-1.10.8.tar.gz (10.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yfiles_jupyter_graphs-1.10.8-py3-none-any.whl (15.7 MB view details)

Uploaded Python 3

File details

Details for the file yfiles_jupyter_graphs-1.10.8.tar.gz.

File metadata

  • Download URL: yfiles_jupyter_graphs-1.10.8.tar.gz
  • Upload date:
  • Size: 10.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for yfiles_jupyter_graphs-1.10.8.tar.gz
Algorithm Hash digest
SHA256 0d57d43251bc4c3daf80240342913c94c6f72239cde7fd907d0ce1a14edbf31d
MD5 9b9c1966d4f98b7bcc637ccfe33193e1
BLAKE2b-256 1cc19890ddb740a7d975b4069a169a44ce056ad85f0569a440ef0aa9a617a204

See more details on using hashes here.

File details

Details for the file yfiles_jupyter_graphs-1.10.8-py3-none-any.whl.

File metadata

File hashes

Hashes for yfiles_jupyter_graphs-1.10.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f3f064d5b98fbbf037a947a71717f106bcea50e53e471dc36292ac09619e422f
MD5 b4c560207c39bb25647a471680a970cc
BLAKE2b-256 19269aec28be619a0fc9cc8f8585fe2cdb9569616f752f6cff9c7a856012a94d

See more details on using hashes here.

Release history Release notifications | RSS feed

2.0.0

2 files

1.10.11

2 files

1.10.10

2 files

1.10.9

2 files

This release

1.10.8 This release

2 files

1.10.7

2 files

1.10.6

2 files

1.10.5

2 files

1.10.4

2 files

1.10.3

2 files

1.10.2

2 files

1.10.1

2 files

1.10.0

2 files

1.9.0

2 files

1.8.1

2 files

1.8.0

2 files

1.7.3

2 files

1.7.2

2 files

1.7.1

2 files

1.7.0

2 files

1.6.2

2 files

1.6.1

2 files

1.6.0

2 files

1.5.1

2 files

1.5.0

2 files

1.4.8

2 files

1.4.7

2 files

1.4.6

2 files

1.4.5

2 files

1.4.4

2 files

1.4.3

2 files

1.4.2

2 files

1.4.1

2 files

1.4.0

2 files

1.3.3

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

1.2.1

2 files

1.2.0

2 files

1.1.0

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page