Data Import

Get help with your data
pegerp
Posts:124
Joined:21 Dec 2011 17:10
[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: Data Import

Post by pegerp » 12 Dec 2012 11:15

eduramiba wrote:
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
...
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.
Actually the separator is TAB. In browser the tabs get reduced to characters that look like spaces. Space wouldn't work as separator either because there are country names such as "Central African Republic" which is supposed to be a string value for the first column.

So my recommendation: use TAB as separator. Or change all TAB characters to a ";" and then do what admin said.

You could also remove the "$" characters and remove the thousand separators "," from the money columns so Gephi can understand that these columns are numerical values and handle them as such.

Webbykk
Posts:10
Joined:04 Dec 2012 05:55
[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: Data Import

Post by Webbykk » 18 Dec 2012 04:13

Hi again,
I am nearly there, I hope. I now have my data in a notepad format with semi-colons, but still can't get it to import this, it is still asking for a source and target and does not recognised them. I have attached the notepad format for you. Any further advice much appreciated.

Cheers, Webby
Attachments
Factor Interact Collisions 2006 to 2010 Notepad.txt
(8.11KiB)Downloaded 431 times

pegerp
Posts:124
Joined:21 Dec 2011 17:10
[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: Data Import

Post by pegerp » 18 Dec 2012 09:15

With the latest Gephi version (Gephi 0.8.1 beta 201202141941) I can open the file myself. Rename the file extension to .csv and it should open. If the file extension is .txt Gephi says it can't find importer. You are nearly there!

Webbykk
Posts:10
Joined:04 Dec 2012 05:55
[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: Data Import

Post by Webbykk » 18 Dec 2012 23:34

Hi again

Not sure if that last post was for me? If it was I can't convert my text file to csv by opening it and doing "save as". If you mean open it in Gephi and convert it - can you give me the steps please as I can't work that out?

Thanks, Webbykk

pegerp
Posts:124
Joined:21 Dec 2011 17:10
[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: Data Import

Post by pegerp » 19 Dec 2012 09:40

My reply was meant to you Webbykk. In Windows just rename the file extension. Check Google for how to do it ;)

If you try to "Save as.." with Notepad it's possible you get a file like "file.csv.txt" because Notepad automatically appends the .txt extension.

All you need to do is get the file extension changed to .csv and you are good to go! You can do it by finding the file in Windows and right clicking on the file and choose "Rename" from the menu.

Or you can just select the file and press F2 which is a shortcut for renaming a file. Then open the file in Gephi.

Good luck!

Webbykk
Posts:10
Joined:04 Dec 2012 05:55
[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: Data Import

Post by Webbykk » 20 Dec 2012 05:29

Hi again

Ok I have renamed the file with the extension csv and still get the error message it needs a source and target, so still not working for me unfortunately. I have attached the file so you can see what it is now looking like.

Any further help would be appreciated, hopefully Father Xmas will deliver on this issue and I can get on with my crazy research, happy to kiss a rain deer for this one.

Thanks for your kind persistence in my ongoing dumbness.

Webbykk
Attachments
Factor Interact Collisions 2006 to 2010 Notepad.csv
(8.11KiB)Downloaded 352 times

pegerp
Posts:124
Joined:21 Dec 2011 17:10
[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: Data Import

Post by pegerp » 20 Dec 2012 08:41

Hi.

I was able to open the attached file in Gephi without problems. Maybe you need to update your Gephi.

My Gephi version is:
Product Version: Gephi 0.8.1 beta 201202141941

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: Data Import

Post by eduramiba » 20 Dec 2012 19:10

Hi,
It looks like Webbykk is trying to use Import spreasheet feature.
But this kind of CSV file should be opened with File - Open - CSV

Eduardo

Webbykk
Posts:10
Joined:04 Dec 2012 05:55
[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: Data Import

Post by Webbykk » 21 Dec 2012 00:19

Hi there,

Yes SUCCESS!!!!! I was doing the import and it now works doing the file open csv, I am away to play, thank you Santa, hugs and kisses. :lol:

Webbykk

jamesrpett
Posts:1
Joined:05 Mar 2013 18: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: Data Import

Post by jamesrpett » 22 Mar 2013 21:49

Hi:

This is for Webbykk or anyone else who might know--and is really an excel question--but how did you merge all your data in your original excel file in a single cell on each row? I tried the merge command, but it can't merge cells with different data in them. I tried copying the file into notebook and pasting it back into excel, but that didn't work either.

Thanks

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