How to filter edges by attributes in Gephi? - graph

I have some edges with their corresponding labels, and I want to filter in only records with label 1, but it just doesn't work as shown below.
The function works to filter in nodes but doesn't work for edges. I thought it would be due to that there were too many edges, then I tried .gexf files with only hundreds of edges, but the problem remains. I also tried to create a new column in the app or create the column using Python in the .gexf file, but both failed. Sometimes an error arises: an error occurred while fetching data.
I wonder how to filter in only matched edges on Gephi?

It seems that you must have an entry for every edge in the Label column.
What you can do in your situation:
Sort the edges according to Label by clicking on the column name (might click twice).
Select edges that don't have a label yet.
Right-click: Edit all edges.
Give a default Label in the edit menu.
If you don't already have labels and want to manually assign them in the Data Table, you can also use Fill column with a value and give a default value to every edge.
This is probably a bug since we get a NullPointerException sometimes, probably because filtering doesn't expect null values in the label column (at least judging after a quick glance at the stack trace). You might file this to their GitHub Issue Page over here.

In addition:
A useful tutorial notes: "However, looking at the "catalogue" of filters, we see no filter on Label. The reason is that Label is an internal property of nodes, inaccessible to filters. So we must first copy the Labels of the nodes in a new attribute, which we will be able to apply a filter on." Whilst the tutorial refers to nodes the same idea works for edges: create a new edge column named whatever you choose and copy your edge labels into it. You can filter using this new column. NB: I can find the filter under Attributes: Equal but not Attributes: Partition, but it may help you. NNB: If you can't see the filter after creating the new column, you may have to hit Reset at the top of the Filters panel.

Related

Display label based on, field on one data-source (singular) being within another data-source fields many

I am still learning, and looking for help on how to display a label based on one data-sources field value, being within another data-sources field value list.
I have one calculated table, displaying rows of documents within a folder, and wish to use a field representing the document number in that data-source, so that if it's ANYWHERE within another tables field it displays my label.
I've been trying to use projection as I think this is how to achieve it.
I can get it working based on both the current #datasouce.item.fieldnames but need it to base the calculation on all possible numbers in that tables field (Image below should make it easier to understand).
I expect that it has something to do with projections, but can't find anything within the learning templates or anywhere else to resolve the issue.
I think the following should work for you. For the 'Reserved' label have the following binding for the text property:
(#datasources.project_quotes.items..quotenumber).indexOf(#widget.datasource.item.Qnumber) !== -1 ? 'Reserved' : ''
I would suggest alternatively just to include a field in your calculated datasource and making the determination in your server script.

Why does SELECT then performing a step like hasId() change what was selected?

Am I not using select() properly in my code? When I re-select("pair") for some reason, what it contained originally has been updated after performing some step. Shouldn't what was labeled using as() preserve what was contained?
g.V()
.hasLabel("Project")
.hasId("parentId","childId").as("pair")
.select("pair")
.hasId("parentId").as("parent")
.select("pair") // no longer what it was originally set to
I think this is expected. You (presumably) find two vertices with hasId("parentId","childId") and so the first select("pair") would of course show each vertex. But, then you filter again, hasId("parentId") and kill the traverser that contains the vertex with the id of "childId". It gets filtered away and therefore never triggers the second/last select("pair") step and would only therefore return the one vertex that has the id of "parentId".

How to make a row in a grid not appear if it's value is 0?

I only have two fields in my grid. Just need the entire row to not appear, if the value in one of the fields is 0.
There are multiple solutions for your need, but this one is working for me in a similar setup.
Following code is in the PostBuild event of the component:
Local Rowset &rs;
&rs = GetLevel0()(1).GetRowset(Scroll.MainRecordOfTheGrid);
&rs.Flush();
&rs.Select(Record.MainRecordOfTheGrid, "WHERE FieldA<>0 and FieldB<>0");

Is it possible to filter the list of fields when outputting a Full Dataset?

I have a DataTable that I'm passing to a FlexCel report. It contains a variable number of columns, so I'm using the Full Dataset feature (e.g. <#table_name.*>).
However, only a subset of the fields are dynamically generated (I have a variable number of attachments). The column name for each attachment field starts with a common word (e.g. "Attachment0", "Attachment1", etc).
What I would like to do is output the known finite set of fields and then the variable number of attachments. It would be nice if I could write something like <#table_name.Attachment*> (and <#table_name.Attachment**>). Is there any way in FlexCel Reports I can achieve the same result?
A side benefit to such a solution means that I could keep the formatting for the known/finite set of fields.
Update
I added place holder columns to the document, each with a <#delete column> tag, so that the un-wanted columns/data are removed.
Although this works, it's not ideal. For example, if I want to see how the columns fit in the page width (in print preview), then I need to hide the columns. Then I have to remember to un-hide them again, so other developers can see/understand my handy work.
It would be much more straight forward if I could filter the fields before they're output to the document.
I realised there's an alternate way around this problem. I broke up the data into two sets of data - <#table_name.*> and <#table_name_attachments.*>.
The fixed set of fields are in the first table and the variable set of fields is in the second table (all the "Attachment*" fields). When the report is run, I place them next to each other (in the same order) in the same worksheet. This means I have two table ranges - "_table_name_" and "_table_name_attachments_" on the one sheet.
Now I'm able to run my print preview without hiding/re-showing the columns-to-be-deleted. I've also eliminated human error - it was all to easy to accidentally set the wrong number of padded/delete columns.

How to list unique values of a particular field in Kibana

I am having a field named rpc in my elasticsearch database and I am displaying it using Kibana. When I search in search bar of kibana like:
rpc:*
It display all the values of rpc field but I want to have only those value to be displayed which are unique.
I have been playing around with Kibana4 since a couple of weeks now. I find it intuitive and simple and the experience has been great till now. Following your question, I tried getting unique results via a Data Table visualization. Why? Because I personally find it easier to understand. Following are the steps:
1. Get unique count
Create the visualization (Visualize -> Data Table). First lets get
the count of how many unique entries we have for a particular field
(We will use this in the later part for verification). I'm using
clientip.raw but as I see, it will work just fine with any friendly
field name too.
2. Set the aggregation right
Set you aggregation back to count and have a Split Rows as follows. Not doing this will give you count 1 for each field value (since it is looking for unique counts) when you populate the table. Noteworthy part is setting the Top field to 0. Because Kibana won't let you enter anything else than a digit (Obviously!). This was the tricky part. Hit Apply and you'll get the results. Unique field values and the count of each of them.
3. Verification:
Going to the last page of the table, we see there are exactly 543 results. This is how I know it works.
What Next?
You save this visualization and add it to a Dashboard. There you can always check the request, query, response and other stats.
Just an addition to the above mathakoot answer.
For the user of newer version (which do not allow bucket size of 0 anymore) just set a value greater than the maximum number of result
And report the value in the Options>Per Page field
I am using Kibana 6 so the UI looks a bit different than the older answers here.
Here is what worked for me
Create a visualization from your query, I used a line graph type (don't think it matters)
Under Data, set metrics aggregation = "Unique Count" and set field to your field.
Set x-axis aggregation = "Terms" and set field to your field.
Set Size > your number of records
Under Metrics and Axes, disable drawing of the graph, circles, and labels (this really helps the UI not lag)
Run query and then click "Inspect" and download CSV
Data
Metrics & Axes
I wanted to achieve something similar but I'm stuck with Kibana 3.1.
I simply added a panel of type "TERMS" and configured its Field = User-agent and left everything else on default values. This gave me a nice bar chart with one bar for each User-agent.

Resources