NodeXL - Group by Vertex Attributes

Jun 25, 2012 at 1:53 AM

Hey All,

I would like to know if NodeXL is able to group by 2 different vertex attributes ?
For example , the 1st grouping is by the score of subject's grade.Then the 2nd grouping is based on the subject's title.

I would want the 2 groupings to be selected together when group by vertex attributes. OR
could it be done in this way when the first grouping is done then the 2nd grouping is based on the 1st grouping.

Regards,
Cody


 


Coordinator
Jun 25, 2012 at 11:32 PM

Hello!  Thank you for the interest in NodeXL.

One possible solution for your task is to create a new vertex worksheet column which concatenates the two vertex attributes you are interested in, effectively creating a new, compound, attribute.

You can concatenate the contents of two (or more) cells by creating a formula that references Cell1 and joins it with an "&" sign with a reference to Cell2.

Regards,

Marc

Jun 25, 2012 at 11:57 PM
Edited Jun 25, 2012 at 11:58 PM

Cody:

It depends on what you mean.  If you want to have title subgroups inside grade groups, then no, you can't do that.  NodeXL's groups cannot be nested.  (I suspect that's not what you mean.)

But if you want to group by grade/title combinations, that is indeed possible.  Let's say your Vertices worksheet looks like this:

Vertex, Grade, Title
Sam, A, Student
Bill, B, Teacher
Nancy, A, Teacher
John, A, Student

Follow these steps:

    1. Add a column called "Grade + Title" to the right edge of the Vertices worksheet.

    2. Format the column's first data cell (usually in row 3) as General, not Text.  You're going to enter a formula into the column, and formulas can't be Text.

    3. Enter this into the column's first data cell:  =CONCATENATE(Vertices[[#This Row],[Grade]], " ", Vertices[[#This Row],[Title]])

Your Vertices worksheet should now look like this:

Vertex, Grade, Title, Grade + Title
Sam, A, Student, A Student
Bill, B, Teacher, B Teacher
Nancy, A, Teacher, A Teacher
John, A, Student, A Student

Now you can tell NodeXL to group by the vertex attributes in the "Grade + Title" column.  It will put Sam and John in the same group, because they both got As and are both students, while Nancy and Bill will be put in their own groups.

-- Tony

Jun 26, 2012 at 12:02 AM

Marc and I just told you essentially the same thing, although his formula is a bit shorter.  Replacing my formula in step 3 with the following will give the same results:

=Vertices[[#This Row],[Grade]] & " " & Vertices[[#This Row],[Title]]

-- Tony

Jun 26, 2012 at 12:44 AM

Hi Marc and Tony ,

Yes, the concatenate function could give what i needed. However, is there a way to actually automatically name the groups in the group worksheet without having to refer back to the vertices worksheet manually for the group's meaning.

Thank you.

Jun 26, 2012 at 12:48 AM

For example , following Tony's post on the Grade + Title :  A Student , B Teacher , A Teacher , A Student
It will group 2 A Student together .  So on the group worksheet it would appear G1 , G2 , G3 , G4 .
Perhaps, it would be better if G2 could automatically convert to the A Student naming example.

Jun 26, 2012 at 12:58 AM

I think you have an older version of NodeXL.  We made the exact change you're suggesting some time back -- NodeXL now uses the attributes as the group names when you group by vertex attributes that are categories.

You can get the latest version of NodeXL at http://nodexl.codeplex.com/releases.  You do not have to uninstall your older version before installing a newer one.

-- Tony

Jun 26, 2012 at 1:12 AM

Hi Tony ,


Yes, i am still using an older version. Got it ! Thanks very much

cody

Jun 27, 2012 at 12:26 AM

Hi Tony,


I have updated the version of the NodeXL. I have read in the release history that the version now would be able to hide the group. However, i could not find the visibility column in the group worksheet .

Thanks

Cody

Jun 27, 2012 at 12:54 AM
Edited Jun 27, 2012 at 12:56 AM

Cody:

The Visibility column appears on the Groups worksheet only in new NodeXL workbooks that you create with the newer version of NodeXL.  If you open a NodeXL workbook that was created with an older version of NodeXL, there will be no such column on the Groups worksheet.

However, you can manually add a Visibility column to the Groups worksheet in older workbooks and the newer version of NodeXL will use the column.  The three possible values for cells in the column are as follows:

Show
Show the group's vertices and edges when the graph is refreshed.  This is the default.

Skip
Skip the group's vertices and edges.

Hide
Use the group's vertices and edges when laying out the graph, but then hide the group's vertices and edges.

-- Tony