So here’s the workflow I used to get the Python topic graph out of Neo4j and onto the web.
-Use Py2neo to graph the subgraph of content and topics pertinent to Python, as described above
-Add to this some other topics linked to the same books to give a fuller picture of the Python “world”
-Add in topic-topic edges and product-product edges to show the full breadth of connections observed in the data
-export all the nodes and edges to csv files
-import node and edge tables into Gephi.
The reason I’m using Gephi as a middle step is so that I can fiddle with the visualisation in Gephi until it looks perfect. The layout plugin in Sigma is good, but this way the graph is presentable as soon as the page loads, the communities are much clearer, and I’m not putting undue strain on browsers across the world!
-The layout of the graph has been achieved using a number of plugins. Instead of using the pre-installed ForceAtlas layouts, I’ve used the OpenOrd layout, which I feel really shows off the communities of a large graph.
-Export the graph into gexf format, having applied some partition and ranking functions to make it more clear and appealing.
Now it’s all down to linkurious.js and its various plugins! You can explore the source code of the final page to see all the details, but here I’ll give an overview of the different plugins I’ve used for the different parts of the visualisation:
First instantiate the graph object, pointing to a container (note the CSS of the container, without this, the graph won’t display properly):