Git Product home page Git Product logo

gexf's Introduction

GEXF Format

GEXF file format specifications. Details and examples at gexf.net.

The repository contains both the specifications and the primer sources.

The latest stable version in 1.3.

License

The GEXF format and its related documentation is licensed under the Creative Commons Attribution 4.0 License.

Changelog

Note that we used to use "draft" in certain version (e.g "1.2draft") up until 1.3 when we decided to simply use full versions numbers.

1.3

Compatible with Gephi 0.9.3 and above. Note that part of the specifications were already implemented since 0.9 but full support is only guaranteed in 0.9.3.

  • Add kind attribute on edge to support multi-graph (i.e. parallel edges)
  • The edge weight is now a double instead of a float
  • The edge id is now optional
  • Add xsd:longas possible idtype on <graph>
  • Add new attribute types bigdecimal, biginteger, char, short and byte
  • Add new list attributes like listboolean or listinteger for each atomic type

Dynamics

  • Add a timezone attribute on <graph> to use as a timezone in case it's omitted in the element timestamps
  • Open intervals attributes startopen and endopen are removed. Use regular inclusive start and end instead
  • Remove start and end attributes on <attributes> as it was redundant with <graph> attributes

Timestamp support

Add the ability to represent time with single timestamps instead of intervals. We want feature parity between the two time representations but note they can't be mixed.

  • Add a timerepresentation enum in <graph> with either interval (default) or timestamp to configure the way the time is represented
  • Add timestamp attribute to <node>, <edge>, <spell> and <attvalue> to support this new time representation

Alternative to spell elements

  • Add a timestamps attribute to <node> and <edge> to represent a list of timestamps without having to use spells
  • Similarly, add a intervals attribute to <node> and <edge>

New slice mode

The optional mode attribute on <graph> now has an additional slice value, in addition of static and dynamic. With slice, the expectation is that the <graph> also has either a timestamp or start / end intervals.

  • Add a timestamp attribute on <graph> to characterise the slice this graph represent
  • Change the meaning of the start and end attributes on <graph> to either characterise the slice instead of the time bounds, which should rather be inferred

Viz

  • Add hex attribute on <color> so it can support values like #FF00FF
  • The z position is no longer required
  • Dynamic attributes like start, end or child elements <spells> are no longer supported for viz attributes. To represent viz attributes over time, an alternative is to create multiple graphs each representing a slice

1.2

Compatible with Gephi 0.8 and above.

  • The node and edge label attribute are now optional
  • <meta> should be placed before <graph>

Dynamics

  • Rename the timetype attribute to timeformat. This attribute is set on <graph> to specify how time information is encoded, either like a date or like a double.
  • The timeformat is currently either float or date and default value is date. The float type is replaced by double, and is now the default value.
  • Added timeformat types integer and dateTime. DateTime is equivalent to timestamps.
  • Add open intervals (non-inclusive): startopen and endopen attributes.
  • <slices> and <slice> are renamed <spells> and <spell> respectively because slices are a different concept as remarked.

Viz

  • Add viz attributes support for dynamics.
  • Add the alpha channel to RGB. Colors are now encoded in RGBA. It is a float from 0.0 (invisible) to 1.0 (fully visible). If omitted, the default alpha-value is 1.0 (no transparency).

1.1

Compatible with Gephi 0.7 and above.

  • Modules are stabilized and new ones appear: hierarchy and phylogeny.

1.0

Compatible with Gephi 0.6 and above.

  • First specification. Basic topology, associated data and dynamics attempt constitute the core, plus a visualization extension.

gexf's People

Contributors

duncdrum avatar mbastian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gexf's Issues

Does <meta> accept extraneous items?

Related to graphology/graphology#497

It seems to me the specs are not particularly precise regarding what the <meta> section should accept, but the xsd schema seems to indicate you should only be able to specify <creator>, <description> and <keywords>. What's more, I think I already found gexf in the wild having arbitrary tags there, notably <title>.

Should we amend the xsd schema to fit usage? Am I hallucinating this usage? What was meant to be accepted here?

static datatypes and attributes

@mbastian said

  • Add an optional edge kind attribute: This is the base of the property graph and defined some kind of label that defines the nature of the relationship. Unfortunately we already use type (for directed/undirected) and label (unique string for each edge) but "kind" seems clear enough.
  • idtype: The current 1.2 specifications describe an idtype attribute one can set on graph to configure the type of element ids. This is actually something that we never implemented in the import/export and could now be done because GraphStore supports it. So I suggest to start supporting this and also add long in addition of string (default) and integer.
  • slice mode: To make the distiction between dynamic graphs contained into a single GEXF (i.e. our current 'dynamic' mode) and dynamic graphs contained in a collection of GEXF files I suggest to introduce an additional 'mode' attribute names 'slice'. The possible values are currently 'static' (default) and 'dynamic'.
  • Add a new “hex” attribute to viz:color: It would allow to use things like hex=“#FF00FF”. I would suggest to support alpha there as well.

