Networkx, Graph, Network Analysis, Twitter, Ml So Good.
we transform data into log-log coordinates. We can calculate the power law and show it graphically by first calculating the in- and out-degree frequencies, and thus plotting them: def get_frequencies(degree_dict): degree_freq = {} for node, deg in degree_dict.items(): if deg in degree_freq: