Filter nodes but maintain their connections

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
ivnvir
Posts:3
Joined:07 Apr 2014 14:30
Location:Brazil
[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
Filter nodes but maintain their connections

Post by ivnvir » 30 Jun 2014 19:24

Hello everybody.

I'm facing a problem and would like you guys to help me: I'm working with Gephi Toolkit and have a requirement to filter some nodes that has less than X nodes. That's ok, just a degree filter will do. BUT, let's say I have 10 nodes, 2 of them are connected with more than 2 other nodes, but not connected with each other. When I filter nodes with degree less than 2, just this nodes shows up, but not their connections.
I guess it was supposed to be that way, but what I really need is to maintain their connections, so my predicate would be: nodes that has more than X nodes OR nodes that are connected with nodes that has more than X nodes.

Am I missing something? Can anyone enlighten me?

Here some CSVs (separated by ;) for you to test:

nodes.csv

id;label
1u;"1"
2u;"2"
3u;"3"
4u;"4"
5u;"5"
6u;"6"
7u;"7"
8u;"8"
9u;"9"
10u;"10"
11u;"11"
12u;"12"
13u;"13"
14u;"14"
1t;"With 9"
2t;"With 10"
3t;"With 11"


edges.csv

source;target
1u;1t
2u;1t
3u;1t
4u;1t
5u;1t
6u;1t
7u;1t
8u;1t
9u;1t
1u;2t
2u;2t
3u;2t
4u;2t
5u;2t
6u;2t
7u;2t
8u;2t
9u;2t
10u;2t
1u;3t
2u;3t
3u;3t
4u;3t
5u;3t
6u;3t
7u;3t
8u;3t
9u;3t
10u;3t
11u;3t


Without filters, I have all the nodes. With a filter by < 10, for example, I have only "With 10" and "With 11", and not the ones connected with it (1,2,3,4,5,6,7,8,9,10 and 11).

Thanks!

SeetheLaw
Posts:2
Joined:10 Oct 2014 04:21
[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: Filter nodes but maintain their connections

Post by SeetheLaw » 10 Oct 2014 04:29

I would like to do the same. Feels like we are missing something obvious

SeetheLaw
Posts:2
Joined:10 Oct 2014 04:21
[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: Filter nodes but maintain their connections

Post by SeetheLaw » 11 Oct 2014 04:44

I think I figured it out.
Seems to me like what I wanted to do is the same you described: Only see nodes targets of two or more edges, but also show those source nodes. What took me a while to realize is that the filter-subfilter order is in reverse. The UI implies it's a hierarchy, but the description says the subfilter is applied first, and if you save a filter you can see it's written like a math equation, which is solved "parenthesis first".
So realizing that, I did the following:
Added a neighborhood filter of max, sub-filtered by in-degree of two or more. This got the result I wanted.
Hope this was clear enough to understand.

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