#Viewing graph in the browser, 5 methods
This repository comes along with the blog post http://alexandre-masselot.blogspot.com/2014/05/viewing-graphs-in-browser.html It propose basic code to demonstrate some features of different approaches to display and interact with graphs in the browser.
To produce a random graph with 40 nodes and 3 subclusters of decreasing sizes and serve as input for the various methods.
This will produce files with /tmp/aa
prefix
-
/tmp/aa-nodes.tsv
tabular node description; -
/tmp/aa-edges.tsv
tabular edge description; -
/tmp/aa.json
a json file with nodes and edges arrays; -
/tmp/aa.dot
graphvizdot
formatted; -
/tmp/aa-cypher.txt
as a cypher file ready to be imported into neo4j;perl perl/build-random-graph.pl /tmp/aa 40 3
To convert the .dot
file into an .svg
one, use the graphviz executable. /tmp/aa-graphviz.svg
can then be loaded in your browser.
dot -Tsvg /tmp/aa.dot >/tmp/aa-graphviz.svg
Simply import the cypher file, either through the web application or the command line
bin/neo4j-shell -file /tmp/aa-cypher.txt
Not to be mistaken for cytoscapeweb.js, reads the JSON file.
converts json data into d3 force layout ready data.
Show an example processed by gephi and simply display it with sigma.js
#Author alexandre.masselot@gmail.com
#License BSD