cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

From Neo4j graph to Virtual Reality concept map

asperlinga
Graph Buddy

TITLE: From Neo4j graph to Virtual Reality concept map.

I love Graph Theory and VR, I’ve been using Neo4j since March 2020 and Oculus Rift from march 2019.
The first thing I did in Neo4j is the graphdb for my non-profit association: www.Lecco100.it and I worked a bit on it during online Neo4j courses.

GRAPH MODEL
2X_d_df0031d4f458c72bf44e58e809b283be7022774f.jpeg
(Association:LECCO100)-[Create:CREATO]->(Course:MASTER)

(Association:LECCO100)-[Realize:REALIZZATO]->(Events::EVENTO)

(Events:EVENTO)-[Done:SVOLTO]->(Location:LOCAZIONE)<-[To:PRESSO]-(Place:LUOGO)

(Lessons:LEZIONE)-[Scheduled:PROGRAMMATO]->(Course:MASTER)

(Person:PERSONA)-[:STAKEHOLDER]->(Association:LECCO100)

(Person:PERSONA)-[Take_part:PARTECIPANTE]->(Course:MASTER)

(Person:PERSONA)-[:SPEAKER]->(Lessons:LEZIONE)

THE GOAL

I would like to export my graph into an immersive VR environment, but... can this be done?
The answer is Yes.

Last Year I bought NODA (https://noda.io/), a Mind Mapping VR software you can buy on Oculus or Steam store.
In NODA you can draw a graph with nodes and relationships. Nodes can have Text (labels) and Image, and relationships can have text only. The nodes can have different shapes and color. We don't have properties on nodes and relationships and we don't have directions on relationships.

But...the NODA files are in Json format, a simple Json file.

THE IMPLEMENTATION PLAN

  1. reverse engineering of NODA file structure;
  • we have Head and tail, nodes section and relationships section. Every node is an object with UUID, compatible with cypher . Every relationship uses the UUID of a start node and the UUID of the end node.
  1. export csv data from Neo4j, one file for nodes and one for relationships;
    //Nodes list
    MATCH (N) RETURN ID(N) AS ID, LABELS(N) AS LABELS, KEYS(N) AS PROPERTIES, N AS DATA
    // Relationships list
    MATCH (n)-[REL]->(x) RETURN id(n)AS IDA,id(REL) AS IDREL, TYPE(REL) AS RELATION ,KEYS(REL) AS RELPROP, REL AS RELDATA, id(x) AS IDB

  2. Use Excel for create Json code for every row;

  • import .csv file from Neo4j in two different table, Nodes and relationships
  • split the Json parameters of NODA in excel column that follow data column and build with string function a new json record
  1. Test the Json file in NODA.

THE REAL PROBLEMS WE HAVE

  1. see NODA json records in Excel sheet and discover a need for spatial positioning with three axis, x,y and z;
  2. define data structure for NODA object, nodes and relationships and match with Neo4j db structure;
  3. write cypher queries for export nodes and relationships in csv files;
  4. Import csv files in Excel to test sorting and normalization;
  5. write the minimum quantities of formulas to create the json rows;
  6. compose the json file and import in excel to check if it's well shaped;
  7. run Oculus Rift and open the file in NODA;
  8. optimizing cypher queries, fields and formulas for Excel, shape, color and spatial positioning for NODA;

The really interesting problem is the first.

2X_d_d0b7e4d2b575217c36c62dcb5a71778f8ebdbd0e.jpeg

I created a lot of tests and one day I realized that I could use the Excel xy chart to preview the result.

I use z-axis as a layer and the result in NODA is really impressive 🙂

From the beginning of my journey in Virtual reality technology I have seen a lot of opportunity but the only way for making real business is gaming.
I think that a generic way to export graph in VR can be a useful technology for business purposes too , because virtual reality is not just a game.

0 REPLIES 0
Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online