All Projects → aws → Graph Notebook

aws / Graph Notebook

Licence: other
Library extending Jupyter notebooks to integrate with Apache TinkerPop and RDF SPARQL.

Projects that are alternatives of or similar to Graph Notebook

Image generator
DCGAN image generator 🖼️.
Stars: ✭ 173 (-13.07%)
Mutual labels:  jupyter-notebook, jupyter
Lets Plot Kotlin
Kotlin API for Lets-Plot - an open-source plotting library for statistical data.
Stars: ✭ 181 (-9.05%)
Mutual labels:  jupyter-notebook, jupyter
Stata kernel
A Jupyter kernel for Stata. Works with Windows, macOS, and Linux.
Stars: ✭ 172 (-13.57%)
Mutual labels:  jupyter-notebook, jupyter
Nbdime
Tools for diffing and merging of Jupyter notebooks.
Stars: ✭ 2,135 (+972.86%)
Mutual labels:  jupyter-notebook, jupyter
California Coronavirus Data
The Los Angeles Times' independent tally of coronavirus cases in California.
Stars: ✭ 188 (-5.53%)
Mutual labels:  jupyter-notebook, jupyter
Signals And Systems Lecture
Continuous- and Discrete-Time Signals and Systems - Theory and Computational Examples
Stars: ✭ 166 (-16.58%)
Mutual labels:  jupyter-notebook, jupyter
Nlp profiler
A simple NLP library allows profiling datasets with one or more text columns. When given a dataset and a column name containing text data, NLP Profiler will return either high-level insights or low-level/granular statistical information about the text in that column.
Stars: ✭ 181 (-9.05%)
Mutual labels:  jupyter-notebook, jupyter
Cheatsheets.pdf
📚 Various cheatsheets in PDF
Stars: ✭ 159 (-20.1%)
Mutual labels:  jupyter-notebook, jupyter
Choochoo
Training Diary
Stars: ✭ 186 (-6.53%)
Mutual labels:  jupyter-notebook, jupyter
Graph attention pool
Attention over nodes in Graph Neural Networks using PyTorch (NeurIPS 2019)
Stars: ✭ 186 (-6.53%)
Mutual labels:  graph, jupyter-notebook
Learnpythonforresearch
This repository provides everything you need to get started with Python for (social science) research.
Stars: ✭ 163 (-18.09%)
Mutual labels:  jupyter-notebook, jupyter
Juniper
🍇 Edit and execute code snippets in the browser using Jupyter kernels
Stars: ✭ 189 (-5.03%)
Mutual labels:  jupyter-notebook, jupyter
Py
Repository to store sample python programs for python learning
Stars: ✭ 4,154 (+1987.44%)
Mutual labels:  jupyter-notebook, jupyter
Ipywebrtc
WebRTC for Jupyter notebook/lab
Stars: ✭ 171 (-14.07%)
Mutual labels:  jupyter-notebook, jupyter
Nbdev template
Template for nbdev projects
Stars: ✭ 161 (-19.1%)
Mutual labels:  jupyter-notebook, jupyter
Ocaml Jupyter
An OCaml kernel for Jupyter (IPython) notebook
Stars: ✭ 177 (-11.06%)
Mutual labels:  jupyter-notebook, jupyter
Jupyter Server Proxy
Jupyter notebook server extension to proxy web services.
Stars: ✭ 153 (-23.12%)
Mutual labels:  jupyter-notebook, jupyter
Ipystata
Enables the use of Stata together with Python via Jupyter (IPython) notebooks.
Stars: ✭ 154 (-22.61%)
Mutual labels:  jupyter-notebook, jupyter
Unipop
Data Integration Graph
Stars: ✭ 184 (-7.54%)
Mutual labels:  graph, gremlin
Awesome Jupyter
A curated list of awesome Jupyter projects, libraries and resources
Stars: ✭ 2,523 (+1167.84%)
Mutual labels:  jupyter-notebook, jupyter

Graph Notebook: easily query and visualize graphs

The graph notebook provides an easy way to interact with graph databases using Jupyter notebooks. Using this open-source Python package, you can connect to any graph database that supports the Apache TinkerPop or the RDF SPARQL graph model. These databases could be running locally on your desktop or in the cloud. Graph databases can be used to explore a variety of use cases including knowledge graphs and identity graphs.

Visualizing Gremlin queries:

Gremlin query and graph

Visualizing SPARQL queries:

SPARL query and graph

Instructions for connecting to the following graph databases:

Endpoint Graph model Query language
Gremlin Server property graph Gremlin
Blazegraph RDF SPARQL
Amazon Neptune property graph or RDF Gremlin or SPARQL

We encourage others to contribute configurations they find useful. There is an additional-databases folder where more information can be found.

Features

Notebook cell 'magic' extensions in the IPython 3 kernel

%%sparql - Executes a SPARQL query against your configured database endpoint.