Modify array strings

Something I forgot to mention, we've modified the array support. The 1.2 format supports something called a "liststring" which is basically an array of strings and would be able to parse something like foo|bar where | is the separator. This wasn't very well done and @eduramiba improved the underlying array parsing and printing code so we can parse things like [foo, bar], foo,bar or even ["foo", "bar"]. We've also added new types: listboolean, listinteger, listlong, listdouble.

Other Graph XML specifications/formats

I understand that GEXF's design is mostly done around Gephi, nonetheless, it may be a good idea to try to keep track of other Graph XML formats providing similar support. This could bring ideas about needed/desired features for both GEXF and Gephi. Here are a few examples:

  • DGML: Directed Graph Markup Language (link)
  • GraphML (link)
  • DGML: Directed Graph Markup Language (link)
  • XGMML: eXtensible Graph Markup and Modeling Language (link)

XML formats used in Phylogenetics (some interesting features to consider for GEXF)

Wiki > code sample on how to properly "Use the count XML-attribute"

Hi,

the wiki is really nice to read and use. I've just found that it was a good practice to add the count attribute on nodes.
It could be nice if you were adding it by default on the code samples so people do not forget (or even think) to put it in their gexf files.

`xmllint` failed to compile XSD schema 1.3

I tried to validate a gexf file version 1.3 with xmllint version 21003 as described in the documentation, but I got following error:

$ touch test.gexf
$ xmllint -debugent -noout -schema http://gexf.net/1.3/gexf.xsd test.gexf
new input from file: http://gexf.net/1.3/gexf.xsd
new input from file: http://gexf.net/1.3/dynamics.xsd
new input from file: http://gexf.net/1.3/viz.xsd
http://gexf.net/1.3/gexf.xsd:22: element element: Schemas parser error : element decl. '{http://gexf.net/1.3}graph', attribute 'type': The QName value '{http://gexf.net/1.3}graph-content' does not resolve to a(n) type definition.
http://gexf.net/1.3/gexf.xsd:43: element element: Schemas parser error : element decl. '{http://gexf.net/1.3}node', attribute 'type': The QName value '{http://gexf.net/1.3}node-content' does not resolve to a(n) type definition.
http://gexf.net/1.3/gexf.xsd:51: element element: Schemas parser error : element decl. '{http://gexf.net/1.3}edge', attribute 'type': The QName value '{http://gexf.net/1.3}edge-content' does not resolve to a(n) type definition.
WXS schema http://gexf.net/1.3/gexf.xsd failed to compile
new input from file: test.gexf
test.gexf:1: parser error : Document is empty

Is gexf 1.2 really deprecated?

When using Gephi, I receive warnings that 1.2draft is deprecated. However, it also appears that 1.3 is a "work in progress."

Could you please advise on the appropriate way to produce a gexf for importing into Gephi? Thanks.

Add GEXF 1.3 specifications

Goals are

  1. to update the RelaxNG specifications so XSD files can be generated. Sources for 1.2 version are in specs folder.
  2. update the PDF primer document. Latex sources are in the primer document.

xml version

gexf 1.3 could change to xml 1.1. I think it should be the default, but we'll have to make sure that this doesn't interfere with xml1.0 dates e.g. when importing gexf1.2 graphs.

dynamic graphs and time formats

@mbastian wrote

  • Add a “timerepresentation” enum in : The value would either be “interval” or “timestamp”. Interval would the default so we’re backward compatible. This configures the way the time is represented and we choose not to mix the two so it's needs to be explicitly set.
  • Add a “timestamp” attribute to : This allows to define a timestamp for the entire graph. That’s the corner stone of supporting collections of GEXF files where each is a slice with a timestamp value. Essentially, it means that each element in the graph exists at this timestamp. If the attribute columns are dynamic we would also set values at that time.
  • As we want a “timestamp” attribute for we should revisit the meaning of the “start” and “end” attributes in as well. Right now, they define the dynamics' bounds but that could be inferred from the data as well by taking the min and max so I don't think it's very useful. Instead, it could define the interval for the entire graph like the new "timestamp" would do.
  • Add a “timestamps” attribute to node/edge: Add an array of timestamps. Each of the element in the list should follow the format agreed on in "timeformat".
  • Add “timestamp” to : Defines a unique time 't' for this attribute value.
  • Add "timezone" configuration: Timezone can be defined as part of the timestamps themselves (e.g. 2015-01-01T13) but it should be possible to define a global timezone if this is omitted. By default, we would use the local user timestamp.
  • consistency between intervals and timestamps: Both time representation should have the same feature. If we allow to define "timestamps" on elements we should also allow "intervals". Similarly if we keep the concept for intervals we should add support for timestamp spells as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.