diff --git a/doc/modules/ROOT/pages/tutorials/graph-analytics-serverless-self-managed.adoc b/doc/modules/ROOT/pages/tutorials/graph-analytics-serverless-self-managed.adoc index 49bec7b20..a31f98bd2 100644 --- a/doc/modules/ROOT/pages/tutorials/graph-analytics-serverless-self-managed.adoc +++ b/doc/modules/ROOT/pages/tutorials/graph-analytics-serverless-self-managed.adoc @@ -35,7 +35,7 @@ version `1.15` or later. [source, python, role=no-test] ---- -%pip install "graphdatascience>=1.15" python-dotenv +%pip install "graphdatascience>=1.15" python-dotenv "neo4j_viz[gds]" ---- [source, python, role=no-test] @@ -252,6 +252,18 @@ G, result = gds.graph.project( str(G) ---- +[source, python, role=no-test] +---- +# Let us visualize the projected graph +from neo4j_viz.gds import from_gds + +VG = from_gds(gds, G, db_node_properties=["name"]) +for node in VG.nodes: + node.caption = node.properties.get("name") + +VG.render(initial_zoom=1.2) +---- + == Running Algorithms You can run algorithms on the constructed graph using the standard GDS diff --git a/doc/modules/ROOT/pages/tutorials/graph-analytics-serverless-standalone.adoc b/doc/modules/ROOT/pages/tutorials/graph-analytics-serverless-standalone.adoc index 1c123549b..3e7c8f41c 100644 --- a/doc/modules/ROOT/pages/tutorials/graph-analytics-serverless-standalone.adoc +++ b/doc/modules/ROOT/pages/tutorials/graph-analytics-serverless-standalone.adoc @@ -34,7 +34,7 @@ version `1.15` or later. [source, python, role=no-test] ---- -%pip install "graphdatascience>=1.15" python-dotenv +%pip install "graphdatascience>=1.15" python-dotenv "neo4j_viz[gds]" ---- [source, python, role=no-test] @@ -204,6 +204,18 @@ G = gds.graph.construct("people-fruits", nodes, relationships) str(G) ---- +[source, python, role=no-test] +---- +# Let us visualize the projected graph +from neo4j_viz.gds import from_gds + +VG = from_gds(gds, G, db_node_properties=["name"]) +for node in VG.nodes: + node.caption = node.properties.get("name") + +VG.render(initial_zoom=1.2) +---- + == Running Algorithms You can run algorithms on the constructed graph using the standard GDS diff --git a/doc/modules/ROOT/pages/tutorials/graph-analytics-serverless.adoc b/doc/modules/ROOT/pages/tutorials/graph-analytics-serverless.adoc index c84cab870..a0f7bcf07 100644 --- a/doc/modules/ROOT/pages/tutorials/graph-analytics-serverless.adoc +++ b/doc/modules/ROOT/pages/tutorials/graph-analytics-serverless.adoc @@ -35,7 +35,7 @@ version `1.15` or later. [source, python, role=no-test] ---- -%pip install "graphdatascience>=1.15" python-dotenv +%pip install "graphdatascience>=1.15" python-dotenv "neo4j_viz[gds]" ---- [source, python, role=no-test] @@ -244,6 +244,28 @@ G, result = gds.graph.project( str(G) ---- +[source, python, role=no-test] +---- +# Let us visualize the projected graph +from neo4j_viz.gds import from_gds + +VG = from_gds(gds, G, db_node_properties=["name"]) +for node in VG.nodes: + node.caption = node.properties.get("name") + +VG.render(initial_zoom=1.2) +---- + +[source, python, role=no-test] +---- + +---- + +[source, python, role=no-test] +---- + +---- + == Running Algorithms You can run algorithms on the constructed graph using the standard GDS diff --git a/examples/graph-analytics-serverless-self-managed.ipynb b/examples/graph-analytics-serverless-self-managed.ipynb index df946d941..f1d038481 100644 --- a/examples/graph-analytics-serverless-self-managed.ipynb +++ b/examples/graph-analytics-serverless-self-managed.ipynb @@ -57,7 +57,7 @@ }, "outputs": [], "source": [ - "%pip install \"graphdatascience>=1.15\" python-dotenv" + "%pip install \"graphdatascience>=1.15\" python-dotenv \"neo4j_viz[gds]\"" ] }, { @@ -314,6 +314,22 @@ "str(G)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Let us visualize the projected graph\n", + "from neo4j_viz.gds import from_gds\n", + "\n", + "VG = from_gds(gds, G, db_node_properties=[\"name\"])\n", + "for node in VG.nodes:\n", + " node.caption = node.properties.get(\"name\")\n", + "\n", + "VG.render(initial_zoom=1.2)" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/examples/graph-analytics-serverless-standalone.ipynb b/examples/graph-analytics-serverless-standalone.ipynb index c7be4d1d6..17a0790a9 100644 --- a/examples/graph-analytics-serverless-standalone.ipynb +++ b/examples/graph-analytics-serverless-standalone.ipynb @@ -58,7 +58,7 @@ }, "outputs": [], "source": [ - "%pip install \"graphdatascience>=1.15\" python-dotenv" + "%pip install \"graphdatascience>=1.15\" python-dotenv \"neo4j_viz[gds]\"" ] }, { @@ -272,6 +272,22 @@ "str(G)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Let us visualize the projected graph\n", + "from neo4j_viz.gds import from_gds\n", + "\n", + "VG = from_gds(gds, G, db_node_properties=[\"name\"])\n", + "for node in VG.nodes:\n", + " node.caption = node.properties.get(\"name\")\n", + "\n", + "VG.render(initial_zoom=1.2)" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/examples/graph-analytics-serverless.ipynb b/examples/graph-analytics-serverless.ipynb index 8b543c721..7852fd4aa 100644 --- a/examples/graph-analytics-serverless.ipynb +++ b/examples/graph-analytics-serverless.ipynb @@ -57,7 +57,7 @@ }, "outputs": [], "source": [ - "%pip install \"graphdatascience>=1.15\" python-dotenv" + "%pip install \"graphdatascience>=1.15\" python-dotenv \"neo4j_viz[gds]\"" ] }, { @@ -306,6 +306,36 @@ "str(G)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Let us visualize the projected graph\n", + "from neo4j_viz.gds import from_gds\n", + "\n", + "VG = from_gds(gds, G, db_node_properties=[\"name\"])\n", + "for node in VG.nodes:\n", + " node.caption = node.properties.get(\"name\")\n", + "\n", + "VG.render(initial_zoom=1.2)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "markdown", "metadata": {},