Importing networks
The dataset we will explore in this chapter is fun. It's the Marvel Universe Social Graph dataset constructed by Cesc Rosselló, Ricardo Alberich, and Joe Miro as part of their research on disordered systems and neural networks ( http://bioinfo.uib.es/~joemiro/marvel.html ). They created the network by compiling characters with the comic books in which they appear; as it turns out, the network actually mimics a real-world social network. Since then, there have been many visualizations of, and other mashups using this famous dataset (as well as extensions). In this recipe, we will import the needed data into our Python environment.
Getting ready
Once you have installed the needed libraries from the preceding recipe, you will need to use the dataset provided with the chapter.
How to do it...
Perform the following steps to import the data:
- In order to get this graph into a NetworkX graph representation, iterate over the dataset and add edges (which automatically create the nodes...