generated from thedatasociety/lab-template
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
42d21f9
commit 816a7b0
Showing
37 changed files
with
216 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"id": "7886114b-ad71-42af-a22c-58e931408b1b", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"application/vnd.jupyter.widget-view+json": { | ||
"model_id": "619e600a0dda4b81817f4254f9d03309", | ||
"version_major": 2, | ||
"version_minor": 0 | ||
}, | ||
"text/plain": [ | ||
"GraphWidget(layout=Layout(height='500px', width='100%'))" | ||
] | ||
}, | ||
"metadata": {}, | ||
"output_type": "display_data" | ||
} | ||
], | ||
"source": [ | ||
"\"\"\"Execute in jupyter notebook or jupyter lab\"\"\"\n", | ||
"from yfiles_jupyter_graphs import GraphWidget\n", | ||
"# shows empty widget\n", | ||
"GraphWidget()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"id": "17beb2f3-1bff-46fb-8af0-0c573a80fcbd", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"application/vnd.jupyter.widget-view+json": { | ||
"model_id": "a4cee0e3bad34562a6d7aef1cad67eaa", | ||
"version_major": 2, | ||
"version_minor": 0 | ||
}, | ||
"text/plain": [ | ||
"GraphWidget(layout=Layout(height='610px', width='100%'))" | ||
] | ||
}, | ||
"metadata": {}, | ||
"output_type": "display_data" | ||
} | ||
], | ||
"source": [ | ||
"from yfiles_jupyter_graphs_for_neo4j import Neo4jGraphWidget\n", | ||
"from neo4j import GraphDatabase\n", | ||
"\n", | ||
"NEO4J_URI = \"neo4j+ssc://demo.neo4jlabs.com\" \n", | ||
"NEO4J_USERNAME = \"movies\"\n", | ||
"NEO4J_PASSWORD = \"movies\"\n", | ||
"driver = GraphDatabase.driver(uri = NEO4J_URI, auth = (NEO4J_USERNAME, NEO4J_PASSWORD), database = 'movies')\n", | ||
"\n", | ||
"g = Neo4jGraphWidget(driver)\n", | ||
"\n", | ||
"g.show_cypher(\"MATCH (s)-[r]->(t) RETURN s,r,t LIMIT 20\")" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 3, | ||
"id": "386de43e-a301-47ef-a001-220188647506", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"Collecting neo4j\n", | ||
" Downloading neo4j-5.23.0-py3-none-any.whl.metadata (5.7 kB)\n", | ||
"Requirement already satisfied: pytz in /srv/conda/envs/notebook/lib/python3.10/site-packages (from neo4j) (2024.1)\n", | ||
"Downloading neo4j-5.23.0-py3-none-any.whl (293 kB)\n", | ||
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m293.7/293.7 kB\u001b[0m \u001b[31m4.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\n", | ||
"\u001b[?25hInstalling collected packages: neo4j\n", | ||
"Successfully installed neo4j-5.23.0\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"! pip install neo4j" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.10.14" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.