Skip to content

Latest commit

 

History

History
113 lines (74 loc) · 4.13 KB

GEPHI_HOWTO.md

File metadata and controls

113 lines (74 loc) · 4.13 KB

How to use Gephi

Gephi is one of the tools to render graphs from the .graphml exported by Meta Metal Mapper. This page gives a short introduction how to massage a graph into something useful.

Preparing a graph

For this example we use Lebanon (country code LB) with its manageable 53 bands (Nov 2020). Call meta_metal_mapper three times with the following parameters:

  1. -i LB
  2. -c LB
  3. -y LB

Open the resulting .graphml in Gephi and make the following changes. They are going to change the node size based on their degree (amount of connections to other nodes). Bands with no connection will be small, the ones with most connections will be larger.

Node Degree

The random layout is not very pretty. Let's apply the ForceAtlas 2 with these settings and hit the Run button.

Node Degree

This leaves us with a graph that might look like the next picture. There's a network of connected bands and a lot of either unconnected or less connected bands.

Middle East unfiltered - Lebanon

Filter unconnected bands

  1. Open Topology from Filters. Drag a Giant Component into Queries located under the Filters.
  2. Hit the play button.

This leaves you with a smaller network of 20 connected bands. Bands which are not connected to the main graph won't be shown.

Middle East filtered - Lebanon

Adding a few metal communities

The graph is a bit thin. Let's add bands from Syria (SY), United Arab Emirates (AE) and Kuwait (KW).

  1. -i SY AE KW
  2. -c SY AE KW
  3. -y ALL or -y LB SY AE KW

Load the new file into Gephi. It looks a bit bland, but we can let Gephi apply some color.

Nodes Colored

Now run the ForceAtlas 2 again.

Middle East unfiltered

Filter countries

If you end up with a large graph and you want to remove nodes you can either make a new export from the database or you can filter by country (found in AttributesEqaual). Simply drag country under your Giant Component.

To display only band nodes from AE and LB, enter "United Arab Emirates|Lebanon" into the text box and check the box Use regex. Don't forget to push the play button.

Filter Countries

You can achieve the reverse by adding a NOT from the Operators. Put it right before the Equal (country). The following snip from the Gephi shows a graph of the middle eastern network without Kuwait and unconnected bands.

Middle East unfiltered

A more comprehensive guide can be explored in the Gephi Tutorials.

Exporting the graph

In the previous sections we only used the preview to look at the graphs. Gephi has built-in ways to export a graph e.g. as a PNG or a PDF. When band names are shown, the PNG has to be quite large. Otherwise it will be very hard to read the smaller labels.

Head over to Preview. Select any of the Presets and experiment with something you like. The standard settings of Black Background work well. Some massaging of the graph is likely to be needed. Hit the Refresh button once and have a look if the labels are readable and don't overlap. Sometimes a graph might look cramped.

Lebanon, no tweaks

Go back to the Overview and select Expansion from the layouts and run it two or three times to expand the graph.

Lebanon expanded

Afterwards I recommend to run Noverlap (to prevent nodes to overlap) and Label Adjust (to adjust labels so that they don't overlap).

Lebanon, overlap fixed

Go back to the preview, refresh to verify that the graph looks ok and then export a PDF and marvel at it in your favourite PDF viewer.

Extra fancy export into a HTML5 webpage: Install SigmaExporter through ToolsPlugins. Trigger the export with FileExportSigma-js template.