[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 583: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 639: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
Gephi forums •Data preparation to show correlation beetween classes and keywords
Page 1 of 1

Data preparation to show correlation beetween classes and keywords

Posted: 01 Oct 2017 15:41
by Chazu1989
I'm totally new to Gephi and I have already problems ... at first with the data preparation.

I have the following data (sample):
Image

What I want to do is to show a correlation between the keywords and the classes. So actually it should be a simple task but I don't get it.

Classes are from 0 to 10 and an individual keyword can occur multiple times and can be connected to different classes.

For example:
"Keyword 1" can have a connection to "Class 1" and "Class 6"
"Keyword 2" can have a connection to "Class 2"
"Keyword 4" cann have a connection to "Class 8", "Class 6" and "Class 2" and so one.

What I want to do, is to show the classes as nodes and the keywords around them. They are connected with a line which has a different thickness depending on the number of connections of the respective keyword with the class.

Example with paint :)

Image


I am totally lost :? I hope anyone can help me with that.

Re: Data preparation to show correlation beetween classes and keywords

Posted: 01 Oct 2017 16:25
by eduramiba
You can use spreadsheet import and name your classes and keywords columns as source and target.

https://gephi.org/users/supported-graph ... readsheet/

Re: Data preparation to show correlation beetween classes and keywords

Posted: 01 Oct 2017 17:12
by Chazu1989
Thanks for your fast reply.

But I'm a "little" bit confused:

The keywords shouldn't have a connection among each other but only to the classes.
So I have created the following two files.

Nodes.txt as UTF8 with BOM
Nodes.txt
(139Bytes)Downloaded 136 times
Nodes.JPG
Nodes.JPG (14.96KiB)Viewed 2542 times

Edges.txt as UTF8 with BOM
Edges.txt
(73.28KiB)Downloaded 124 times
Edges.JPG
Edges.JPG (24.84KiB)Viewed 2542 times
But if I want to import the edges table, I am getting the error message: Edges table needs a 'Source' and 'Target' column with nodes ids

Re: Data preparation to show correlation beetween classes and keywords

Posted: 01 Oct 2017 17:39
by eduramiba
Hi,
Try to use .csv (or even .xlsx) extension. Also never include the BOM.

Re: Data preparation to show correlation beetween classes and keywords

Posted: 01 Oct 2017 18:38
by Chazu1989
Ahhh thanks!!
As .txt file without BOM it is working. :mrgreen:

Now I can test a bit.

Thanks again!

Another question... I have about ~4 million keywords for this 10 classes. Are they too many, or could it work?

Re: Data preparation to show correlation beetween classes and keywords

Posted: 01 Oct 2017 19:26
by eduramiba
Are you still using 0.9.1? 0.9.2 is newer and more stable and friendly but you will have to change the extension from txt to csv (no changes required to the file).

4 million should work but you might need to increase gephi memory limit in gephi.conf