Network centrality demo

Interactive d3 visual demonstration of network centrality

Most Central Least Central

Centrality type: Degree Closeness Betweenness Eigenvector Download network: JSON export

Build up a network by dragging from an existing node. This will add a node, or connect existing nodes (if you release the drag over another existing node). Clicking on a node or link will select or deselect it. Press delete or backspace to remove the selected node or link (note: if you separate the network into multiple components, centrality will no longer be updated). You can pan by dragging the background, and zoom using the scroll wheel. Toggle the type of centrality displayed using the button below the frame.

Networks are composed of two things: nodes and edges. In a social network, the nodes are typically people and the edges are the relationships (e.g. family, friendship, acquaintanceship) that connect people. Some nodes in the network are more "central" than others. However, there are a number of different ways of to be central to a network. The extent to which these different centrality measures are correlated depends on the shape of the network in question. The interactive demo above illustrates four types of centrality: degree, closeness, betweenness, and eigenvector. You can read more about each of them here or see below for a précis.

Degree Centrality: simply the number of connections possessed by each node. Analogous to a person's raw popularity in a human social network.

simply the number of connections possessed by each node. Analogous to a person's raw popularity in a human social network. Closeness Centrality: distance between nodes is defined by the shortest path between them (in terms of number of discrete links). The closeness centrality of a node is equal to 1/(sum of distances to all other nodes).

distance between nodes is defined by the shortest path between them (in terms of number of discrete links). The closeness centrality of a node is equal to 1/(sum of distances to all other nodes). Betweenness Centrality: is equal to the proportion of all shortest paths between nodes that pass through a particular node. Can be a valuable property in human social networks because people can leverage their connection to different groups a variety of ways.

is equal to the proportion of all shortest paths between nodes that pass through a particular node. Can be a valuable property in human social networks because people can leverage their connection to different groups a variety of ways. Eigenvector Centrality: is a bit more complicated to compute (see link above), but is based on the intuition that an central node is one that is connected to other central nodes. Closely related to algorithms used by Google and others to sort search results. This measure may not work for very small networks, so try building up a reasonably sized network before clicking this button.

Additionally, three global statistics about the network you have created are shown in the top left hand corner of the chart:

Average clustering: the clustering coefficient of an individual node is equal to the proportion of possible triangle through that node that actually exist (where a triangle is defined by three mutually linked nodes). Human social networks demonstrate high clustering since, as a rule, one's friends are more likely to be friends with each other than with randomly chosen person.

the clustering coefficient of an individual node is equal to the proportion of possible triangle through that node that actually exist (where a triangle is defined by three mutually linked nodes). Human social networks demonstrate high clustering since, as a rule, one's friends are more likely to be friends with each other than with randomly chosen person. Transitivity: the proportion of all possible triangles between nodes that are actually present. Closely related to clustering, for obvious reasons.

the proportion of all possible triangles between nodes that are actually present. Closely related to clustering, for obvious reasons. Density: the proportion of all possible links that are actually present. Human social networks tend to exhibit quite low density because of practical limits on the number of people any one person can know or befriend.

The demo was built with d3.js. The network editor was based on this example. The closeness and betweenness centrality calculations were conducted using JSNetworkX.