using a Json file as the input instead of Gexf #66

Azinp opened this Issue Jan 15, 2013 · 6 comments


None yet

5 participants

Azinp commented Jan 15, 2013

Hi,I've trying to visualize a network,converted mysql query to json,and I want to know is it possible to use the Json file to fill the graph?
how is it possible ?
Thank you


someone wrote one. Cant remember where it was from. But i'm using it to populate my graph from rss feeds. Example at

File can be found on my repo under js folder.

DGaffney commented Feb 6, 2013

Heyo, here's my stab at doing this:

and some sample data to get you going on transforming your mysql data into the proper format for JSON parsing - this obviously doesn't rescue against lots of different issues (color, position not specified) but its mostly done.


Know this is an old issue, but since it's open and being referenced / seen. The sigma.parseJson.js file in the plugins folder will load a json file. There is also a file in the same folder to convert a gexf file to the required json format. I'm not sure how this compares with mysql converted to json but it looks similar to DGaffney's example data.


@computermacgyver it really depends on whatever spec is put on the incoming data - mine was relatively arbitrary and was just mostly a close-ish analog to a GEXF file. For reference, the inspiration for that particular output spec is - for a working example of getting ruby data piped through to an output gexf file using that class, you basically just call on the individual functions with your raw data which is basically the same format as that JS file. If you want, I can write up a demo some time in the next few days...


@DGaffney No need for a working example from my end. I also had tried to do something close to the gexf / how sigma internally represented the graph already. I think we arrived at very similar (perhaps the same) result. I think this probably doesn't need any more attention given its age. I wanted to tack on the information about the plugin simply for future readers' reference. Cheers!


The new version of sigma provides a better GEXF parser and a simple method to read a graph from an object (which makes using JSON dead simple).

@jacomyal jacomyal closed this Jan 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment