Neo4j è un database di dati grafico e può esportare i dati in un file JSON. Tuttavia, il file JSON di Neo4j è in qualche modo molto complicato per me e non è stato possibile importarlo in D3. La mia domanda è come importare un file JSON da Neo4j e importarlo in D3 per la visualizzazione del grafico senza modificare il formato del file JSON. Ho chiesto una volta alla comunità Neo4j e hanno detto che non è possibile o che credevo volessero dire quello.Come importare un file JSON esportato da Neo4j in D3
Ecco il file JSON esportati da Neo4j:
{ "table": { "_response": { "columns":["n"], "data":[ {"row":[{"num":"A08"}],"graph":{"nodes":[{"id":"0","labels":["Person"],"properties":{"num":"A08"}}],"relationships":[]}}, {"row":[{"num":"A04"}],"graph":{"nodes":[{"id":"1","labels":["Person"],"properties":{"num":"A04"}}],"relationships":[]}}, {"row":[{"num":"A05"}],"graph":{"nodes":[{"id":"2","labels":["Person"],"properties":{"num":"A05"}}],"relationships":[]}} ], "stats":{ "contains_updates":false,"nodes_created":0,"nodes_deleted":0,"properties_set":0,"relationships_created":0,"relationship_deleted":0, "labels_added":0,"labels_removed":0,"indexes_added":0,"indexes_removed":0,"constraints_added":0,"constraints_removed":0 } }, "nodes":[ {"id":"0","labels":["Person"],"properties":{"num":"A08"}}, {"id":"1","labels":["Person"],"properties":{"num":"A04"}}, {"id":"2","labels":["Person"],"properties":{"num":"A05"}} ], "other":[], "relationships":[], "size":3, "stats":{ "contains_updates":false,"nodes_created":0,"nodes_deleted":0,"properties_set":0,"relationships_created":0,"relationship_deleted":0, "labels_added":0,"labels_removed":0,"indexes_added":0,"indexes_removed":0,"constraints_added":0,"constraints_removed":0 } }, "graph": { "nodeMap":{ "0":{"num":"A08"}, "1":{"num":"A04"}, "2":{"num":"A05"} }, "relationshipMap":{ "623":{"date":"5/01/2011","time":"18:11:48","case":4}, "624":{"date":"5/02/2011","time":"21:21:06","case":4}, "625":{"date":"6/03/2011","time":"21:23:35","case":4}, "629":{"date":"6/04/2011","time":"22:14:47","case":5} } } }
La D3 che sto usando come esempio è http://bl.ocks.org/mbostock/1153292
Grazie.