Analyzing a social network with NetworkX