Calling Gephi from Ruby on Rails
I'm very interested in building a data visualisation component and can see how it could be done but would prefer not to reinvent something which already exists. If this truly is a 'first' then I'm prepared to put my initial code on Github for others to share [and hopefully improve !!]
Essentially I'd like to be able to do the following:
1) Access a table or tables within a database and create nodes based on entries within them. Add nodes on create, remove them on delete.
2) Use the foreign keys and/or join tables [for many-many links] to create edges. Add edge(s) when node created, remove edges when node deleted, check and add/remove edges when node updated.
3) Pass the nodes and edg开发者_运维问答es to Gephi for display
I can see how to do steps 1 and 2 quickly and easily -- what I haven't been able to find (after much searching) is how to do step 3.
Has anyone had any success in doing this? -- any example code that they're willing to share ?
Thanks
We tried something similar once, but it may not help you that much. We wrote a Rake task that got data out our DB, which we then fed into Gephi manually. That wasn't really satisfactory and in the end I went with Rake task -> CSV -> R script for visualization (basically connections of users on a world map). If you are not dead set on using Gephi I could show you some of the R code :-)
精彩评论