The degree centrality of a graph vertex in a simple graph is its vertex degree. In a directed graph, separate in-degree and out-degree centralities may be considered.
Degree centrality is one of the most direct measures of local prominence, counting immediate graph neighbors rather than longer-range paths through the network. It is used for local popularity or activity in social networks and, in directed networks, to distinguish vertices receiving many ties from vertices sending many ties; similar in/out-degree distinctions arise in directed food-chain and other biological networks. It is therefore a local measure, in contrast to global path-based measures such as betweenness centrality and closeness centrality.
Degree centrality is implemented in the Wolfram Language as DegreeCentrality[g], and precomputed values for many named graphs can be obtained using GraphData[graph, "DegreeCentralities"].