Importing *.csv edge list with dynamic weights

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
henisz
Posts:5
Joined:26 Apr 2017 06:43
[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
Importing *.csv edge list with dynamic weights

Post by henisz » 26 Apr 2017 06:55

Am unable to import a *.csv file with dynamic weights for some observations. Can anyone help me correctly format the sample file below. Have spent a good part of a day trying various permutations. Thanks to any and all, Vit

Source Target Type Timestamp Weight
A1 A2 Directed <[2000,2000]> <[2000,2000,1]>
A1 A3 Directed <[2013,2013]> <[2013,2013,1]>
A1 A4 Directed <[2005,2005]> <[2005,2005,1]>
A1 A5 Directed <[2013,2013]> <[2013,2013,1]>
A1 A6 Directed <[2013,2013]> <[2013,2013,2]>
A1 A7 Directed <[2013,2013]> <[2013,2013,1]>
A1 A8 Directed <[2013,2013]> <[2013,2013,1]>
A1 A9 Directed <[2010,2010]> <[2010,2010,1]>
A1 A10 Directed <[2013,2013]> <[2013,2013,1]>
A1 A11 Directed <[2013,2013];[2016,2016]> <[2013,2013,1];[2016,2016,1]>
A1 A12 Directed <[2010,2010];[2011,2011];[2012,2012];[2013,2013];[2014,2014];[2015,2015];[2016,2016]> <[2010,2010,1 ];[2011,2011,1];[2012,2012,2];[2013,2013,2];[2014,2014,1];[2015,2015,2];[2016,2016,1]>
A1 A13 Directed <[2012,2012];[2013,2013];[2015,2015];[2016,2016]> <[2012,2012,1];[2013,2013,1];[2015,2015,1];[2016,2016,1]>
A1 A14 Directed <[1993,1993]> <[1993,1993,2]>
A1 A15 Directed <[2016,2016]> <[2016,2016,0]>

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: Importing *.csv edge list with dynamic weights

Post by eduramiba » 26 Apr 2017 20:19

Hi,
Currently you will need to name your 'Timestamp' column 'timeset' instead. This is a limitation that will be improved.

henisz
Posts:5
Joined:26 Apr 2017 06:43
[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: Importing *.csv edge list with dynamic weights

Post by henisz » 27 Apr 2017 06:46

Thank you for your quick reply. I have made this change and it works seamlessly.

henisz
Posts:5
Joined:26 Apr 2017 06:43
[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: Importing *.csv edge list with dynamic weights

Post by henisz » 02 May 2017 04:01

I reformatted all of my files per the example above and while they import correctly as soon as I try to graph them dynamically, GEPHI hangs. The only workaround that I can find is to ignore the non-binary dynamic edge weights (i.e., do NOT convert column weight to dynamic before importing in which case edge weights do vary by time but only switching from 0 to 1 based on the time intervals in timeset). If I do this, I can see the dynamic graphs but obviously lose a lot of information. As soon as I present weight to be dynamic prior to importing, while the data imports correctly with weights >1, GEPHI repeatedly hangs as soon as I visualize the graph. Any advice on this problem would be most welcome.

henisz
Posts:5
Joined:26 Apr 2017 06:43
[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: Importing *.csv edge list with dynamic weights

Post by henisz » 03 May 2017 01:35

The specific error message generated when I try to use a layout is

java.lang.IllegalStateException: The weight is dynamic, call getWeight(timestamp) or getWeight(interval) instead
at org.gephi.graph.impl.EdgeImpl.getWeight(EdgeImpl.java:87)
at org.gephi.layout.plugin.forceAtlas2.ForceAtlas2.goAlgo(ForceAtlas2.java:199)
at org.gephi.layout.LayoutControllerImpl$LayoutRun.run(LayoutControllerImpl.java:184)
[catch] at org.gephi.utils.longtask.api.LongTaskExecutor$RunningLongTask.run(LongTaskExecutor.java:274)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

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: Importing *.csv edge list with dynamic weights

Post by eduramiba » 03 May 2017 12:29


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