July 2016
Beginner to intermediate
462 pages
9h 14m
English
Betweenness centrality is a type of centrality similar to closeness centrality (refer to the Calculating social network closeness centrality recipe). This metric is given by the following equation:

It is the total of the fraction of all possible pairs of shortest paths that go through a node.
Install NetworkX with instructions from the Introduction section.
The script is in the between_centrality.ipynb file in this book's code bundle:
import networkx as nx import dautil as dl import pandas as pd
fb_file = dl.data.SPANFB().load() ...
Read now
Unlock full access