Calculates the degree centrality of each node in the network, i.e. the number of each node’s incoming and/or outgoing connections.

mode
string
default: "all"

Which node connections to count. Whether to

  • in: count only a node’s incoming links
  • out: count only a node’s outgoing links
  • all/both count both incoming and outgoing links.

Values must be one of the following:

  • all
  • out
  • in
  • both
directed
boolean

Whether the links are directed or not.

loops
boolean

Whether loops will be counted. Loops are links of nodes to themselves.