I use both GraphViz and Omni­Graffle to con­struct charts involving rela­tion­ships and pro­cesses.omnig.jpg Over the last few days I was nood­ling my way through a schem­atic of sec­tarian asso­ci­ations in North­ern Ire­land. Try­ing to get the play­ers and organ­iz­a­tions straight was simply impossible for me without some sort of visual aid. I did a quick scan of the usual sus­pects to determ­ine whether any­one already had some­thing that would suit my needs, but only found tex­tual com­pil­a­tions. Although com­pre­hens­ive, these required more than cas­ual scans to get an imme­di­ate sense of who fits where. I put the chart before the horse this time and star­ted draw­ing on a nap­kin. I pre­sup­posed that I would need to visu­ally dis­tin­guish between polit­ical organ­iz­a­tions and para­mil­it­ary ones, and also between religio/political affil­i­ations. The col­ours green and orange sprang to mind as good visual cues ;-) I was able to access the CAIN data­base which provides a superbly author­it­at­ive com­pen­dium of organ­iz­a­tions on on ‘the Troubles’ and polit­ics in North­ern Ire­land from 1968 to the present. Chro­no­logy was also a factor and I had an addi­tional tem­poral dimen­sion to con­sider. The nap­kin was overwhelmed.

In many cases these days when I have a nice tidy little data­set, I like to throw it online at Many Eyes and see how it looks. I have blogged a couple times in the past about Many Eyes and remain a fan. Unfor­tu­nately at times, their tools don’t quite give you what you were look­ing for — although they do often give you a great start­ing point. I did actu­ally throw a sub­set of the data at Many Eyes to see the res­ult. The really use­fult thing about Many Eyes is that I could also take the same data­set and with a couple clicks try visu­al­iz­ing it in dif­fer­ent chart formats, such as a word cloud for example. How­ever, the net­work chart was lim­ited in my judge­ment (and I know they have a very cool visu­al­iz­a­tion com­ing, but it doesn’t seem to have shown yet).

My weapon of choice for free-form digital chart­ing on my own machine is Omni­Graffle. It’s power­ful, intu­it­ive, cre­ates instantly aes­thet­ic­ally pleas­ing charts and is won­der­fully extens­ible. There is an ever grow­ing lib­rary of user con­trib­uted tem­plates and chart­ing pro­cesses avail­able as plug-ins. Per­haps most import­antly, Omni­Graffle plays well with oth­ers. It can import graphic and text as inputs and sim­il­arly out­put a vari­ety of formats. Omnig­roup as well offer edu­ca­tional pri­cing on their products. How­ever, as I laid out the map, I was in manual mode and although aided by the visual, the grow­ing com­plex­ity of the chart sug­ges­ted that my free-form approach had really skipped the pos­sib­il­ity that all this won­der­ful graph the­ory that I am vaguely aware of might actu­ally have a role to play.

So, I took a big step back and star­ted map­ping the rela­tion­ships tex­tu­ally before I went too far. I will note at this stage that Bill Turkel pub­lished a won­der­ful post last week on how he used sim­ilar tools to visual the emer­gence of a stra­tegic know­ledge cluster — a great real-world applic­a­tion for rela­tion­ship map­ping. His post builds a won­der­ful case study of an expand­ing net­work and how graph the­ory can be applied to appre­ci­ate dynam­ics that might be sali­ent to actual par­ti­cipants. So how do you star this process?

I wanted to have raw mater­i­als that I could repur­pose eas­ily to use with mul­tiple tools and also be able to mas­sage as the data itself sug­ges­ted avenue for fur­ther explor­a­tion Work­ing in a simple text editor, I cre­ated a file using the DOT lan­guage. There are a num­ber of ‘stand­ards’ for rep­res­ent­a­tion of rela­tion­ships between data, but I find DOT to be rich and as intu­it­ive as a high level encod­ing ‘lan­guage’ might be. DOT sym­bol­izes a rela­tion­ship as simply as A -> B and then allows you to ela­bour­ate on the rela­tion­ship and the way in which it is presen­ted. I didn’t want to code in the present­a­tion, but instead, just to have a simple file defin­ing all the par­ent -> child rela­tion­ships that needed to be mapped. Social Net­work con­ven­tions term the entit­ies being related as ‘nodes’ and the rela­tion­ship the ‘edge’. The res­ult­ing list in DOT looked some­thing like this:

digraph unix {
node [shape=rectangle, color=orange, style=filled];
"Ulster Unionist Party (UUP) 1921-1972" -> "Unionist Party of Northern Ireland (UPNI) 1974 - 1981" ;
"Ulster Unionist Party (UUP) 1921-1972" -> "Alliance Party of Northern Ireland (APNI) 1974 - 1981";
"Ulster Unionist Party (UUP) 1921-1972" -> "Protestant Unionist Party (PUP) 1960s - 1971" ;
"Ulster Volunteer Force (UVF) 1966 -" -> "Shankhill Defense Association (SDA) 1969 -" ;
"Ulster Loyalist Central Co-ordinating Committee (1974 -)" -> "Ulster Special Constabulary Association (USCA)" ;
"Ulster Loyalist Central Co-ordinating Committee (1974 -)" -> "Ulster Volunteer Service Corps (UVSC)" ;
}

A simple start and as you can see, DOT is not too com­plex. You put your data between two cur­lies, keep node labels between quotes and end each line with semi-colon. I even­tu­ally added all the organ­iz­a­tions that I wanted to con­nect and saved it as a .dot file.

This file format is the stand­ard input for a product called Graphviz. It was developed in the AT&T research labs and is avail­able as open source. If your rela­tion­ships have all been coded cor­rectly, you can simply open the .dot in Graphviz and it will imme­di­ately render the web of asso­ci­ations that you have cre­ated as a chart. Most of the time, the chart will be just what you need and con­cen­tra­tion of rela­tion­ships, or key nodes in the web will be imme­di­ately appar­ent. Depend­ing on the ver­sion of Graphviz that you are using, you will be able to choose the way in which the pro­gramme should inter­pret your rela­tion­ships and re-render it as you instruct. The default view of this data­set for example looks like this:


chart1.jpg

It is actu­ally very close to what I wanted. How­ever, the beauty of a pro­gramme such as Graphviz is that I can change the chart from hier­arch­ical to cir­cu­lar or to a radial arrange­ment with a click and see what hap­pens. A radial chart of the same info looks like this:


chart2.jpg

Which is actu­ally rather cool as you can imme­di­ately see appar­ent clus­ter­ing of groups and this is the primary reason that auto­mated rela­tion­ship visu­al­isa­tion tools are useful.

As I men­tioned, in most cases you’ll be happy very quickly with what you need from Graphviz and it has the huge bonus of being free. Unfor­tu­nately, as a graphic editor, its is less power­ful than other ded­ic­ated pro­grammes out there. It is also very focussed on demon­strat­ing rela­tion­ships for your own ana­lysis as opposed to mak­ing them rav­ish­ingly pretty for fur­ther presentation.

And so we come back to Omni­Graffle. As I had simply star­ted draw­ing objects and not approached the ori­ginal task by defin­ing my data as con­sist­ing of a series of rela­tion­ships, I was lim­ited to the haphaz­ard con­struc­tion of objects I drew. Now that I was armed with a doc­u­mented list of rela­tion­ships con­form­ing to a stand­ard for inter­change, I had a greatly enhanced the range of present­a­tion options open to me. Omni­graffle reads .dot files nat­ively, so I was able to save the few changes I made in Graphviz as a .dot file and read this file dir­ectly into Omni­graffle. In OG, I am able to select one of a series of nodes and can rad­ic­ally alter their appear­ance. I am also able to drag nodes about, all the while main­tain­ing their rela­tion­ships. I can oper­ate on nodes and edges inde­pend­ently and most import­ant to my needs, be able do ll this while retain­ing the abil­ity to apply auto­matic trans­form­a­tions to the chart as a whole for ana­lyt­ical pur­poses. Thus, I was able to embel­lish the chart I was inter­ested in hav­ing by adding addi­tional sum­mary graph­ics such as cre­at­ing a box around sus­pec­ted related groups of organ­iz­a­tions that aren’t eas­ily rep­res­en­ted in stand­ard­ized graph the­ory. The res­ult­ing chart looks like this:


chart3.jpg

If you click on the small graphic here, it will link to the chart as a PDF so you can actu­ally read the names. It’s still a work in pro­cess, but I am now able to start to make some sense of all the dif­fer­ent organ­iz­a­tions which are men­tioned in the text I am work­ing through. In a per­fect world, this would actu­ally be applic­able to my dis­ser­ta­tion work as well, as opposed to squir­rel­ing away a few pre­cious hours of time I should be spend­ing on writ­ing about Cana­dian tavernkeepers ;-)

Hope­fully this provides a little bit of insight a to what tools are eas­ily access­ible to take rela­tion­ships and rep­res­ent them visu­ally — tools which don’t demand that you learn the finer points of graph the­ory, but do in fact allow you lever­age them to appre­ci­ate the intric­a­cies of large social networks.