Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Next, you'll want to go to the right hand pane of the screen under Statistics>Network Overview. Here are various algorithms you can run on your data to make more sense out of them. The first one we'll want is to run "modularity." This algorithmically detects communities in your data. For your facebook friends, you might have a community of family: ie. various family members who are all friends with each other but aren't connected to your other friends. After you run the modularity algorithm, head over to the upper left hand corner of your graph and select partition. Hit the refresh button on the side of the dropdown menu and then, in the dropdown menu select "Modularity Class" and click "Apply." Your graph should now be color coded according to the various communities within your Facebook friends: ie. College friends might be red, family might be blue. etc. 

The next helpful algorithm you will want to run is "Average Degree." This measures, on average, how many connections does a node in your network have? After you run it, in the pop up screen you will see all of your nodes and their various number of connections. Next you should go back to the upper left corner and click on "Ranking." Immediately under "Ranking," click on the half red, half white diamond and then proceed to select "In Degree" or "Out Degree" on the dropdown menu below (because Facebook is an undirected network, it doesn't matter if you choose in or out degree) and click "Apply." Now the nodes on the graph should be sized according to the number of connections they have: ie. the friend of yours that has the most friends in common with you, will be the largest node.

Lastly, in the main graph overview window, go to the bottom click the capital "T" icon. Now, when you hover over your graph, the names of your friends will be displaced over their corresponding nodes.

To share your graph, go to the Preview tab and play with the various layouts it allows you. I prefer "Default curved" for edges and nodes. When you're ready, hit the "export SVG/PDF/PNG" button to create an exportable file. We will cover how to share your graphs interactively online in a later section.

Building Data Sets

Basic data sets: when you're first using Gephi, it's helpful to start small, ie a data set that does not have much in the way of extra attributes on your nodes or edges. A simple excel spread sheet with two columns, representing the connections you want to graph can be helpful. To import this, save your excel as a CSV file and then proceed to File>Import Spigot and select "Data Importer." Proceed through the walk through and eventually you will get to a screen that says "Select Agents" and you should identify which columns in your excel sheet you want to graph the connections between. The rest is fairly straightforward. On the "Options" page you will want to check the box "create links between X and Y" or whatever the categories you are connecting are. And finally, after you have clicked "Finish" make sure to un-check the "Create missing nodes" box and select whether or not your network is directed or undirected.

Complex Data Sets: As I'm still figuring much of this out myself as well, this section will continue to be updated as I expand my own Gephi skills.

First things first, there are a number of very useful plugins that I've found helpful. Go to Tools>Plugins to browse and download. The one's I've found most useful and will reference in this tutorial are: GeoLayout, GeoTools, ExportToEarth, Force Atlas 3D, and SigmaExporter.

GeoCoding Data

Importing data to be visualized as a network and overalyed onto a map can be tricky, especially because it is a substantially different method than first covered.

When setting up your data, the first thing you need to do is create a spreadsheet that is your for your "Nodes." For this example, we'll use data collected from the Transatlantic Slave Voyages Database between 1789-1801. Your first column should be labeled "ID" and should contain the names of ALL of your nodes. For the data set in question, our nodes are the places slaves were picked up at, and the places where they were delivered. Ultimately we will want to create a directed network showing the movement of enslaved humans from where they began to the place the voyage ended, but for now, it's important that we list every node (regardless of whether it was a starting point or an end point) in the ID column. The next two columns should be the Latitude and Longitude of each individual node. Once this is completed, go into Gephi and head to the middle tab called "Data Laboratory." In the top left hand corner of your workspace, make sure the "nodes" tab is selected and then move to your right and click "Import Spreadsheet." Find your "nodes" CSV file and upload it. Make sure that you are uploading it as a "nodes table" and not an "edge table," and click Finish. Once your data is in Gephi, you will probably also want to fill in the "Label" column of the Data Laboratory with the names of your places. To do this, simply go to the bottom of the page, select "Copy Data to other Column" and select your "ID" column then select the label column in the pop up box.

Next, you will need to create your edges spreadsheet. The first column of this spreadsheet should be exactly the same as for your nodes sheet. Title the column "ID" and have the complete list of nodes. Then, since we are building a directed graph, make two columns titled "Source" and "Target" (if you are building an undirected graph, the titles aren't necessary). Our "Source" column will be filled with all of the original departure locations of slaves and the "Target" column will be of the corresponding final destinations. Once you've finished your spreadsheet go back to the upper left corner and select edges (your data laboratory should go blank at this point because you haven't yet uploaded any edges) and again select import spreadsheet and import your edges file.