[Recap: There’s tons of software out there to help you with your calculations, correlations, transformations, permutations, visualizations, … (here we go with the –ations again! Seriously! Maybe I should make a network out of them). There are all-rounders, like UCINET, some focus more on the numbers (such as R), others (Gephi for example – this post is exactly about that: a Gephi Tutorial) are geared toward those who like fancy spaghetti monsters (guess who?!). If you’re working with really large, or even HUGE data, Pajek’s your cup of tea, although it works just as well for small networks. There’s no such thing as “the best” program to work with, although everyone probably has a favorite. Gephi is our top choice, not just because of the fancy schmancy visuals, but also because it’s very user-friendly. When it comes to metrics, however, it’s pretty limited. For those, I turn to UCINET, while Silke gets her kicks in R. Why? No idea. The fact that she took the introduction course to SNA & R and I the equivalent for UCINET at last year’s Sunbelt in Hamburg has nothing to do with this of course.
Anywho, over the next couple of posts we’ll let you know what we think of some of the major software programs, with tips ‘n tricks to help you out. If you have any questions, Google it, for cryin’ out loud, that brain of yours is there for a reason! Just kidding, we’re happy to help if we can. Not. No really, fire away… we dare you…]
Gephi Tutorial: downloading (MacOs & Windows)
Have you noticed our AWESOME (yeah, we use that word a lot. Go see the new Lego movie, and you’ll know why) –old– blog and twitter background?? That’s what you get when you play with Gephi. And best of all: it’s free!!
For those of you working with Mac: Gephi has some trouble with the new OS X Mavericks, but this can easily be solved by downloading the appropriate Java-plugin here.
To be fair, despite the amazing graphics, Gephi only performs some pretty basic calculations compared to UCINET and R. This includes standard SNA properties such as betweenness and closeness centrality, density, network diameter, average degree and the like. But for us rookies, it’s got pretty much all that we need, and if you want that little bit extra, you can always turn to UCINET.
You’re always favoring UCINET, that’s like, so totally not fair! (And stop doing that, I do not talk like that! Give me that keyboard…)
Gephi Tutorial: Data Preparation Nodelist
Anywho, to get started, all you need is your data in, yup, you got it, an Excel file in csv format. Actually, you need two files for Gephi: a nodelist and an edgelist. Your nodelist lists all the nodes you want to include in your graph (duh), and, optionally, the different attributes you want to include.
This is an example taken from our database Trismegistos (I wish we could get, like, a dollar for every time we mention it, I mean, we’re doing loads of advertising here. Or a cupcake or an Oreo brownie. Or a raise each time we hit another 1,000 page views. We should seriously start negotiating with our boss). The first and second columns include the number each individual is attributed in the PERSON database. Don’t ask why they have to be entered twice, that’s just the way it is. And it’s VERY important to get your column headings right, so ‘Id’ and ‘Nodes’, with capitals! Otherwise Gephi won’t recognize them and your import will be a total mess. We use numbers to identify individuals because this way we’re sure that everyone has a unique signifier. In ancient Egypt a lot of people tended to have the same name, so it would be difficult to keep them apart otherwise. But since names are more significant than numbers when interpreting your data, we load them in as attributes in the third column, headed ‘Label’. And then you can add all the info you want! Our fourth column includes the linguistic origin of the name in question, so Apollonios is Greek, Harpaesis is Egyptian, and so on. You can add a person’s gender, age, nationality, shoe size, religion, favorite ice cream flavor, first date, whatever!
Gephi Tutorial: Import Your Nodelist
In Gephi, just go to the ‘Data Laboratory’ tab at the top, then click on ‘import spreadsheet’, make sure ‘nodes table’ is selected and browse your computer till you find the file you need. As a separator, you have to chose either ‘comma’ or ‘semicolon’; you’ll know which one when your data is displayed neatly in columns in the small preview screen. Click next and make sure all the columns you want to import are selected (uncheck ‘force nodes to be created as new ones’, we’ve only had trouble with that one), and presto! You’ve got a Gephi nodelist!
Gephi Tutorial: Edgelist
Now, for your edgelist you have to go through more or less the same process, only this time you’ll be importing the relations between the nodes. This is what our edgelist looks like (to the left to the left, everybody look to the left).
So your first column (‘Source’) includes a node number (or name), and so does the second (‘Target’). In our example, this means that the soure and target are related. So basically you’re telling Gephi where to draw the lines between the nodes. If a node has multiple edges, you enter each relation in a new row. In our case 2555 is connected to both 1718 and 2770, so this is entered separately. Column three includes the weight of the tie: this is simply 1 here, because you can’t be related to your own kid more than once. Unless incest is involved, but fortunately we haven’t found any Fritzls in our papyri yet. The last column then tells Gephi if the ties are directed or not: in this case they are, in the direction father/mother àson/daughter.
Importing it works the same way as for the nodelist, except that you select ‘edges table’ of course.
And then you can start tweaking! In the overview tab, you can calculate the statistics (on the right). You can then load them into the ‘ranking’ section on the left, where you can color or size your nodes according to their degree, betweenness, … Or in the ‘partition’ section you can load in the node attributes and color them according to whatever you put in your nodelist. Here are some examples of networks we’ve designed so far:
Some will say you shouldn’t rely to much on your network graph, and although we agree that visualizations can be manipulated and should be approached with caution, it doesn’t hurt to present an amazingly colorful spaghetti monster from time to time, if only to see your audience’s jealously jaw-dropping faces. And if your career in academia should fail, you can always turn to the art scene and try to sell off your creations as structural minimalism (or whatever other postmodern style floats your boat) for bucketloads of money.
Now that’s all for this Gephi tutorial today folks! (Awwwww)
Since Easter vacation is kicking in here next week, and Silke needs some time to get settled in London, we’ll be taking a short break. But don’t despair! We’ll be back by the end of April with more amazing historical and SNA’ical thingamajigs and all the lewd photographs and jiggling GIFs your spaghetti-o-loving hearts desire and a more advanced Gephi tutorial!
Have a good one!
Silke & Yanne