How to: Specify CSV data for import of dynamic (complex) net

Get help with your data
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
FrederikSc
Posts:5
Joined:25 Aug 2014 10:16
[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
How to: Specify CSV data for import of dynamic (complex) net

Post by FrederikSc » 12 Jun 2016 13:18

Hello,

In my ABM simulations I am creating dynamic data on networks which I want to analyse then later. I am saving the data in a csv (an edge list and, optionally, a node-list). The time-information is provided as discrete integer.
In gephi .82 I was able to import the data with a dynamic interpretation. But in gephi .9 I cannot find such an option. Any idea, how I can solve this problem?

I have both, dynamic and static edge, node and weight attributes (and several different ones). And I have three different kinds of nodes (Consumers, Companies and a special "none" node). Each kind of node has a different set of attributes. The directed network atm is only from consumers to companies or the "none" node (when no company is visited at a given time). Later I might want to add a layer of the communication between consumers. The ABM is running in a c++ framework.

Any idea how I could (easily) get the data in a suitable format for gephi? Attached are the edge-list and an optional node list. In the past I used the edge list in such a format to create the dynamic gexf first via eonydis and then with the import plug-in (both by Clement Levallois), but the former is outdated and the latter not available for gephi .9. I know a bit of python, so if there is a simple way to convert the csv in python, I'd be happy enough (and I could batch-run it on large sets of data, wich I'd prefer). I tried csv->panda data frame -> networkx->gexf, but unfortunately this works only for static networks.

Here are the example csv-files:
node_list.csv
Node list
(3.77KiB)Downloaded 521 times
(optional),
edge_list.csv
Edge list
(1.46MiB)Downloaded 482 times
Many thanks!
Frederik

User avatar
eduramiba
Gephi Code Manager
Posts:1064
Joined:22 Mar 2010 15:30
Location:Madrid, Spain
[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: How to: Specify CSV data for import of dynamic (complex)

Post by eduramiba » 12 Jun 2016 14:02

Hi Frederik,

When you import dynamic time interval columns, choose the 'IntervalSet', but also make sure your data is formatted as explained here: https://gephi.org/users/supported-graph ... preadsheet

User avatar
eduramiba
Gephi Code Manager
Posts:1064
Joined:22 Mar 2010 15:30
Location:Madrid, Spain
[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: How to: Specify CSV data for import of dynamic (complex)

Post by eduramiba » 12 Jun 2016 14:04

Also try to just name your column "timeset" in CSV, that way it will be imported in the default time interval column of all graphs.

FrederikSc
Posts:5
Joined:25 Aug 2014 10:16
[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: How to: Specify CSV data for import of dynamic (complex)

Post by FrederikSc » 12 Jun 2016 14:39

Thank you eduramiba for the fast help!

when I follow your second advice, all is imported as it should! It is, however, crucial to name the column "time-set".

Many Thanks! Frederik

FrederikSc
Posts:5
Joined:25 Aug 2014 10:16
[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: How to: Specify CSV data for import of dynamic (complex)

Post by FrederikSc » 13 Jun 2016 09:16

I have imported some ~500MB of edges (372 Nodes, more than 5.5 Million edges). I increased the gephi memory to 8GB and encountered no more "problem statements". However, the "counting" of edges and cpu processing does not stop after more than half an hour (at about 3.6 Million edges) although no "progress" bar or anything is visible. I can even make a gexf export. However, a look at the edges-list shows me that not all edges have yet been imported.... Then, closing gephi and opening the gexf just created (4.4 GB) works but still the latest edges are missing. From the "timeline" I can see that only up to t=1,450 (instead of 2,300) edges have been imported (#edges/time is not constant). Is there a way to "improve" upon the performance? For example, the date-convention I used led to parallel edges. Does this slow down things a lot?

Many thanks
Frederik

FrederikSc
Posts:5
Joined:25 Aug 2014 10:16
[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: How to: Specify CSV data for import of dynamic (complex)

Post by FrederikSc » 13 Jun 2016 16:10

I now spent a lot of time to change the output format such that each attribute is also formatted "<[start,start+1,attr)>. However, gephi does not aggregate nodes over time. E.g.

ID timeset Attribute
1;<[1,2)>;<[1,2,5)>
1;<[2,3)>;<[2,3,4)>

is not aggregated to:
1;<[1,3)>;<[1,2,5);[2,3,4)>

... any ideas? Eonydis and the "former" import tool in gephi .82 by Clement Levallois allowed to do so (it was sufficient to provide the information with a single "time-print" and only edges were necessary). Or is there no way other than that I aggregate everything myself before importing it to gephi?

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