Re: [Neo4j] Cypher queries in python

2016-05-27 Thread 'Michael Hunger' via Neo4j
Best to ask such questions on stackoverflow: In general, index the location array of [lat, lon] CREATE CONSTRAINT ON (loc:Location) ASSERT loc.coords IS UNIQUE; MERGE (loc:Location {coords:[{lat},{lon}]}) CREATE (m:Measure {value:{value}, time:{time}})-[:AT]->(loc); Alternatively use two

Re: [Neo4j] Cypher queries in python

2016-05-26 Thread Yayati Sule
Hi Jessica, when you execute the query cypher query, just iterate over the cursor and append it to a list. Then using the json.dumps() method you can get the result in JSON format. You may then analyze it as per your needs ᐧ Regards, Yayati Sule Associate Data Scientist Innoplexus Consulting

[Neo4j] Cypher queries in python

2016-05-26 Thread Jessica Marinho
I'm migrating a postgresql database to neo4J. I am using the Python language, but I have a problem. I have a table called 'historico' which marks the rainfall recorded by a sensor in a certain latitude and longitude. My problem is the following: if a node with such latitude and longitude in my