22

What's the standard graph representation file format or otherwise the most used one? I would say one of these three:

but it would be great if anyone could point out the advantages/weaknesses from each of them.

ppareja
  • 730
  • 1
  • 5
  • 16
  • 1
    It might be good to remove "Best" from the question as this is highly subjective and hard to quantify. Answering the 'most popular', 'most supported', or 'most standard' is somewhat easier even when context dependent. You cay say "The standard format in field X is Y and is used by 70% of new projects", but trying to attach a quality to Y is harder. – AnnanFay May 09 '20 at 00:42

4 Answers4

8

The answer ultimately lies with the size of your problem and what your are trying to achieve.

For example, none of those formats can handle billions of vertices whereas some dedicated large-scale graph analytics frameworks such as Spark or GraphLab-Create can.

GraphML and GEXF are roughly equivalent, both XML based. GraphML is standard and supported in a lot of graph librairies such as NetworkX, igraph, Boost Graph Library, Graph-tool, JGraphT, Gephi. GraphSon is not popular.

To draw your GraphML or GEXF graphs, you can use Gephi or Tulip (GEXF only).

Kirell
  • 9,228
  • 4
  • 46
  • 61
  • 1
    So isn't there any popular alternative based in JSON instead of XML? – ppareja Jul 10 '15 at 09:26
  • 1
    Not really, every library defines its own JSON format. NetworkX, sigma.js and graphson are all JSON format but different. – Kirell Jul 10 '15 at 09:34
8

I think JGF is a good candidate here too.

I evaluated a lot for a recent project and this came out on top. Specifically, I liked:

  • Trivial to parse and generate
  • Able to include arbitrary extra data for any node, edge, or graph.
  • Well specified, and can be parsed by more than one existing project.

http://jsongraphformat.info/

https://github.com/jsongraph/json-graph-specification

bjtucker
  • 81
  • 1
  • 1
5

Ideally you want something supported by major third-party software. I'm currently looking into exporting to Gephi, and it supports:

  • GEXF
  • GDF
  • GML
  • GraphML
  • Pajek NET
  • GraphViz DOT
  • CSV
  • UCINET DL
  • Tulip TPL
  • Netdraw VNA

I'd love to see an analysis of the benefits of each format. Gephi's sample datasets includes a lot of GEXF and GML.

Pierre
  • 4,114
  • 2
  • 34
  • 39
  • +1 for CSV which respects the Unix Philosophy. If you need anything more, write your own script that converts to the other thing (that may never gain traction anyway). – Sridhar Sarnobat Jun 13 '23 at 17:13
2

GNU Bison outputs Graphviz DOT files to help visualize the parser automaton, which usually are very big graphs. Here you can find a small sample.

I think that DOT is a de-facto standard at least for for open source projects, also because there are many excellent open source tools for producing images from DOT files (e.g. dot, neato, sfdp).

At the moment i'm writing this, Gephi and Tulip don't plot edges labels, which could be a problem for some applications.

Foxhole
  • 400
  • 4
  • 10