Implementation of the “Exploded Network View”, Part II

Yesterday, I introduced a new network visualization technique called the “exploded network view”. Today, I provide a dynamic example of this technique using UbiGraph, and provide the Python code to implement the visualization.

The video to the right uses the exploded view to explore the components of the Gagnon & MacRae prison data set. The video goes through each step in the pseudo-code described yesterday. First, the network is drawn in three-dimensions, with UbiGraph allowing the user to fly through this structure and examine the full structure. Next, hierarchical clustering of geodesic distances is used to create nodal clusters. Before the exploded view is used, however, we must chose a clustering partition. The video, therefore, displays the Krackhardt E/I Ratio plot for each partition, which is used to find good partition candidates. In practice, large jumps in the E/I ratio indicate a quality partition, and the video shows this. After the partition is chosen, the exploded view is implemented and each cluster of nodes is given a unique color.

I hope you find this technique both useful and interesting. If you have any comments, or questions, please feel free to leave me a message.

If you are interested in running this code (duplicated in its entirety after the jump) on your own, you will need UbiGraph (Linux & Mac only) and the following Python packages, all listed in the Python social science must-haves:

Good luck, and now the Python code…


Automatically Generated Related posts:

  1. The “Exploded Network View” in 3D, Part I
  2. UPDATED: Network Decomposition Visualization
  3. Measuring Network Effects with No Network Analysis
  4. How to: Use Python and Social Network Analysis to Find New Twitter Friends
  5. NetworkX and UbiGraph – The Perfect Union

2 comments to Implementation of the “Exploded Network View”, Part II

  • David D.

    Forgive me if my question sounds stupid (I’m not a python coder)

    in the lines:

    if internal_edges.count(i)<1:
    external_edges.append(i)

    does order matter?

    if I have the edge {1,2} in one set and {2,1} in the other would the statements above work?

    thanks

    [Reply]

    Drew Conway Reply:

    In general, for a Python list object the order would not matter for the count() function, as it is simply counting all occurrences of the element inside the parentheses for some list. In this case, since all_edges is assumed to have all edges, and internal_edges is defined from all_edges, the order will match and thus the inversion example you note would not occur.

    [Reply]

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Technorati Profile