Developers guide for the Grapho data science + storytelling toolkit
See Grapho User Guide for non-developer documentation.
Grapho is designed around the power and simplicity of property graph databases. ie. where both database nodes and relationships (edges) can be assigned key / value properties.
Your source data does not necessarily need to be stored in a graph database but if it is, you can take immediate advantage of Grapho tool features
The following table sets out the Grapho visualisation schema
The following Label types have specific implementations
Label | Description |
---|---|
Handle | Handles are core to Grapho and the starting point for your XR graph journey. As such they are rendered differently from all other nodes. Think of a Grapho Handle as a pointer or a bookmark to a particular place in your graph. Use Handles to create deep links into your graph, to support editorial process (handles play nicely with NEXT relationships for curated paths through your data) and help manage clutter. Handles can be saved to your database or generated on the fly from dynamic query logic. See Grapho XR UI documentation |
The following properties have specific implementations
name | type | e.g. | description |
---|---|---|---|
name | str | “My node” | used as default label |
colour OR color | str | “#ffffff” | override colour style |
voiceover_override | bool | true | if true, voiceover is allowed to interrupt current voiceover, otherwise this is queued |
voiceover_url | str | https://d1pxeqjdb63hyy.cloudfront.net/media/media/test-ux.ogg | plays voiceover when node opened. Supports WAV, MP3, and OGG formats |
image_url | str | https://d1pxeqjdb63hyy.cloudfront.net/media/images/node_end-to-end-testing.original.png | displays image when node opened. Supports JPG, PNG |
subtitles_url | str | https://mod.studio/documents/64/test-ux.vtt | displays subtitles when node opened - if voiceover_url available. Supports VTT and SRT formats |
name | type | e.g. | description |
---|---|---|---|
colour OR color | string | “#ffffff” | overrides colour style defined in the app |
Grapho Machine tools are typically preset with credentials to your database instances in a .env file.
When building a Grapho Machine from scratch, copy the env.sample file in each component to .env and fill in your real credentials.
grapho-server is a lightweight reference API server for the GraphoXR spatial browser.
Source code and documentation is available at https://github.com/modprods/grapho-server
Features
Handles
“Handles” are the mechanism by which editorially curated paths through your graph data are served to Grapho clients like GraphoXR.
Use Handles to design, curate and manage your graph data experiences.
Handles are simply nodes with the label “Handle”. They have special significence and are rendered differently to other nodes.
Use Handles to
To start exploring your own data, try creating a Handle linking to an existing node in your database.
Set up your own Grapho XR experience from scratch, all you need is a recent Meta Quest headset and the following free resources.
1) Run Neo4j Desktop
// Merge first handle
MERGE (n:Handle {label:'Enter the Matrix'})
SET n.name = n.label
WITH n
MATCH (o:Movie {title:a'The Matrix'})
MERGE (n)-[:NEXT]->(o)
RETURN n, o
2) Run grapho-server container in Docker Desktop
# Neo4J FQHN
NEO4J_HOST = "host.docker.internal"
NEO4J_USER = "neo4j"
NEO4J_PASSWORD = "<INSERT PASSWORD>"
NEO4J_PORT_HTTP = 7474
NEO4J_PORT_BOLT = 7687
# uncomment next line to ignore dynamic db parameter and hardcode this
#NEO4J_DATABASE = "neo4j"
PUBLIC_URL = "http://<YOUR SERVER LAN IP>:5042"
QUERY_LIMIT = 300
INCLUDE_FIXED_QUERIES = False
pipenv run python api.py
i.e.
http://<YOUR SERVER LAN IP>:5042
3) Run Grapho XR Demo on Meta Quest HMD
i.e.
http://<YOUR SERVER LAN IP>:5042
You now have your own Grapho service equivalent to demo.grapho.app.
See /deploy in source code for example configurations when using grapho-server in production.
See Properties for how to prepare your graph for use in Grapho.