You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: changelog.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,12 +4,12 @@
4
4
5
5
- Do not automatically derive size and caption for `from_neo4j` and `from_gql_create`. Use the `size_property` and `node_caption` parameters to explicitly configure them.
6
6
- Change API of integrations to only provide basic parameters. Any further configuration should happen ons the Visualization Graph object:
7
-
-`from_gds`
8
-
- Drop parameters size_property, node_radius_min_max. `Use VG.resize_nodes(property=...)` instead
9
-
- rename additional_node_properties to node_properties
10
-
- Don't derive fields from properties. Use `VG.map_properties_to_fields` instead
11
7
-`from_pandas`
12
8
- Drop `node_radius_min_max` parameter. `VG.resize_nodes(...)` instead
9
+
-`from_neo4j`, `from_gds`, `from_gql_create`
10
+
- Drop parameters `size_property`, `node_radius_min_max`. Use `VG.resize_nodes(property=...)` instead
11
+
- rename additional_node_properties to node_properties
12
+
- Don't derive fields from properties. Use `VG.map_properties_to_fields` instead
13
13
14
14
## New features
15
15
@@ -25,7 +25,7 @@
25
25
26
26
- Validate fields of a node and relationship not only at construction but also on assignment.
27
27
- Allow resizing per node property such as `VG.resize_nodes(property="score")`.
28
-
- Color nodes by label in `from_gds`.
28
+
- Color nodes by label in `from_gds` and `from_gql_create`.
29
29
- Add `table` property to nodes and relationships created by `from_snowflake`. This is used as a default caption.
Copy file name to clipboardExpand all lines: docs/source/integration.rst
+6-58Lines changed: 6 additions & 58 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -164,22 +164,9 @@ The ``from_neo4j`` method takes one mandatory positional parameter:
164
164
A ``data`` argument representing either a query result in the shape of a ``neo4j.graph.Graph`` or ``neo4j.Result``, or a
165
165
``neo4j.Driver`` in which case a simple default query will be executed internally to retrieve the graph data.
166
166
167
-
We can also provide an optional ``size_property`` parameter, which should refer to a node property,
168
-
and will be used to determine the sizes of the nodes in the visualization.
169
-
170
-
The ``node_caption`` and ``relationship_caption`` parameters are also optional, and indicate the node and relationship
171
-
properties to use for the captions of each element in the visualization.
172
-
By default, the captions will be set to the node labels relationship types, but you can specify any property that
173
-
exists on these entities.
174
-
175
-
The last optional property, ``node_radius_min_max``, can be used (and is used by default) to scale the node sizes for
176
-
the visualization.
177
-
It is a tuple of two numbers, representing the radii (sizes) in pixels of the smallest and largest nodes respectively in
178
-
the visualization.
179
-
The node sizes will be scaled such that the smallest node will have the size of the first value, and the largest node
180
-
will have the size of the second value.
181
-
The other nodes will be scaled linearly between these two values according to their relative size.
182
-
This can be useful if node sizes vary a lot, or are all very small or very big.
167
+
The optional ``max_rows`` parameter can be used to limit the number of relationships shown in the visualization.
168
+
By default, it is set to 10.000, meaning that if the database has more than 10.000 rows, a warning will be raised.
169
+
Note, this only applies if the ``data`` parameter is a ``neo4j.Driver``.
183
170
184
171
185
172
Example
@@ -222,20 +209,6 @@ The ``from_gql_create`` method takes one mandatory positional parameter:
222
209
223
210
* A valid ``query`` representing a GQL ``CREATE`` query as a string.
224
211
225
-
We can also provide an optional ``size_property`` parameter, which should refer to a node property,
226
-
and will be used to determine the sizes of the nodes in the visualization.
227
-
228
-
The ``node_caption`` and ``relationship_caption`` parameters are also optional, and indicate the node and relationship properties to use for the captions of each element in the visualization.
229
-
230
-
The last optional property, ``node_radius_min_max``, can be used (and is used by default) to scale the node sizes for
231
-
the visualization.
232
-
It is a tuple of two numbers, representing the radii (sizes) in pixels of the smallest and largest nodes respectively in
233
-
the visualization.
234
-
The node sizes will be scaled such that the smallest node will have the size of the first value, and the largest node
235
-
will have the size of the second value.
236
-
The other nodes will be scaled linearly between these two values according to their relative size.
237
-
This can be useful if node sizes vary a lot, or are all very small or very big.
238
-
239
212
240
213
Example
241
214
~~~~~~~
@@ -283,39 +256,14 @@ The ``from_snowflake`` method takes two mandatory positional parameters:
283
256
* A `project configuration <https://neo4j.com/docs/snowflake-graph-analytics/current/jobs/#jobs-project>`_ as a dictionary, that specifies how you want your tables to be projected as a graph.
284
257
This configuration is the same as the project configuration of the `Neo4j Snowflake Graph Analytics application <https://neo4j.com/docs/snowflake-graph-analytics/current/>`_.
285
258
286
-
``from_snowflake`` also takes an optional property, ``node_radius_min_max``, that can be used (and is used by default) to
287
-
scale the node sizes for the visualization.
288
-
It is a tuple of two numbers, representing the radii (sizes) in pixels of the smallest and largest nodes respectively in
289
-
the visualization.
290
-
The node sizes will be scaled such that the smallest node will have the size of the first value, and the largest node
291
-
will have the size of the second value.
292
-
The other nodes will be scaled linearly between these two values according to their relative size.
293
-
This can be useful if node sizes vary a lot, or are all very small or very big.
294
-
295
-
296
-
Special columns
297
-
~~~~~~~~~~~~~~~
298
-
299
-
It is possible to modify the visualization directly by including columns of certain specific names in the node and relationship tables.
300
-
301
-
All such special columns can be found :doc:`here <./api-reference/node>` for nodes and :doc:`here <./api-reference/relationship>` for relationships.
302
-
Though listed in ``snake_case`` here, ``SCREAMING_SNAKE_CASE`` and ``camelCase`` are also supported.
303
-
Some of the most commonly used special columns are:
304
-
305
-
* **Node sizes**: The sizes of nodes can be controlled by including a column named "SIZE" in node tables.
306
-
The values in these columns should be of a numeric type. This can be useful for visualizing the relative importance or size of nodes in the graph, for example using a computed centrality score.
307
-
308
-
* **Captions**: The caption text of nodes and relationships can be controlled by including a column named "CAPTION" in the tables.
309
-
The values in these columns should be of a string type. This can be useful for displaying additional information about the nodes, such as their names or labels. If no "CAPTION" column is provided, the default captions in the visualization will be the names of the corresponding node and relationship tables.
310
-
311
-
Please also note that you can further customize the visualization after the `VisualizationGraph` has been created, by using the methods described in the :doc:`Customizing the visualization <./customizing>` section.
259
+
You can further customize the visualization after the `VisualizationGraph` has been created, by using the methods described in the :doc:`Customizing the visualization <./customizing>` section.
312
260
313
261
314
262
Default behavior
315
263
~~~~~~~~~~~~~~~~
316
264
317
-
Unless there are "CAPTION" columns in the tables, the node and relationship captions will be set to the names of the corresponding tables.
318
-
Similarly, if there are are no "COLOR" node table columns, the nodes will be colored be colored so that nodes from the same table have the same color, and different tables have different colors.
265
+
The node and relationship captions will be set to the names of the corresponding tables.
266
+
The nodes will be colored so that nodes from the same table have the same color, and different tables have different colors.
0 commit comments