Gephi is dropping Edges when I import from CSV file.

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
EllieUser
Posts:1
Joined:16 Mar 2017 03:35
[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
Gephi is dropping Edges when I import from CSV file.

Post by EllieUser » 16 Mar 2017 03:39

Gephi is dropping Edges when I import from CSV file.

While most edges import correctly, some nodes appear on the visualisation as unconnected to other nodes.

When I check the ID it is clear that these nodes should be connected to other nodes (they are targets), and when I check the data table I can see that the relevant Edges have not been imported from the CSV file. They are present in the CSV file.

It is while importing the Edge CSV file that some edges go missing. I am very concerned about this, because there could be other edges dropped that I have not detected.

I have tried on Mac and Microsoft and the same Edges are dropped each time.

This suggests two things:
There is an error with Gephi.

There is a problem with my data formatting, but I can’t see what the problem could be? What could be going wrong? Why could some edges be dropped, and others imported correctly? These nodes appear amongst the data – not at the start or the end - and when viewed as text the CSV looks perfectly uniform and correctly formatted.

xptrxptr
Posts:31
Joined:21 Dec 2010 21:17
[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: Gephi is dropping Edges when I import from CSV file.

Post by xptrxptr » 16 Mar 2017 09:40

Several times I compared results obtained by Gephi with other network software.
And I found out that results of Gephi are different from results obtained by Ucinet, Visone or Pajek.
But I was not able to found out what is the reason - networks are larger so I could not see
from the picture that some edges are simply missing?
Could that be the reason: Gephi does not import data correctly?
If that is the case, I am really angry - that, means that all analyses that I have done so far with Gephi are wrong?

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: Gephi is dropping Edges when I import from CSV file.

Post by eduramiba » 16 Mar 2017 16:40

Hi,
What kind of CSV import are you using? There might be some bug in the import. Can you send me the file you are trying to import? Send it to eduardo.ramos [at] gephi.org

simone.caiello
Posts:1
Joined:22 May 2017 13:56
[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: Gephi is dropping Edges when I import from CSV file.

Post by simone.caiello » 22 May 2017 14:04

Hi!

I am facing an analogous problem:

I should import 16.973 records (edges) but I can get finally only 2.544... and I don't understand why :(

Thank you for your help,

Simone

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: Gephi is dropping Edges when I import from CSV file.

Post by eduramiba » 22 May 2017 14:54

Please try with the latest nightly build: https://github.com/gephi/gephi/#nightly-builds

StuckenB
Posts:1
Joined:04 Aug 2017 12:24
[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: Gephi is dropping Edges when I import from CSV file.

Post by StuckenB » 04 Aug 2017 12:33

Hi!

I was having trouble with the same problem. Trying the nighttly build (Gephi 0.9.2-SNAPSHOT 201708032001) fixed it, but now I can't export the edges anymore. I'm getting a warning "java.lang.NullPointerException" and a broken csv file with only the first row in it. Any ideas?

Thank you for your help
Kim

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: Gephi is dropping Edges when I import from CSV file.

Post by eduramiba » 04 Aug 2017 13:00

Can you post the whole stack trace please?

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: Gephi is dropping Edges when I import from CSV file.

Post by eduramiba » 17 Aug 2017 17:35

StuckenB wrote:
04 Aug 2017 12:33
Hi!

I was having trouble with the same problem. Trying the nighttly build (Gephi 0.9.2-SNAPSHOT 201708032001) fixed it, but now I can't export the edges anymore. I'm getting a warning "java.lang.NullPointerException" and a broken csv file with only the first row in it. Any ideas?

Thank you for your help
Kim
Can you post the whole stack trace please?

rodutty
Posts:2
Joined:22 Aug 2017 23:00
[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: Gephi is dropping Edges when I import from CSV file.

Post by rodutty » 22 Aug 2017 23:08

I had what I thought was a similar issue, but I think it was just how I was thinking about my data. I had a CSV with multiple edges with different attributes existing between the same two nodes. When I imported from a CSV, Gephi would read the attribute for the first one correctly, then increment the edge weight for subsequent edges between the same nodes, even if the attributes were different. I guess I had expected that edges with different attributes would be added as new edges, rather than losing that additional data. In my case, I added an "Id" column to my edges table with unique values for each edge, and it seems to have solved the issue for me. Hopefully this approach might help some of you? Good luck!

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