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.
You should now have data ready to export to Google Earth and visualize in real geographic space. Head to your preview screen and select "Default Straight" as the ExportToEarth plugin does not as of yet support curved edges. Then you go to File>Export>Graph File and save it as a KMZ file.