Dynamics

GEXF provides a way to add a lifetime to nodes, edges and data.

Time in GEXF is encoded in two ways. Continuous by default, it is encoded as a double, but may also be an international standard date (yyyy-mm-dd). Discrete, it is an integer. Both network topology and data have a lifetime. The whole graph, each node, each edge and their respective data values may have time limits, beginning with an XML-attribute start and ending with end. Attributes declared as dynamic are allowed to exist during a time scope.

http://gexf.net/data/dynamics.gexf
<?xml version="1.0" encoding="UTF-8"?>
<gexf xmlns="http://gexf.net/1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://gexf.net/1.3 http://gexf.net/1.3/gexf.xsd" version="1.3">
    <meta lastmodifieddate="2009-03-20">
        <creator>Gexf.net</creator>
        <description>A Web network changing over time</description>
    </meta>
    <graph mode="dynamic" defaultedgetype="directed" timeformat="date">
        <attributes class="node" mode="static">
            <attribute id="0" title="url" type="string"/>
            <attribute id="1" title="frog" type="boolean">
                <default>true</default>
            </attribute>
		</attributes>
        <attributes class="node" mode="dynamic">
            <attribute id="2" title="indegree" type="float"/>
        </attributes>
        <nodes>
            <node id="0" label="Gephi" start="2009-03-01">
                <attvalues>
                    <attvalue for="0" value="http://gephi.org"/>
                    <attvalue for="2" value="1"/>
                </attvalues>
            </node>
            <node id="1" label="Network">
                <attvalues>
                    <attvalue for="2" value="1" end="2009-03-01"/>
                    <attvalue for="2" value="2" start="2009-03-01" end="2009-03-10"/>
                    <attvalue for="2" value="1" start="2009-03-10"/>
                </attvalues>
            </node>
            <node id="2" label="Visualization">
                <attvalues>
                    <attvalue for="2" value="0" end="2009-03-01"/>
                    <attvalue for="2" value="1" start="2009-03-01"/>
                </attvalues>
                <spells>
                    <spell end="2009-03-01"/>
                    <spell start="2009-03-05" end="2009-03-10" />
                </spells>
            </node>
            <node id="3" label="Graph">
                <attvalues>
                    <attvalue for="1" value="false"/>
                    <attvalue for="2" value="0" end="2009-03-01"/>
                    <attvalue for="2" value="1" start="2009-03-01"/>
                </attvalues>
            </node>
        </nodes>
        <edges>
            <edge source="0" target="1" start="2009-03-01"/>
            <edge source="0" target="2" start="2009-03-01" end="2009-03-10"/>
            <edge source="1" target="0" start="2009-03-01"/>
            <edge source="2" target="1" end="2009-03-10"/>
            <edge source="0" target="3" start="2009-03-01"/>
        </edges>
    </graph>
</gexf>

If a node or an edge exists at multiple points in time, we use the concept of spells. Spells are not provided for data values, which are only limited by one start and one end. Use the xml-element spells like this:

<gexf ...>
    ...
    <graph mode="dynamic" timeformat="date">
        <nodes>
            <node id="0">
                <spells>
                    <spell start="2009-01-01" end="2009-01-15" />
                    <spell start="2009-01-30" end="2009-02-01" />
                </spells>
            </node>
        </nodes>
    </graph>
</gexf>
					

GEXF also supports timestamps instead of intervals, see the examples in the Primer

See how to set a hierarchy structure on your graphs in the next example.