OR Filtering

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
osire56
Posts:8
Joined:16 Nov 2012 12:48
[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
OR Filtering

Post by osire56 » 24 Jul 2013 15:16

Hello,
In my network nodes attributes I have five fields (D1 to D5) which contain application domains. Since nodes may have up to five distinct applications domains at a time (Health and Research, for example) I am not able to filter nodes which are tagged "health" since "health" may be stored in any D1 to D5 fields.
The UNION and INTERSECTION operators do not match my needs and I am looking for an "OR" operator, something like:
D1="Health" OR D2="Health" OR... and so on

Is there a way to do this complex query ?
Thanks for your help
Olivier

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

Re: OR Filtering

Post by seinecle » 26 Jul 2013 13:01

Hi,

I always have pains with filters too, so my way would be to find a hack around:
- back in the app that generates your network, create an extra attribute D0, in which you will collate all attributes D1-D5 of the node, as comma-separated list for instance.

Then in the filters, choose a filter on attribute on D0. To filter "Health", type .*Health.* making sure that the box for regex is ticked. That should work.

Best,

Clement
PS: if you can post an (anonymized) sample of your file, I'd be curious to give it a try the normal way with filters, though.

osire56
Posts:8
Joined:16 Nov 2012 12:48
[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: OR Filtering

Post by osire56 » 26 Jul 2013 13:29

Thanks Clement,
I will try that way.
I am sending a test file
Olivier

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

Re: OR Filtering

Post by seinecle » 26 Jul 2013 13:48

For the visitors who see this thread later: I might be wrong but I believe that the UNION filters do not work indeed? (please correct me if you can make them work!).

Follow this issue on Github for its resolution:

https://github.com/gephi/gephi/issues/809

Best,

Clement

z3r0326
Posts:1
Joined:17 Sep 2013 18:39
Location:United States
[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: OR Filtering

Post by z3r0326 » 17 Sep 2013 18:42

I'm on Github, too, but I my Union filter is having similar issues. Also, my Intersection filter doesn't work the way it should. I have two integer attributes, and I wanted to filter where both ==1. If I put the two subfilters under INTERSECTION as the two attributes, no dice. But if I nest the second attribute within the first attribute as a subfilter, then I get what I'm looking for.

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