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://www.gexf.net/1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.gexf.net/1.2 http://www.gexf.net/1.2/gexf.xsd" version="1.2">
    <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 id="0" source="0" target="1" start="2009-03-01"/>
            <edge id="1" source="0" target="2" start="2009-03-01" end="2009-03-10"/>
            <edge id="2" source="1" target="0" start="2009-03-01"/>
            <edge id="3" source="2" target="1" end="2009-03-10"/>
            <edge id="4" source="0" target="3" start="2009-03-01"/>
        </edges>
    </graph>
</gexf>

If a node or an edge exists only at some timeranges, 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>
					

One can define open intervals instead of closed intervals. An open interval is an interval that does not include its end points. Here is a complete sample using both closed and open intervals in node and edge attributes:

http://gexf.net/data/dynamics_openintervals.gexf
<gexf ...>
    ...
    <attvalue for="value" value="15" start="2000.0" end="2005.0" />
    <attvalue for="value" value="20" startopen="2005" endopen="2010" />
    <attvalue for="value" value="25" start="2010.0" endopen="2015.0" />
    ...
</gexf>
					

Get more details on how to write a network evolution in the Primer.

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