Add notebook for visualizing projections with PyVis#766
Add notebook for visualizing projections with PyVis#766adamnsch wants to merge 9 commits intoneo4j:mainfrom
Conversation
450af65 to
a696278
Compare
✅ Deploy Preview for neo4j-graph-data-science-client ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for neo4j-graph-data-science-client canceled.
|
| [source, python, role=no-test] | ||
| ---- | ||
| net = Network(notebook = True, | ||
| cdn_resources="remote", |
There was a problem hiding this comment.
I thought ruff would fix this ugly indentation?
There was a problem hiding this comment.
should be able to format notebooks according to https://docs.astral.sh/ruff/configuration/#jupyter-notebook-discovery
There was a problem hiding this comment.
I tried after rebasing on main, but the formatting issue remains the same after running makestyle locally
There was a problem hiding this comment.
likely wrong pandoc version installed locally.
|
It would be nice to include either a html or image for the visualization in the docs somehow... |
FlorentinD
left a comment
There was a problem hiding this comment.
Nice start!
Looking forward to extend this notebook with other options.
| [source, python, role=no-test] | ||
| ---- | ||
| net = Network(notebook = True, | ||
| cdn_resources="remote", |
There was a problem hiding this comment.
should be able to format notebooks according to https://docs.astral.sh/ruff/configuration/#jupyter-notebook-discovery
|
looked a bit into the convert.sh complain ... resulted in #767 use the correct version in |
Ok, nice! I will have a look |
Co-Authored-By: Florentin Dörre <[email protected]>
86cb0cd to
090f008
Compare
| Unsuprisingly we can see that papers largely seem clustered by academic | ||
| subject. We also note that some nodes appear larger in size, indicating |
There was a problem hiding this comment.
just the visualization does not explain to us what the academic subjects are right?
How about we add the subject as a label?
|
@adamnsch updated pandoc on CI -> the checkstyle should go green now 🤞 |
Excellent work 👏 |
d121e3c to
511a18b
Compare
511a18b to
0703121
Compare
| = Visualizing GDS Projections | ||
|
|
||
|
|
||
| https://colab.research.google.com/github/neo4j/graph-data-science-client/blob/main/examples/import-sample-export-gnn.ipynb[image:https://colab.research.google.com/assets/colab-badge.svg[Open |
FlorentinD
left a comment
There was a problem hiding this comment.
Good idea to pull the logic into a graph method for convenience
| an interactive graphical visualization of the specified graph | ||
| """ | ||
|
|
||
| actual_node_properties = list(chain.from_iterable(self.node_properties().to_dict().values())) |
| if visual_graph != self._name: | ||
| self._query_runner.call_procedure( | ||
| endpoint="gds.graph.drop", | ||
| params=CallParameters(graph_name=visual_graph), | ||
| custom_error=False, | ||
| ) | ||
| elif clean_up_size_prop: | ||
| self._query_runner.call_procedure( | ||
| endpoint="gds.graph.nodeProperties.drop", | ||
| params=CallParameters(graph_name=visual_graph, nodeProperties=size_property), | ||
| custom_error=False, | ||
| ) |
There was a problem hiding this comment.
I would suggest to have its own Graph.sample method and warn if the graph is too big.
Would avoid side-effect, the user is not aware off.
| ] | ||
| return f"{self.__class__.__name__}({self._graph_info(yields=yield_fields).to_dict()})" | ||
|
|
||
| def visualize( |
There was a problem hiding this comment.
i like the idea of this.
maybe we can have different backends to be used?
pyvis/nvl? (with default to nvl)
should have a thought on the dependency. Likely similar optional dependency as for networkx
|
#772 is the PR to allow replacing outputs for the doc version. Not yet ready but closing in :) |
|
that has been quite a journey 🚂 closing in favor of #987 |

Thank you for your contribution to the Graph Data Science Client project.
Before submitting this PR, please read Contributing to the Neo4j Ecosystem.
Make sure: