Need help with a complicated filter

Visual manipulations and refinements
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
gerogriniaris
Posts:2
Joined:04 Dec 2013 14:25
[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
Need help with a complicated filter

Post by gerogriniaris » 04 Dec 2013 14:40

Hi, I am new in both gephi and social network analysis so I hope you can help with a problem I have filtering a complicated network.
I am studying relationships between bloggers and blogs of extreme right in Greece.
The data I have been able to gather is bloggers connecting blogs (blogger X writes both in blogY and blogZ so he is a connector) and blogs connected by interlinking (the more links they share the stronger connected they are).
So I have a problem filtering them.
I want to get an ego network arround a specific blog (blog1) but to keep all bloggers connected to it (authors) while filtering blogs that are lightly connected to it (small number of interlinks).
Since any blogger connects to any blog via a single connection this is an undirected connection with weight 1
Bloggs on the other hand are connected via links who are directed connections with varying weights.

Any ideas of how to keep all bloggers (undirected weight 1) while filtering out blogs that are lightly connected (directed in and out links with weight less than 50 let's say)?

I am sorry for the long post but I have being trying 3-4 days now and couldn't find a way to do this so any help would be appreciated.
Thank you in advance

User avatar
seinecle
Gephi Community Support
Posts:546
Joined:08 Feb 2010 16:55
Location:Lyon, France
Contact:

Re: Need help with a complicated filter

Post by seinecle » 04 Dec 2013 23:23

Hi,
I thought I had replied to this post but I can't see it. So here it is again: what you need is probably easy to obtain, but it's a bit hard to come up with a solution in abstract terms. If you can / want to share a sample of your data, you could send it to me and I'd see how to do it. Then I'd post the solution here for everyone's benefit.
You can reach me at clement.levallois AT gephi.org

Best,

Clement

gerogriniaris
Posts:2
Joined:04 Dec 2013 14:25
[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: Need help with a complicated filter

Post by gerogriniaris » 05 Dec 2013 05:23

Thank you for the reply.
My data is a combination of 2 databases.
1 is the bloggers who are or have been authors in some blogs, something like this:

blogger1 http://blog1.blogspot.com/
blogger2 http://blog1.blogspot.com/
blogger3 http://blog1.blogspot.com/
blogger3 http://blog2.blogspot.com/
etc

It is obviously an undirected graph where first row has bloggers and 2nd blogs.
You can see how blogger3 connects blog1 and blog2

the 2nd data set looks like this:
http://blog1.blogspot.com/ http://blog3.blogspot.com/
http://blog1.blogspot.com/ http://blog3.blogspot.com/
http://blog1.blogspot.com/ http://blog3.blogspot.com/
http://blog1.blogspot.com/ http://blog3.blogspot.com/
http://blog3.blogspot.com/ http://blog1.blogspot.com/
http://blog3.blogspot.com/ http://blog1.blogspot.com/
http://blog2.blogspot.com/ http://blog1.blogspot.com/
etc

It was a result of crawling those blogs and getting links between them.
Directed graph with some lines being repeated that gephi translates into link weight.
Both data sets are quite big, resulting in a mixed netork with 4688 nodes and 22458 edges.
My problem:
I definately want to keep all "authors" since this in my view represents a "strong" link to a blog, so a common author between blogs represent a strong link among them.
I also want to keep only strong links among blogs as they are shown by multiple hyperlinks from one to another, meaning from the second dataset I only want to keep those nodes that have the biggest "degree".
And I want to consentrate in one or more specific blogs.
If I use ego network filter around a specific blog I get a bery big network with too many blogs that don't really play a role in the network.
So I need to filter out small degree directed ties (hyprelinks) but keed all one degree undirected ties (authors).

I have come up with a solution to this but it is not a pretty one :-)
I made a boolean column bloggers/blogs (named the column NTypeB) where if a node is a blogger the relevant cell is true, else it is false.
My filter is like this:

Union
| intersection
| |Union
| | ego filter for blog1
| | || subfilter equal (node) [NTypeB = true]
| | ego filter for blog1
| | || subfilter degree (>100)
| intersection
| |Union
| | ego filter for blog2
| | || subfilter equal (node) [NTypeB = true]
| | ego filter for blog2
| | || subfilter degree (>100)
| intersection
...
union

etc repeated many many times.
In order for it to work I also had to manually change the boolean attribte bloggers/blogs to true for those blogs I used the ego network filter so I would have to go to data table, locate blog1 and change atribute of it's boolean column to true.
It is time consuming and it is not an elegant solution but it seems to work.

Now I have another question.
Since making this filter is time consuming and I still need to edit some of the data, is it possible to save/export the filter in a file so that I can also use it in another gephi file that has it's own filters?

I know that this is a looong post for a question and I am sorry for taking your time but as I said I am a noob in all this.
I will send a copy of this post by mail also with the dataset attached but I thought I'd post it here too so that others can see and maybe find it usefull.

Thnk you in advance or your time.

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