New to graphtool , coming from networkx. Any support for json?
Hello Graph-Tool I had experience with networkx , but due to performance requirements i am thinking about trying graph-tool. My main goal it to generate network graph for email communications , but i need to make it available online as interactive networks so i want to know if json serialization available? I will use sigma.js http://sigmajs.org/ to render network graphs like this : http://exploringdata.github.io/info/npm-packages-dependencies/ I would be very grateful if i can have pointers for that. Thanks Phyo.
On 03/19/2014 02:44 PM, phyo.arkarlwin@gmail.com wrote:
Hello Graph-Tool
I had experience with networkx , but due to performance requirements i am thinking about trying graph-tool.
My main goal it to generate network graph for email communications , but i need to make it available online as interactive networks so i want to know if json serialization available?
I will use sigma.js http://sigmajs.org/ to render network graphs like this : http://exploringdata.github.io/info/npm-packages-dependencies/
I would be very grateful if i can have pointers for that.
Unfortunately, built-in json serialization is not yet supported, only graphml. You would have to write your own exporter... Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
Oh that's unfortunate. Any plan in future? it won't be hard i guess. and Json is very popular these days. NetworkX is too slow for large graphs. Will this code work after graphml is exported ? https://github.com/uskudnik/GraphGL/blob/master/examples/graphml-to-json.py On Wednesday, March 19, 2014 10:16:00 PM UTC+6:30, Tiago Peixoto wrote:
On 03/19/2014 02:44 PM, phyo.ar...@gmail.com <javascript:> wrote:
Hello Graph-Tool
I had experience with networkx , but due to performance requirements i am thinking about trying graph-tool.
My main goal it to generate network graph for email communications , but i need to make it available online as interactive networks so i want to know if json serialization available?
I will use sigma.js http://sigmajs.org/ to render network graphs like this : http://exploringdata.github.io/info/npm-packages-dependencies/
I would be very grateful if i can have pointers for that.
Unfortunately, built-in json serialization is not yet supported, only graphml. You would have to write your own exporter...
Best, Tiago
-- Tiago de Paula Peixoto <ti...@skewed.de <javascript:>>
On 03/19/2014 05:10 PM, Phyo Arkar Lwin wrote:
Oh that's unfortunate.
Any plan in future? it won't be hard i guess. and Json is very popular these days. NetworkX is too slow for large graphs.
I'm always thinking about supporting more formats, but supporting all of them seems unrealistic. The problem with Json is that it is not really a graph format, but rather a general meta-format, like XML. For instance, both graphml and GEXF are XML formats, but they are otherwise completely different. With Json you have something similar... It is not because two programs write/read Json files that they are going to be able to understand each other. Right now I'm not sure if there is really a standard Json graph format out there, but I could be mistaken. But in any case, given a desired Json output format, it should be really easy to write a small function which outputs a graph-tool graph...
Will this code work after graphml is exported ? https://github.com/uskudnik/GraphGL/blob/master/examples/graphml-to-json.py
I see no reason why it shouldn't. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
I'm always thinking about supporting more formats, but supporting all of them seems unrealistic. The problem with Json is that it is not really a graph format, but rather a general meta-format, like XML. For instance, both graphml and GEXF are XML formats, but they are otherwise completely different. With Json you have something similar...
I agree its not realistic to support all the formats out there. While i look around standardized JSON format for graphs i found below: https://github.com/thinkaurelius/faunus/wiki/GraphSON-Format But non of the major Network Diagramming JavaScript libraries support it natively. So its quite useless. Most popular data vis framework of javascript : D3js is format agnostic and Network diagramming framework sigmajs support non standard Json dictionaries by default like this : { "nodes": [ { "id": "n0", "label": "A node", "x": 0, "y": 0, "size": 3 }, { "id": "n1", "label": "Another node", "x": 3, "y": 1, "size": 2 }, { "id": "n2", "label": "And a last one", "x": 1, "y": 3, "size": 1 } ], "edges": [ { "id": "e0", "source": "n0", "target": "n1" }, { "id": "e1", "source": "n1", "target": "n2" }, { "id": "e2", "source": "n2", "target": "n0" } ] } GEXF is supported by Sigmajs. So just GEXF support will be fine for my case, but still it need to covert to json to work it under javascript , still that cost additional performance converting GEFX to Json at background. What i can suggest is : Javascript data visualization is a growing (and very useful) trend so just Dumping JSON natively of current graph format would be good enough. Let the javascript libraries support your graph after it :) . On Thursday, March 20, 2014 12:32:11 AM UTC+6:30, Tiago Peixoto wrote:
On 03/19/2014 05:10 PM, Phyo Arkar Lwin wrote:
Oh that's unfortunate.
Any plan in future? it won't be hard i guess. and Json is very popular these days. NetworkX is too slow for large graphs.
I'm always thinking about supporting more formats, but supporting all of them seems unrealistic. The problem with Json is that it is not really a graph format, but rather a general meta-format, like XML. For instance, both graphml and GEXF are XML formats, but they are otherwise completely different. With Json you have something similar... It is not because two programs write/read Json files that they are going to be able to understand each other.
Right now I'm not sure if there is really a standard Json graph format out there, but I could be mistaken.
But in any case, given a desired Json output format, it should be really easy to write a small function which outputs a graph-tool graph...
Will this code work after graphml is exported ?
https://github.com/uskudnik/GraphGL/blob/master/examples/graphml-to-json.py
I see no reason why it shouldn't.
Best, Tiago
-- Tiago de Paula Peixoto <ti...@skewed.de <javascript:>>
On 03/20/2014 10:05 AM, Phyo Arkar Lwin wrote:
What i can suggest is : Javascript data visualization is a growing (and very useful) trend so just Dumping JSON natively of current graph format would be good enough. Let the javascript libraries support your graph after it :) .
A generic way of writing json files would be nice, but I need to find the time to do that... It would be helpful to have a ticket open about this, with all the links to the information you have. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
Sure , i will do , Also if its in python , i can help , but i think for performance (Large Graphs) it should be done in C++ ? Thanks. On Friday, March 21, 2014 4:51:16 AM UTC+6:30, Tiago Peixoto wrote:
On 03/20/2014 10:05 AM, Phyo Arkar Lwin wrote:
What i can suggest is : Javascript data visualization is a growing (and very useful) trend so just Dumping JSON natively of current graph format would be good enough. Let the javascript libraries support your graph after it :) .
A generic way of writing json files would be nice, but I need to find the time to do that... It would be helpful to have a ticket open about this, with all the links to the information you have.
Best, Tiago
-- Tiago de Paula Peixoto <ti...@skewed.de <javascript:>>
participants (3)
-
Phyo Arkar Lwin -
phyo.arkarlwin@gmail.com -
Tiago de Paula Peixoto