Total Degree Centrality for Directed Network

Aug 2, 2012 at 2:20 PM

Is there a way, or any plans in the future, to include total degree centrality for a directed network? 


I know I could just run centrality as undirected first, followed by directed, but I was wondering if this might be an option in the future. 


Thanks, and keep up the great work!

Aug 2, 2012 at 4:53 PM

We discussed that, but we decided against it because 1) it might be confusing (and the directed vs. undirected degree issue is already confusing); and 2) you can add the column yourself if you need it.

To add a Total Degree Centrality column, do this:

1. Add a new column to the Vertices worksheet.

2. Format the column as General, not Text.

3. Insert this formula into the new column's first data cell.  Excel will automatically copy the formula to the entire column.

    =SUM(Vertices[[#This Row],[In-Degree]]+Vertices[[#This Row],[Out-Degree]])

4. Use NodeXL, Analysis, Graph Metrics to calculate In-Degree and Out-Degree.  The sum of the two will appear in your new column.

-- Tony

Aug 2, 2012 at 9:10 PM

I've tried just adding the in-degree and out-degree together like you suggested, however, if a tie is reciprocal, just adding in and out degree together gives you degree of 2, when the degree is actually 1. 


I can work around it by just getting the network as undirected, but I was just curious if this was something in the works by any chance. 


Thanks again for your help. 

Aug 2, 2012 at 10:01 PM
Edited Aug 2, 2012 at 10:02 PM

That's not what degree is in NodeXL.  We use the definition discussed here:

...and here:

A vertex in a directed graph has no degree; it has an in-degree and out-degree.  If you add them together, you get the number of edges incident to the vertex.

I suspect what you are actually looking for is the number of vertices adjacent to each vertex, which is a different beast entirely.  NodeXL does not calculate that; not for a directed graph, and not for an undirected graph.  Just switching to Undirected will not give you the correct results if your graph happens to have duplicate edges.

We've discussed adding an adjacent vertex metric, but we decided against it for now.  I seem to remember someone having a formula for it.  Do you want me to see if I can dig it out?

-- Tony

Aug 8, 2012 at 12:17 PM



Thanks for your feedback, and you're right, I just had the terms mixed up. No need for the formula, thanks again for your help.