Quick and dirty sample code for using the Neo4j Spatial Plugin with Graph Story.
The Neo4j Spatial plugin comes standard on all Graph Story plans.
- Clone the repo
- Run
composer install - Copy
secret.php.disttosecret.php- Your Graph Story Neo4j instance credentials can be found at http://console.graphstory.com.
- A tailored copy of the
secret.phpfile can be found in the Graph Kit for PHP docs, also at http://console.graphstory.com.
- To set up the spatial index, etc, run
spatial-setup.phpfrom the command line:
$ php /path/to/spatial-setup.php
- To run a sample spatial query, run
spatial-queries.phpfrom the command line:
$ php /path/to/spatial-queries.php
Use the Clear and Refresh functionality in the Graph Story console to wipe your graph and start over, if needed.