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
Sometimes, you make a query and the query contains additional data, like simple scalars (sums, averages, or anything you calculated on the database) and you want to use that information to drive the visualization.
A possible approach would be to allow an optional second argument to the binding functions that receives the result of the cypher query so you could do something along the lines of the following:
def heat_mapping(element, results):
amount = element['properties']['some_amount']
normalized_value = (amount - results['min_amount']) / (results['max_amount'] - results['min_amount'])
return normalized_value
...
g.show_cypher(
"""
MATCH (n:SomeLabel)
RETURN n, MIN(n.some_amount) AS min_amount, MAX(n.some_amount) AS max_amount
"""
)
The text was updated successfully, but these errors were encountered:
Sometimes, you make a query and the query contains additional data, like simple scalars (sums, averages, or anything you calculated on the database) and you want to use that information to drive the visualization.
A possible approach would be to allow an optional second argument to the binding functions that receives the result of the cypher query so you could do something along the lines of the following:
The text was updated successfully, but these errors were encountered: