Forum OpenACS Development: Social Network Analysis with XoWiki

Request notifications

Posted by Gustaf Neumann on
Dear community,

The current version of XoWiki supports additional web 2.0
functionality to provide improved group awareness. The new functionality
comprises of two parts:

  1. Social Network Analysis:

    XoWiki is now capable to analyze the collaboration structures of
    of an XoWiki instance. The basic assumption is that two people
    work together, when they edit the same content item. The more frequent people
    edit the same item, the stronger they work together.

    Based on this assumption, XoWiki computes two different graphs

    • The collaboration network of a single user:

      This graph displays the structure with which other users a certain user works
      together (which other users have contributed to the items, the
      certain user has contributed to). This is a personal contribution
      point of view.

      The following page shows my collaboration graph on

    • The recent activity graph:

      The activity graph shows recent changes in an XoWiki instance and
      computes the teams working on recent items. This view takes the
      n most recent contributions and computes the collaboration structure
      in this network.

      The following page displays the recent activity graph of the xowiki instance at

    The graphs are computed in JavaScript and displayed by a an
    improved version of
    (MIT style license) which is using the canvas element
    ( I have
    fixed some placement problems and improved configurability by
    being able to provide the weight and width of edges.

    The canvas widget can be used in theory on the Internet explorer
    with a Google-contributed emulation of the canvas widget (Apache
    license). However, while i was able to see the edges in simple
    configuration on IE as well, it refuses to draw edges in the
    actual implementation. It was already quite nasty to get the
    initialization working in the right order with the YAHOO event
    library, but this problem should be fixed by now. I would
    appreciate some help from a person experienced with JavaScript and
    IE to fix this issue.

  2. Time-line analysis:

    The contribution display of a user gives in addition to the
    collaboration structure a history of the contributions of this
    user. These contributions are displayed with the Ajax
    time-line widget from the SIMILE project: (distributed under a BSD style license)

The mentioned JavaScript libraries are included in the XoWiki package
in CVS head. I will summarize the recent changes in XoWiki in a separate
posting. I'll try to provide a more detailed description on the forthcoming
OpenACS and DotLRN conference in Vienna (

As for all my other xowiki contributions, my work is available under a MIT style license (like XOTcl).

Gustaf Neumann

Posted by Tom Jackson on
Shouldn't users be able to opt-in/out of this type of public analysis? Fortunately I don't collaborate with anyone according to your chart, so it appears to be pretty accurate.

This somewhat reminds me of getting an email with a huge CC list attached.

Posted by Claudio Pasolini on
Are there any prerequisites to get the activty and collaboration graph working?

I'm trying with the latest xowiki from head, but the collaboration graph is empty and the activity graph simply redisplay the command {{activity-graph}}.

I noticed that the needed collab-graph.js file is not included.

Posted by Gustaf Neumann on
The collaboration graph shows per default the the collaboration of the current user. That might be empty. The activity-graph shows the overall activities in a certain time window. That might be as well empty. Check the collaboration graphs on, it runs more or less the newest version of xowiki.

concering the missing resolving of the {{activity-graph}}: in which kind of page are you including this includelet? Is the HTML clean (e.g. no spans etc. between the braces).

Posted by Claudio Pasolini on
Thank you Gustaf,

trying various includelets I copied and pasted the commands and perhaps something was wrong: now I have polished the page and the commands are resolved, but the activity and the collaboration graph are still empty.

The xowiki instance contains a few pages and files and a couple of pages has been edited by different users just to be able to see their collaboration graph.

These are the commands I used:

Activity graph: {{activity-graph}}
Collaboration graph: {{collab-graph}}

and the following is the output:

Activity graph:

Collaborations in last 46 activities by 2 Users in this wiki

... blank space ...

Guest Guest (4)
Claudio Pasolini (42)

Collaboration graph:

Collaboration Graph for Claudio Pasolini in this wiki(42 contributions)

... blank space ...

Guest Guest (4)
Claudio Pasolini (42)

I'm using a fresh OpenACS (without dotlrn) instance from Head and there aren't any errors in the error.log.

I had to add the xowiki.css to the ThemeCSS parameter of acs-subsite otherwise it would not be loaded and so I wonder if some other needed file is missing.

Posted by Claudio Pasolini on
I forgot to mention that I was experimenting the new layout-manager and that the xowiki instance was mounted under a layout managed subsite.

Xowiki sets correctly the head property, but the tabbed-master.adp of the layout-managed-subsite didn't pass the property on to the plain-master.adp of openacs-default-theme and so some .css and .js were missing.

Now all the needed files are there and the activity graph is rendered as expected, but the collaboration graph is still empty.

Posted by Gustaf Neumann on
xowiki is designed to work with 5.4, therefore it depends currently on the backwards-compatibility of the master templates. The master templates was my suspicion when i read your posting, but i had the impression that the existing releases of dotlrn are still backwards compatible. i have not had the time to figure out what the new layout manager does, and i am very short on time to install various configurations until at least may 11th.

What do you mean by empty collaboration graph: I assume, you have still the situation:

Collaboration Graph for Claudio Pasolini in this wiki(42 contributions)
... blank space ...
Guest Guest (4)
Claudio Pasolini (42)
Are there collaborations between Guest and Claudio? In other words, are there pages, to which both Guest and Claudio have contributed to?

-gustaf neumann

Posted by Claudio Pasolini on
Yes, there are some pages edited both by me and by Guest.

Wanting to be sure I added a ns_log notice to the body of the query of the includelet and actually there are some items related to two different users.

The following is the specific javascript generated by the xowiki page:

function draw() {
if (typeof(G_vmlCanvasManager) == "object") {

var g = new Graph();
g.addEdge($('631'), $('1470'), 41, 0, 5.0);

var layouter = new Graph.Layout.Spring(g);

// IE does not pick up the canvas width or height

var renderer = new Graph.Renderer.Basic($('collab'), g);
renderer.radius = 5;
YAHOO.util.Event.addListener(window, 'load', draw);
// YAHOO.util.Event.onContentReady('collab', draw);

The same context works as expected on oacs-5-4.

Posted by Gustaf Neumann on
The "collaboration" is a single edge.

You are sure, you see no javascript error (e.g. with firebug in firefox)? You are sure, this is not a browser issue? If the answer to the above questions is "no js error", "works with oacs-5-4 in the same browser", i would add an "alert('draw');" to the begin of the draw function and check, whether this is called... My suspicion is that there is still something wrong with the master-templates on your site.

Posted by Claudio Pasolini on
There are no javascript error.

The draw function is executed (alert box is shown).

The following are the data passed to the graphHTML proc:

nodes=1470 {Guest Guest (6)} 631 {Claudio Pasolini (44)}
edges={631,1470 41 4.1}

Posted by Gustaf Neumann on
Claudio, i don't see anything wrong. my guess is that you see the same page content in your working oacs-5-4 version. The collaboration graph code is unchanged since at least 2007. Check the differences in the HTML page of your oacs-5-4 and oacs-5-5 version.