%%gremlin - Executes a Gremlin query against your database using web sockets. The results are similar to what the Gremlin console would return.

%%graph_notebook_config - Sets the executing notebook's database configuration to the JSON payload provided in the cell body.

%%graph_notebook_vis_options - Sets the executing notebook's vis.js options to the JSON payload provided in the cell body.

%%neptune_ml - Set of commands to integrate with NeptuneML functionality. Documentation

TIP 👉 There is syntax highlighting for both %%sparql and %%gremlin queries to help you structure your queries more easily.

Notebook line 'magic' extensions in the IPython 3 kernel

%gremlin_status - Obtain the status of Gremlin queries. Documentation

%sparql_status - Obtain the status of SPARQL queries. Documentation

%load - Generate a form to submit a bulk loader job. Documentation

%load_ids - Get ids of bulk load jobs. Documentation

%load_status - Get the status of a provided load_id. Documentation

%neptune_ml - Set of commands to integrate with NeptuneML functionality. You can find a set of tutorial notebooks here. Documentation

%status - Check the Health Status of the configured host endpoint. Documentation

%seed - Provides a form to add data to your graph without the use of a bulk loader. both SPARQL and Gremlin have an airport routes dataset.

%graph_notebook_config - Returns a JSON payload that contains connection information for your host.

%graph_notebook_host - Set the host endpoint to send queries to.

%graph_notebook_version - Print the version of the graph-notebook package

%graph_notebook_vis_options - Print the Vis.js options being used for rendered graphs

TIP 👉 You can list all the magics installed in the Python 3 kernel using the %lsmagic command.

Prerequisites

You will need:

Installation

# pin specific versions of Jupyter and Tornado dependency
pip install notebook==5.7.10
pip install tornado==4.5.3

# install the package
pip install graph-notebook

# install and enable the visualization widget
jupyter nbextension install --py --sys-prefix graph_notebook.widgets
jupyter nbextension enable  --py --sys-prefix graph_notebook.widgets

# copy static html resources
python -m graph_notebook.static_resources.install
python -m graph_notebook.nbextensions.install

# copy premade starter notebooks
python -m graph_notebook.notebooks.install --destination ~/notebook/destination/dir  

# start jupyter
jupyter notebook ~/notebook/destination/dir

Connecting to a graph database

Gremlin Server

In a new cell in the Jupyter notebook, change the configuration using %%graph_notebook_config and modify the fields for host, port, and ssl. For a local Gremlin server (HTTP or WebSockets), you can use the following command:

%%graph_notebook_config
{
  "host": "localhost",
  "port": 8182,
  "auth_mode": "DEFAULT",
  "iam_credentials_provider_type": "ROLE",
  "load_from_s3_arn": "",
  "ssl": false,
  "aws_region": "us-east-1"
}

To setup a new local Gremlin Server for use with the graph notebook, check out additional-databases/gremlin server

Blazegraph

Change the configuration using %%graph_notebook_config and modify the fields for host, port, and ssl. For a local Blazegraph database, you can use the following command:

%%graph_notebook_config
{
  "host": "localhost",
  "port": 9999,
  "auth_mode": "DEFAULT",
  "iam_credentials_provider_type": "ROLE",
  "load_from_s3_arn": "",
  "ssl": false,
  "aws_region": "us-east-1"
}

You can also make use of namespaces for Blazegraph by specifying the path graph-notebook should use when querying your SPARQL like below:

%%graph_notebook_config

{
  "host": "localhost",
  "port": 9999,
  "auth_mode": "DEFAULT",
  "iam_credentials_provider_type": "ENV",
  "load_from_s3_arn": "",
  "ssl": false,
  "aws_region": "us-west-2",
  "sparql": {
    "path": "blazegraph/namespace/foo/sparql"
  }
}

This will result in the url localhost:9999/blazegraph/namespace/foo/sparql being used when executing any %%sparql magic commands.

To setup a new local Blazegraph database for use with the graph notebook, check out the Quick Start from Blazegraph.

Amazon Neptune

Change the configuration using %%graph_notebook_config and modify the defaults as they apply to your Neptune cluster:

%%graph_notebook_config
{
  "host": "your-neptune-endpoint",
  "port": 8182,
  "auth_mode": "DEFAULT",
  "iam_credentials_provider_type": "ENV",
  "load_from_s3_arn": "",
  "ssl": true,
  "aws_region": "your-neptune-region"
}

To setup a new Amazon Neptune cluster, check out the AWS documentation.

When connecting the graph notebook to Neptune, make sure you have a network setup to communicate to the VPC that Neptune runs on. If not, you can follow this guide.

Authentication (Amazon Neptune)

If you are running a SigV4 authenticated endpoint, ensure that the config field iam_credentials_provider_type is set to ENV and that you have set the following environment variables:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_REGION
  • AWS_SESSION_TOKEN (OPTIONAL. Use if you are using temporary credentials)

Contributing Guidelines

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].