9.3. Using gephiΒΆ

For a very nice general purpose tutorial on how to use Gephi, look at this page on the :samp:gephi.org` website.

The following steps were followed to get the color image of political blog data in Section Social Networks:

  1. Start up Gelphi. Load polblogs.gml using File > Open. A graph is displayed, but the only constraint on the layout is that the nodes fit within a square. Otherwise the node positions are random.
  2. In the layout window, under Choose algorithm, choose Fruchterman-Reingold, a classic Force-spring algorithm, and click Run (there are parameters you could tweak, but you are using the default settings). Let it run for a while until you get the basic barbell shape. Then click Stop. Save an image by choosing (under the File Menu) Export > SVG/PDG/PNG File.
  3. In the Filters subwindow, select Attributes > Partition > Value (Node), then double click on Value. A little queries window should appear, informing you of the percentages for the 2 values (1 and 0) which should both be close to 50%. These two values stand for liberal and conservative blogs (dont know which is which). Both values are grayed out. Select both. Color boxes should appear next to each value. You have now defined a partioning of the graph nodes into two groups.
  4. Go over to the Partition subwindow and select the Nodes Tab. If the words “Choose a partition parameter” appear at the top of the long drop menu, click on it, otherwise click on the little square with the cycling arrows and those words should appear. Now pull down the “choose a partition” menu and choose the Partition Parameter “value”. Color boxes for each of the two values should appear. Then click Apply. This should add different colors to the nodes with value 1 and value 0. Before clicking apply, you can tweak the color choices a bit by clicking on the color box near each value.

Note

It’s actually much more dramatic if you apply colors first and then run the algorithm, but this is how I got the images above.