Topology

Identifying Experts

Finding Experts in the Structure of the Twitter7 Following/Follower Network

import networkx as nx
import pylab as plt
import math

EXPERT below

g = nx.read_edgelist("C:\\Users\\laris\\Desktop\\www_twitter7_results\\reply.txt", create_using=nx.DiGraph())
def dict_sort(cent_dict, pos):
    # Create ordered tuple of centrality data
    cent_items=[(b,a) for (a,b) in cent_dict.items()]
    # Sort in descending order
    cent_items.sort()
    cent_items.reverse()
    return tuple(reversed(cent_items[0:pos]))
#nx.draw(g)
#nx.is_connected(g)…