[SOLVED] Dynamic Attributes

Evolution and dynamics on networks in Gephi: UI, data formats, algorithms...
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
bobmarley
Posts:2
Joined:20 Jul 2010 12:20
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[SOLVED] Dynamic Attributes

Post by bobmarley » 20 Jul 2010 12:31

Hi,

I have a static graph with one dynamic attribute (heat) but I am having trouble getting the attributes to update dynamically when I change the range on the timeline. So if I set the range on the timeline, click filter and go to the data laboratory it detects the data has changed but if I refresh the values do not update (they are always set to the last value for each node). Similarly, if I use the ranking to colour the nodes by heat, this never changes regardless of what I do to the timeline.

Also, the graph is only detected as dynamic if I specify a start/end range for each node (i.e. set to the full timespan).

Anyone have any ideas?

Cheers

A snippet of the gexf below:

Code: Select all

<graph mode="dynamic" defaultedgetype="directed" start="2010-04-28" end="2010-06-30">
        <attributes class="node" mode="dynamic">
            <attribute id="0" title="heat" type="float"/>
        </attributes>
        <nodes>
            <node id="0" label="ROOT" start="2010-04-28" end="2010-06-30">
              <viz:position x="0" y="113" z="0.0"/>
              <viz:size value="1"/>
              <attvalues>
                <attvalue for="0" value="23.9404761904762" start="2010-04-28" end="2010-05-05"/>
                <attvalue for="0" value="19.0999285714286" start="2010-05-05" end="2010-05-06"/>
                <attvalue for="0" value="13.5799151877976" start="2010-05-06" end="2010-05-07"/>
                <attvalue for="0" value="7.1269086832813" start="2010-05-07" end="2010-05-10"/>
                <attvalue for="0" value="12.6707998886593" start="2010-05-10" end="2010-05-11"/>

User avatar
mbastian
Gephi Architect
Posts:728
Joined:10 Dec 2009 10:11
Location:San Francisco, CA
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Dynamic Attributes

Post by mbastian » 20 Jul 2010 14:16

Hi Bob Marley ;)

Dynamic attributes are unfortunately yet supported by Gephi, but we're working on that right now, as a Google Summer of Code project, done by Cezary Bartosiak.

You can see the specifications page here. Feel free to comment it, what features do you need and so on...

bobmarley
Posts:2
Joined:20 Jul 2010 12:20
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Dynamic Attributes

Post by bobmarley » 20 Jul 2010 21:03

Thanks for the reply. On the whole Gephi is pretty cool :) Dynamic attributes would make it very cool :D I have looked through the spec and here's some general feedback which you can take or leave as you see fit - bear in mind though I have been playing with gexf and Gephi for a total of one day, so I apologise if some things come across as a bit noob.

As a user I am less concerned with API details than end features and usability.

I am interested in visualising how a property changes over time, the spec mentions this is hard because of the abstract nature of what the property is, however the "ranking" feature currently does this just fine for me for a static graph, so all I need is it to work when the attributes have changed.

In my case I am not interested in a time range more a snapshot at a given single point in time

Being able to specify dynamic viz properties (size, colour, etc) would be cool. This means at the least I could "hack it" if a feature is not supported or I have custom needs and just use gephi as a convenient rendering tool.

I took me a while two work out how to turn on the time line, far from intuitive.

Gephi didn't recognise the graph as dynamic (despite being declared dynamic) until I had added start/end attrs to the nodes (compounded the issue with getting the timeline to show).

GEXF lets you specify time as either a date or as a float, which is a bit limiting as "time" tends to be a feature of the data set you are working with. In my case "time" is actually check-ins to a rvs server, so integer change list #'s. Similarly if I was working with animation data time it might make sense to specify time in seconds or frames. I can convert these to floats but the more I move away from the natural data representation the harder I need to work :shock:

Normally when working with dynamic data we tend to specify "key frames" rather than start/end points. On that note, it would be useful to have certain attributes automatically interpolated between key frames.

HTH

GL & HF

G

admin
Gephi Community Manager
Posts:964
Joined:09 Dec 2009 14:41
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Dynamic Attributes

Post by admin » 20 Jul 2010 22:54

Hi Bob :)

Your remarks are very precise and interesting. It's the right time for pointing these cases, as we're at the beginning of the support of dynamics in Gephi. I'll reply to some, and let Mathieu for the others.
Being able to specify dynamic viz properties (size, colour, etc) would be cool. This means at the least I could "hack it" if a feature is not supported or I have custom needs and just use gephi as a convenient rendering tool.
I keep this in mind to make the GEXF format evolve, as it could be useful.
GEXF lets you specify time as either a date or as a float, which is a bit limiting as "time" tends to be a feature of the data set you are working with. In my case "time" is actually check-ins to a rvs server, so integer change list #'s.
Integers are automatically interpreted as float values by every Float parser, so you don't have to convert your values before generating a GEXF.
Normally when working with dynamic data we tend to specify "key frames" rather than start/end points.
It depends on the time representation: continuous vs discrete? We adopted the "time sliced" solution presented in this paper to cover the most cases possibles in an efficient way to process and filter the data. All right, it's harder to use than key frames but is more flexible.

A workaround is to use the GEXF parser recommendation on superseding priorities, which simply requires for parser implementations to take care of the order of the attributes written in the file. We can simulate key frames by adding only "start" elements, i.e:

Code: Select all

<attvalue for="0" value="23.9404761904762" start="2010-04-28" end="2010-05-05"/>
<attvalue for="0" value="19.0999285714286" start="2010-05-05"/>
is strictly equivalent to:

Code: Select all

<attvalue for="0" value="23.9404761904762" start="2010-04-28"/>
<attvalue for="0" value="19.0999285714286" start="2010-05-05"/>
So with integers, the following encoding is correct:

Code: Select all

<attvalue for="0" value="23.9404761904762" start="1"/>
<attvalue for="0" value="19.0999285714286" start="2"/>
If it's not the case in Gephi, then it's a bug.

HTH

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable