Pajek: A software for large network analysis

Downloading and installing Pajek

Pajek (Slovenian: spider) is a software for large network analysis which is free for non-commercial use and can be downloaded from its authors' site. Once downloaded, double-click the file to install Pajek on your computer. Usually, answering yes to all installation questions results in a working program.

After installation, when Pajek is called by a double click, Pajek presents its Pajek     Window which has a set of menus lined up on the first row:  File   Net   Nets  and so on until  Draw   Macro   Info   Tools . The Pajek Window is identified by the title on the top left window next to the Pajek icon (a spider, of course). The Pajek Window also has a set of objects and icons on the first column downward, namely  Network   Partition   Permutation   Cluster   Hierarchy , and  Vector  at the bottom of the column. Each of these objects has three icons immediately below, namely the yellow Read icon, the white-black Save icon and the white-yellow Edit icons. If you let your mouse cursor rest on one of these yellow Read icons for a second, it will show a description of the icon on a yellow background, such as Read Network or Read Partition.

Pajek window: menu on first row, objects on left column

In this introduction we will be working only with a handful of menu choices, namely  File   Net   Nets   Operation   Partition   Draw  and  Info . Please note the difference between singular Net or Partition and plural Nets or Partitions. They present different menu choices depending on the number of objects to manipulate. We will also be working only on Network and Partition with their icons Read in yellow and Save in white-black. Regarding the last icon, Edit Network, editing of objects in Pajek is not recommended because it is much easier to do editing with an ASCII editor or word processor you are familiar with.

Opening and selecting network

To follow the next discussion, you should have downloaded and installed Pajek following the above description. You should also preferably have prepared a network file or download one network file from the many repositories on the Internet such as de Nooy et al. 2005 data.

Double clicking the Pajek icon opens the Pajek     Window like above. To open a network, click on the Read Network icon which will bring up the Open     window below. Again, you identify the Open     window by its title on the top left. Double click on the icon (on the left) of hawthorne-friend.net to open it. Pajek responds by reporting that it has read the network in a flash (Time spent: 00:00:00). In fact it took less than a second. This kind of information might be useful later when you work on large datasets such as over 3 million patents granted by the United States Patent and Trademark Office which is available from Vlado's site.

Open network in Pajek
-----------------------------------------------------
Reading Network  ---   C:\temp\hawthorne-friend.net
-----------------------------------------------------
 Working...
    29 lines read.
 Time spent:  00:00:00

Close the Report     Window by clicking on the cross (X) at the top right of the window. Again, you identify the report window by its title on the top left which says Report. After a while you may need a short cut to quickly close this Report Window, do so by pressing both Alt+F4 while it is active, that is when its top bar is coloured blue.

At this stage, verify that you have the correct network by making sure that c:\temp\hawthorne-friend.net is the working network on your Pajek     Window. More precisely, hawthorne-friend.net is shown in the network area. Additionally it says that the network has 14 vertices.

A network from the famous Hawthorne effect study (hawthorne-friend.net) is open (Roethlisberger and Dickson 1939)

During an analysis session, you might be working with more than one networks, say hawthorne-friend.net and malaysia.net. You can open more networks following the procedure above. In fact, you might want to try opening a few of the networks in de Nooy et al. 2005 data. Pajek may also need to create a few networks during the course of analysis, for instance during the analysis of network dynamics. In that respect, Pajek has the ability to provide many networks, many partitions, many permutations objects at your disposal at any instance of time. To keep track of which network you are currently working on make sure you select the intended network. You can list what are the available networks by clicking on the triangle on the far right on the network area. You select a network by moving the cursor up and down the list and clicking on a selected network. A similar principle of operations is effective in selecting different objects such as partition as the working object.

Drawing and saving a sociogram

To visualise the sociogram of friendship network in the Hawthorne study, you draw the network by clicking on the  Draw  menu on the first row of Pajek     window, then move down to select  Draw      Control+G  choice. From now on, a shorthand for this sequence is  Draw » Draw .

Menu sequence for drawing sociogram

It should open a Draw window like below with the 14 friends and the friendship relations between them drawn. The title on the top-left says the name of the network drawn 1. c:\temp\hawthorne-friend.net (14)    and there are 14 vertices in all. After a while you might find the shortcut for drawing operation handy, just use Control+G.

Hawthorne friendship sociogram: first drawing

To have a nice looking sociogram, on the Draw window (i.e. the one with the network name as the title of the window) choose  Layout » Energy » Kamada-Kawai » Free . See figure on the left below. The result is a nice layout of sociogram of friendship network. See figure on the right below. Further information about the principles of laying out this sociogram can be found on Kamada and Kawai (1989) and de Nooy et al (forthcoming). There are other alternatives layout algorithms available in Pajek, like the Fruchterman and Rheingold (1991) algorithm, which are also discussed by de Nooy et al (forthcoming) in relation to visualising social networks.

Fruchterman-Rheingold menu sequence Fruchterman-Rheingold free result

Once you have your sociogram, you can save or export it to be included later in your documents using e.g. Microsoft® Word or your favourite TeX™ editor. Pajek can export drawing into many formats, including Encapsulated PostScript (eps), hypertext mark-up language (html) with Scalable Vector Graphics (svg) and Windows bitmap format (bmp). For example, Microsoft® Word 2002 and later, can handle encapsulated postscript files quite easily, so eps format is a safe option. To export it, in Draw window choose  Export » EPS/PS  and Pajek will ask for a file name in a dialog box. Give it a name, e.g. hawthorne.eps and then save it. This file can then be included in your editor or word processing package as usual. Before saving your sociogram, however, you might play around with positioning vertices by dragging them to new positions with your mouse cursor in order to achieve a result pleasing to you.

Export sociogram into Encapsulated PostScript format Export sociogram into eps: dialog box

Pajek is a versatile and powerful program that allows us to visualise and analyse large networks, social or otherwise. Drawings produced with Pajek therefore are not always sociograms because they can be a drawing of relations between patents or papers, for instance. Operations illustrated here are only scratching the surface of this software and although it is not intuitive to use (Huisman and van Duijn, forthcoming), for non-commercial users it is certainly free to use in exploring social networks. Hopefully, this material helps in your exploration.

Back to Introduction to Social Network Analysis Back to top

© G Tampubolon - 17 December 2004