Graph Data Science

degree centrality

A score for each node equal to its number of outgoing relationships.

Example

Ava follows three people. Two people follow Cleo, who follows nobody.

cypher
CALL gds.degree.stream('people')
YIELD nodeId, score
RETURN gds.util.asNode(nodeId).name AS person, score
ORDER BY score DESC

Ava scores 3 and Ben 1. Cleo scores 0, even though two of the four relationships arrive there, because a relationship arriving at a node is not counted. Passing orientation: 'REVERSE' to the algorithm counts those instead, and scores Cleo 2.

Lessons that use this term

The lesson and course links below open in a new tab.

No published lesson uses this term yet.

All glossary terms