How to import CSV adjacency list

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
antoniomendes
Posts:1
Joined:13 Jul 2016 18: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
How to import CSV adjacency list

Post by antoniomendes » 13 Jul 2016 19:07

Hello! I have a spreadsheet in Excel with this type of information below. The real spreadsheet have more nodes and edges, but the example below serves to help you understand the problem.

- Node spreadsheet

Id; Label
1;Au1
2;Au2
3;Au3
4;Au4
5;Au5
6;Au6

- Edge sheet

Source;Target1;Target2;Target3;Type;Label
1;2;5; ;Undirected;pub1
1;3;5;2;Undirected;pub2
2;6; ; ;Undirected;pub3
2; ; ; ;Undirected;pub4
3;4;1; ;Undirected;pub5
4;1; ; ;Undirected;pub6

I tried to import this CSV file (https://gephi.org/users/supported-graph ... sv-format/). However I did not have the expected result. I would like Gephi read the file as "adjacency list" (with all combinations - nodes 2-2)

example:
pub1 (1->2; 1->5; 2->5).
pub2 (1->3; 1->5; 1->2; 3->5; 3->2; 5> 2)

Is it possible? How can I do this?

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 import CSV adjacency list

Post by eduramiba » 18 Jul 2016 15:19

You seem to be mixing CSV (File - Open - CSV) and spreasheet (Import spreadheet) formats.

Spreadsheet import is detailed here https://gephi.org/users/supported-graph ... readsheet/ and only supports one edge per line.

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