Page 1 of 3
Data Import
Posted: 05 Dec 2012 05:11
by Webbykk
Hi there,
I am attempting to use Gephi and have my data set up for use in social network analysis programs.
I therefore have a one mode weighted undirected (edge) matrix in excel which I have converted to csv and I am attempting to import it as my edge table. I have already set up the node file in the Data Laboratory, so yah over that step. My problem is that when I import my table it is not recognizing any source or target data. Do I have to type a edge list rather than use a matrix? If so will it recognize that it is undirected? If not can you advise what I might do to get my columns right with the headings.
Any help greatly appreciated.
Thanks Webbykk
Re: Data Import
Posted: 05 Dec 2012 09:26
by admin
Hi,
A matrix is not an edge table, which is an edge list with attributes.
Import your data using File > Import > CSV, and be sure you use one of these formats:
https://gephi.org/users/supported-graph ... sv-format/
Re: Data Import
Posted: 06 Dec 2012 02:45
by Webbykk
Hi,
Thanks for that. I have looked at the formats, and the matrix one is what I need to get to.
I have an excel spreadsheet which is a matrix with weighted edges saved as a csv file.
My problem then is that the matrix is not recognized as a matrix format with commas as separators when I import it.
How do I get it to look like the matrix in the format examples?
It is still looking for source and target data when I import just my excel spreadsheet.
I am pretty hopeless at this (as you can tell) and just need a bit more help in how to get the data in a format that I can import it into Gephi as my edge data.
Thanks, Webbykk
Re: Data Import
Posted: 06 Dec 2012 09:38
by admin
Can you share your current data file?
Re: Data Import
Posted: 07 Dec 2012 01:52
by Webbykk
Hi there
Ok able to share. Node ID is top row and side column. Weights are shown. Matrix is undirected. Here it is.
Thanks
Webbykk
Re: Data Import
Posted: 08 Dec 2012 16:58
by admin
Just replace commas by semi-columns using a text editor, and it works.
The Source - Target format is described here:
https://gephi.org/users/supported-graph ... readsheet/
Re: Data Import
Posted: 10 Dec 2012 04:29
by Webbykk
Hi again,
Thanks for that but I am still lost?
There are no commas in my excel spreadsheet, so do mean convert it to a different format first?
I am not sure what a text editor is that you might be referring to?
More step by step instructions for dummies is required, sorry.
I understand Gephi wants it in the format you keep pointing me to, but just don't know how to get there from an excel spreadsheet.
Webbykk
Re: Data Import
Posted: 10 Dec 2012 12:25
by admin
CSV files are plain text format. When you open it in a text editor like
Notepad++, columns are encoded with a comma by default, but Gephi requires semi-columns instead.
Re: Data Import
Posted: 11 Dec 2012 00:05
by Aggwanji
What is wrong with the following edges list? I can't import it into Gephi.
Source Target Exports Imports Total trade
Algeria UMA $136.90 $360.50 $497.40
Angola SADC $72.30 $253.80 $326.10
Benin ECOWAS $27.20 $202.40 $229.60
Botswana SADC $521.00 $946.00 $1,467.00
Burkina Faso ECOWAS $3.30 $26.20 $29.50
Burundi COMESA $853.50 $1,523.30 $2,376.80
Cameroon ECCAS $356.20 $714.40 $1,070.60
Cape Verde ECOWAS $1,564.70 $2,187.80 $3,752.50
Central African Republic ECCAS $715.50 $833.50 $1,549.00
Re: Data Import
Posted: 11 Dec 2012 20:06
by eduramiba
Aggwanji wrote:What is wrong with the following edges list? I can't import it into Gephi.
Source Target Exports Imports Total trade
Algeria UMA $136.90 $360.50 $497.40
Angola SADC $72.30 $253.80 $326.10
Benin ECOWAS $27.20 $202.40 $229.60
Botswana SADC $521.00 $946.00 $1,467.00
Burkina Faso ECOWAS $3.30 $26.20 $29.50
Burundi COMESA $853.50 $1,523.30 $2,376.80
Cameroon ECCAS $356.20 $714.40 $1,070.60
Cape Verde ECOWAS $1,564.70 $2,187.80 $3,752.50
Central African Republic ECCAS $715.50 $833.50 $1,549.00
That format is ready for Spreadsheet import in data laboratory.
Remember to select edges table and space as separator in first step.
Eduardo.