Getting started with filters (tutorial) - plus a query...

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
psychemedia
Posts:18
Joined:15 Apr 2010 17:50
[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
Getting started with filters (tutorial) - plus a query...

Post by psychemedia » 23 Apr 2010 14:01

Hi

I just posted the second in my series of Getting Strtred with Gephi tutorial posts:

Getting Started With Gephi Network Visualisation App – My Facebook Network, Part II: Basic Filters
http://blog.ouseful.info/2010/04/23/get ... c-filters/

It introduces simple filters, workspaces, and how to use the Union filter rule.

One question that I haven't resolved is how to filter a graph to show the nodes connected to a particular node? Current use case is simple undirected graph loaded in using netvizz/facebook data. I know how to find this data in the data table by searching for the person's name in node or source target as required (which one the person is depends on load order I guess, as the graph is undirected) but I don't see a way of:

1) saving data from a data table to it's own workspace (or visualising it in the graph window?); or

2) writing a rule over the whole graph to just show people connected to a named individual,

both of which would give me the result I'm looking for?

Also, in the equal and non-null filters, there are two options for id and two for label. Why two?

thanks
tony

admin
Gephi Community Manager
Posts:964
Joined:09 Dec 2009 14:41
[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: Getting started with filters (tutorial) - plus a query...

Post by admin » 23 Apr 2010 15:00

Hi,

Your tutorial is a really good work, I think we could add the links in the Users page when the series is done!

The Ego-network filter is available in the development trunk, and will be added in the alpha4 just in one week ;)
It makes what you want, plus a distance parameter from a node to the connected ones.
in the equal and non-null filters, there are two options for id and two for label. Why two?
This seems to be a bug. Mathieu?

psychemedia
Posts:18
Joined:15 Apr 2010 17:50
[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: Getting started with filters (tutorial) - plus a query...

Post by psychemedia » 23 Apr 2010 16:03

Thanks for the encouragement on the posts. I intend to keep blogging my learning journey on this so will hopefully end up with a reusable resource of some sort by the end of it....

As to other matters... so is there no filter for edges then?

Would it be useful to be able to filter (using regexp) on:

- target node
- source node
- target and source node

(I think it could be quite handy...?;-)

User avatar
mbastian
Gephi Architect
Posts:728
Joined:10 Dec 2009 10:11
Location:San Francisco, CA
[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: Getting started with filters (tutorial) - plus a query...

Post by mbastian » 24 Apr 2010 09:17

in the equal and non-null filters, there are two options for id and two for label. Why two?
Actually there is two because one is for nodes and one is for edges. In think that could be more clearly displayed.

I apologize but there is still some bugs and strange behaviors in filters, I'm working on fixing them for upcoming release.

One other thing laking is what you describe, working on source/target node. For instance it's not possible for the moment to keep edges with a particular rule on source node and another rule on target node. I'm thinking about how to integrate this.

psychemedia
Posts:18
Joined:15 Apr 2010 17:50
[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: Getting started with filters (tutorial) - plus a query...

Post by psychemedia » 24 Apr 2010 13:35

Actually there is two because one is for nodes and one is for edges. In think that could be more clearly displayed.
I thought that might be the case, but can't really make sense of it (eg doing experiments with both of the Label filters).

The edges I have (undirected) are of the form:
IDNumber - label
for both Target and Source.

What I want is a rule along the lines of:
- filterNodeByEdge
-- column target|source
-- parameter .*
-- useRegex true|false

Then I could enter either an ID or a fragment of the label and just retrieve those nodes (and also display the edges between the returned nodes, in the normal way).

So eg:
foreach Edge:
return Node if Edge.column contains parameter

The Node can be picked up from the IDNumber in the appropriate Edge.column ?

psychemedia
Posts:18
Joined:15 Apr 2010 17:50
[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: Getting started with filters (tutorial) - plus a query...

Post by psychemedia » 24 Apr 2010 14:24

Thinking a little bit more about finding nodes connected to a node - it occurs to me that the graph view UI already supports this to an extent in that I can click on a node and highlight all the edges and nodes connected to that node. What I would like is a rule that does this too (is this what the Ego filter will do? Let me specify a node and it will then display that node and the nodes it is connected to?)

It might also be handy to be able to eg right click a node in the graph window and then "export this node, its edges and connected nodes" to a new workspace?

SImilarly, there may be occasions when it would be useful to "Group this node and all the nodes it's connected to"?

admin
Gephi Community Manager
Posts:964
Joined:09 Dec 2009 14:41
[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: Getting started with filters (tutorial) - plus a query...

Post by admin » 24 Apr 2010 16:16

Yeah, the Ego filter will exactly do this!
It might also be handy to be able to eg right click a node in the graph window and then "export this node, its edges and connected nodes" to a new workspace?
And then the user enter the distance limit, and the subgraph is exported. It would make sense!
Similarly, there may be occasions when it would be useful to "Group this node and all the nodes it's connected to"?
I added it in the Idea list.

but it echoes to another idea: the ability to group all filtering result. Mathieu, what to you think about this?

psychemedia
Posts:18
Joined:15 Apr 2010 17:50
[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: Getting started with filters (tutorial) - plus a query...

Post by psychemedia » 25 Apr 2010 19:02

but it echoes to another idea: the ability to group all filtering result. Mathieu, what to you think about this?
Or maybe it suggests different ways of interacting with the graphs? Eg some users may like writing filters,, whereas for others, maybe they would rather interact with the graph by clicking on it and then selecting various options, which I guess is a bit more like a hands-on/direct manipulation interface?

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