Social network analysis using networkx