Adding cluster IDs to the Vertices spreadsheet

Aug 2, 2010 at 9:11 PM
Working with clusters on NodeXL I needed an easy way to select Vertices by their cluster. However, vertices are only associated with clusters in the Cluster Vertices spreadsheet. After finding clusters (clicking on the Find clusters button): 1. In the Cluster Vertices spreadsheet: copy column A and paste it in column C. We do so to accommodate the order of columns that the Lookup command follows. 2. In the Vertices column, paste the following command in cell AB3 (that is, the first vertex raw in the column titled "Add Your Own Columns Here"): =VLOOKUP(A3,'Cluster Vertices'!$B$2:$C$351,2,FALSE) A3 is the first vertex name in the vertices spreadsheet. 'Cluster Vertices' is the Target spreadsheet, where vertices names are associated with their clusters. B2 and C351 are the beginning and end of values on columns B and C. As B1 is the title "Vertex," the first value is in cell B2. The cluster value for the last vertex is in cell C351. In other words, we have 350 vertices that are associated with clusters, and since C1 is for the column title, the last cluster value is in cell C351. $ signs are there to make the values in the Cluster Vertices constant. Notice that A3 does not have $ signs around it, because we expect it to changed, based on the raw we're on in the new column we just created on the Vertices spreadsheet. Good luck. And, thank you, Liron, for helping me figure it out! Itai
Aug 2, 2010 at 10:24 PM


Thanks for posting this.

The good news is that we have a new "vertex group" design in the works that will eliminate the need for this complex workaround when you want to be able to select the vertices in a cluster.  Briefly, finding clusters will be just one way to group vertices; you will also be able to group by vertex attributes, by connected components, and by manually selecting vertices and inserting them in groups.  Groups will be collapsible, you will able to create multiple sets of groups, and most importantly in your case, you will be able to select a group in a Groups worksheet to select all the vertices in the group.

We have not yet scheduled these features, however.

-- Tony