Sameer Ahuja
  • Home
  • Blog
  • Playground
    • Visualize This
    • Read My RSS
    • Lifestream
    • Older
  • Contact
    • Calendar
  • Photography
  • Subscribe via RSS

Experiments with publishing application activity

February 10th, 2008  |  Published in PHP, Play, Web 2.0  |  8 Comments

For a couple of weeks now I’ve been monitoring what I do on my Mac using two tracker tools: Wakoopa and RescueTime. Both have unique approaches to the theme of tracking. Wakoopa builds a social network around the applications that you use. It lets you build ‘teams’ of people and see what your friends have been using. The other two significant things that it does are statistical visualizations, and recommendations of apps based on what you’ve been using. So if you’ve been using a lot of TextEdit lately, it might recommend TextMate as a ’similar’ application. This, according to my guesswork, they do by matching application tags.

Wakoopa Recommendations

The other way to do these recommendations could be to match people based on their application sets (or better still, their activity sets. If app = Microsoft Word, then Activity = word processing); and then provide recommendations based on what other people who have similar appication/activity sets are using, that the current user isn’t.

Anyways, Wakoopa does provide a simple API to accessing its data, and that is a great thing to do. That’s something that RescueTime hasn’t done yet, but they promise to do the same soon on their site. RescueTime has a unique approach to this whole domain. They aren’t building a social network (at least till yet), and this is how they track your apps: If you are using a standard application, the RescueTime tracker records its usage as any other tracker. If, however, you are on a browser, the tracker records the website that you’re visiting as an ‘application’, which makes some sense in this era of online applications. You can then go to the website and assign ‘tags’ to applications. These can later be visualized to see how much time, for example, you spend ‘Watching Videos Online’.

Rescue Time Dashboard

So anyways, I’ve been itching to use the incredibly simple to use GChart APIs with an interesting enough data-set, and Wakoopa stats are sortof interesting (at least for me…), so last weekend I cooked up a script to make a pie chart of my recent application usage. Its available here, and at the point of writing this post, this is how my stats looked:

Application usage chart

Which, I suppose, is a pretty reasonable graph. Half of what we do on our computers these days is more or less on the web (50% of which is on YouTube, which is, IMHO, the greatest time sink ever invented). Mail takes about 20%, and the actual work takes the rest. (Source after the jump)

The source code for the vis is pretty simple. All it does is load the XML API URL, parse through to generate a Google Chart compatible format, and call the image URL for Pie Charts:


$request_url = "http://api.wakoopa.com/sameer/most_used.xml";

//App names
$names = "";    
//Usage values
$values = "";
//For calculations
$total = 0;

$ch = curl_init();
$timeout = 5;
curl_setopt($ch, CURLOPT_URL, $request_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$data = curl_exec($ch);
curl_close($ch);

$xml = new SimpleXMLElement($data);

//Computing total
foreach($xml->software as $sw){
   $total += intval($sw->{'active-seconds'});
}
//Computing values in GChart-compatible format. Have a look at this: http://code.google.com/apis/chart/#pie_charts
foreach($xml->software as $sw){
       $names = $names."|".$sw->name;
       $values = $values.",".(round(intval($sw->{'active-seconds'})*100/$total, 1));
    }

//That's it! Load the image.
echo '<br><img src="http://chart.apis.google.com/chart?
cht=p&chco=3587DCFF,99E142FF,993C99FF,90A4E5FF,DAD52EFF,C95854FF,AE4496FF&chd=t:'
.trim($values, ",").'&chs=450x300&chl='.trim($names,"|").'">';

Responses

Feed Trackback Address
  1. AJ says:

    February 12th, 2008 at 2:01 pm (#)

    Cool!

    I was wondering if we can view a whole bunch of such graphs using Wakoopa or ResuceTime so as to create a high-level corporate research analysis tool (say, of company resources).

    Can we have a small application or may be an FF extension to support this?

    It was nice to see a new post again. Looking forward to read more such interesting stuff. Subscribed already. :)

  2. sameer says:

    February 12th, 2008 at 7:16 pm (#)

    Heheh, what makes you think that the corporates don’t already do that?

    Well, Wakoopa provides the user analytics on their website dashboard, so one could view personal stats there. I am interested in building a firefox extension to track web browsing, but that’s for a different reason: Building a recommendations engine over it. I had planned to use AttensionTrust’s toolkit to build a basic recommender engine (Eg, a search for “hard boiled eggs recipe” could pop a ‘recommendation’ in the browser saying something like “You searched for these terms a month back, and this is the site you ended up visiting: URL”, but both my courses are taking 50% of life, assuming that as a graduate student, I have any :)

  3. AJ says:

    February 12th, 2008 at 7:25 pm (#)

    :) Yes, they do use such a thing.

    Wow, you have quite a good thought on that building the recommendation engine. I remember that you had mentioned this long time back (I believe in Bangalore). My question is that would the users have to manually register the “final URL” that they think is worth it?

    Because I personally search something and visit at least 3-4 links on the results page unless I know before hand that my search will return the most desired link at the most desired place.

    P.S. - Example of “Hard Boiled Recipe” was awesome. :)

  4. sameer says:

    February 12th, 2008 at 7:47 pm (#)

    That’s the interesting bit, so generally these search paths go like a tree originating from the search page going into, let’s say, some 3-4 levels deep across 3-4 different paths. The first question is can you find the leaf nodes, which I think you can on the client based on referral information. So you keep building the tree till the new page loaded has any of the current pages in the tree as its referrer.

    You’d probably want such a system to prefer deeper nodes (Just because they might have a higher probability of being ‘the node’ that the user found his information at. It could also be optimized to give lower rankings to pages you frequently visit, just to get rid of the noise.

    The other way, that you mention, is to ask the user to manually “star” the page or annotate a part of it to show the information he was looking for. It works great if the user knows that he’ll need the page again, and if he remembers to do the annotation, both hard things for lazy people like me to do.

    I think that a hybrid approach would be the ideal solution, wherein you have this underlying system that would do its tracking behind the scenes, and have a ‘pseudo’ ranker, such that if you bookmark a page while navigating, its rankings shoot up for that and related ’search paths’.

  5. AJ says:

    February 12th, 2008 at 7:54 pm (#)

    That is ingenious and tiring.

  6. Ankit says:

    February 13th, 2008 at 8:39 am (#)

    Nice post. However, I was getting lost in the comments when i suddenly came across the parts where you talk of searching as in traversing a tree. Now I had data structures last semester, so that sort of kept me going to the end of it:) I believe annotation is not of much use, since if we are anyways going to remember that we will need it often, we would bookmark it anyways. I like to think of a firefox extension that would display in the search page itself the no. of times ( if ever ) you have visited a particular link. And based on that, somehow highlight the ones one has visited more often :)

  7. sameer says:

    February 13th, 2008 at 8:25 pm (#)

    Google search sort-of does that if you have web history enabled. It tells you how many times you’ve visited the page and when was the last time, right there in the search results.

  8. Wakoopa blog » Blog Archive » Get your JS-ON says:

    February 21st, 2008 at 9:35 am (#)

    […] For example, Olivier Duprez publishes his data on his Life 2 Front project and recently Sameer Huja experimented with connecting the Google Chart API to our XML to make some nice custom […]

Leave a Response

Recent Blog Posts

  • Read-Write Culture, Lawrence Lessig, and why he should be in the Congress.
  • Experiments with publishing application activity
  • Information visualization on the web
  • Some updates
  • Dear Wordpress: Why not an XML-RPC for commenting?

Twitter Posts

    Spam Blocked

    193 spam comments
    blocked by
    Akismet


    ©2008 Sameer Ahuja.