Rediscovering Playlists…

Yesterday, I had a quick peek at the beta version of SocialLearn (currently open to OU staff, at least…). A key feature of the site are “learning paths”, ordered sets of annotated resources with associated progress status indicators:

I haven’t yet had a proper play with the site yet, so a will hold off a review of the site just for now, but my first glimpse reaction to that feature was: “isn’t that what H2O Playlists did?”

(I thought I must have posted some sort of review of H20 Playlists, “shared list[s] of readings and other content about a topic of intellectual interest”, but it seems I only made passing mention of them. However, I do remember creating several H2O playlists as a way of curating links associated with several presentations I gave when I was trying to advocate the use of social bookmarking in education. (For a review of H20 Playlists posted elsewhere around the same time, see More on H20 Playlist as a Social Bookmarking Tool for Business.)

H2O Playlists

Hmmm.. it seems I misremembered: you couldn’t check off progress on the playlist items, though you could save items off one list onto your own playlist, and you could also discover “related lists” that shared some of the same items.

Also yesterday, I came across the BBC Food Recipe Binder site:

BBC Food Recipe Binder

This site lets you save, and annotate, recipes on the BBC Food site to a personal “Recipe Binder” page from an on-page call to action button.

BBC Food - Recipe Binder

(Okay, so the Recipe Binder isn’t a playlist, but it is an example of embedded bookmarking/personal curation of web resources…)

And then, today, I fire up my feeds to see all sorts of chatter about the delicious website redesign, a key feature of which appears to be… stacks (aka playlists:

The mechanics for putting together the playlists still seem a bit clunky (do I really need to add three links to create a new playlist?) but I guess it’s still early days… Anyway, here’s my first playlist stack: Crafty Stats…

Suddenly, it seems like 2005 again…

Tags Associated With Other Tags on Delicious Bookmarked Resources

If you’re using a particular tag to aggregate content around a particular course or event, what do the other tags used to bookmark those resource tell you about that course or event?

In a series of recent posts, I’ve started exploring again some of the structure inherent in socially bookmarked and tagged resource collections (Visualising Delicious Tag Communities Using Gephi, Social Networks on Delicious, Dominant Tags in My Delicious Network). In this post, I’m going to look at the tags that co-occur with a particular tag that may be used to bookmark resources relating to an event or course, for example.

Here are a few examples, starting with cck11, using the most recent bookmarks tagged with ‘cck11’:

The nodes are sized according to degree; the edges represent that the two tags were both applied by an individual user person to the same resource (so if three (N) tags were applied to a resource (A, B, C), there are N!/(K!(N-K)!) pairwise (K=2) combinations (AB, AC, BC; that is, three combinations in this case.).

Here are the tags for lak11 – can you tell what this online course is about from them?

Finally, here are tags for the OU course T151; again, can you tell what the course is most likely to be about?

Here’s the Python code I used to generate the gdf network definition files used to generate the diagrams shown above in Gephi:

import simplejson, urllib

def getDeliciousTagURL(tag,typ='json', num=100):
  #need to add a pager to get data when more than 1 page
  return "http://feeds.delicious.com/v2/json/tag/"+tag+"?count=100"

def getDeliciousTaggedURLTagCombos(tag):
  durl=getDeliciousTagURL(tag)
  data = simplejson.load(urllib.urlopen(durl))
  uniqTags=[]
  tagCombos=[]
  for i in data:
    tags=i['t']
    for t in tags:
      if t not in uniqTags:
        uniqTags.append(t)
    if len(tags)>1:
      for i,j in combinations(tags,2):
        print i,j
        tagCombos.append((i,j))
  f=openTimestampedFile('delicious-tagCombos',tag+'.gdf')
  header='nodedef> name VARCHAR,label VARCHAR, type VARCHAR'
  f.write(header+'\n')
  for t in uniqTags:
    f.write(t+','+t+',tag\n')
  f.write('edgedef> tag1 VARCHAR,tag2 VARCHAR\n')
  for i,j in tagCombos:
      f.write(i+','+j+'\n')
  f.close()

def combinations(iterable, r):
    # combinations('ABCD', 2) --> AB AC AD BC BD CD
    # combinations(range(4), 3) --> 012 013 023 123
    pool = tuple(iterable)
    n = len(pool)
    if r > n:
        return
    indices = range(r)
    yield tuple(pool[i] for i in indices)
    while True:
        for i in reversed(range(r)):
            if indices[i] != i + n - r:
                break
        else:
            return
        indices[i] += 1
        for j in range(i+1, r):
            indices[j] = indices[j-1] + 1
        yield tuple(pool[i] for i in indices)

Next up? I’m wondering whether a visualisation of the explicit fan/network (i.e. follower/friend) delicious network for users of a given tag might be interesting, to see how it compares to the ad hoc/informal networks that grow up around a tag?

Dominant Tags in My Delicious Network

Following on from Social Networks on Delicious, here’s a view over my delicious network (that is, the folk I “follow” on delicious) and the dominant tags they use:

The image is created from a source file generated by:

1) grabbing the list of folk in my delicious network;
2) grabbing the tags each of them uses;
3) generating a bipartite network specification graph containing user and edge nodes, with weighted links corresponding to the number of times a user has used a particular tag (i.e. the number of bookmarks they have bookmarked using that tag).

Because the original graph is a large, sparse one (many users define lots of tags but only use them rarely), I filtered the output view to show only those tags that have been used more than 150 times each by any particular user, based on the weight of each edge (remember, the edge weight describes the number of times a used has used a particular tag). (So if every user had used the same tag up to but not more 149 times each, it wouldn’t be displayed). The tag nodes are sized according to the number of users who have used the tag 150 or more times.

I also had a go at colouring the nodes to identify tags used heavily by a single user, compared to tags heavily used by several members of my network.

Here’s the Python code:

import urllib, simplejson

def getDeliciousUserNetwork(user,network):
  url='http://feeds.delicious.com/v2/json/networkmembers/'+user
  data = simplejson.load(urllib.urlopen(url))
  for u in data:
    network.append(u['user'])
    #time also available: u['dt']
  #print network
  return network

def getDeliciousTagsByUser(user):
  tags={}
  url='http://feeds.delicious.com/v2/json/tags/'+user
  data = simplejson.load(urllib.urlopen(url))
  for tag in data:
    tags[tag]=data[tag]
  return tags

def printDeliciousTagsByNetwork(user,minVal=2):
  f=openTimestampedFile('delicious-socialNetwork','network-tags-' + user+'.gdf')
  f.write(gephiCoreGDFNodeHeader(typ='delicious')+'\n')
 
  network=[]
  network=getDeliciousUserNetwork(user,network)

  for user in network:
    f.write(user+','+user+',user\n')
  f.write('edgedef> user1 VARCHAR,user2 VARCHAR,weight DOUBLE\n')
  for user in network:
    tags={}
    tags=getDeliciousTagsByUser(user)
    for tag in tags:
      if tags[tag]>=minVal:
         f.write(user+',"'+tag.encode('ascii','ignore') + '",'+str(tags[tag])+'\n')
  f.close()

Looking at the network, it’s possible to see which members of my network are heavy users of a particular tag, and furthermore, which tags are heavily used by more than one member of my network. The question now is: to what extent might this information help me identify whether or not I am following people who are likely to turn up resources that are in my interest area, by virtue of the tags used by the members of my network.

Picking up on the previous post on Social Networks on Delicious, might it be worth looking at the tags used heavily by my followers to see what subject areas they are interested in, and potentially the topic area(s) in which they see me as acting as a resource investigator?

Social Networks on Delicious

One of the many things that the delicious social networking site appears to have got wrong is how to gain traction from its social network. As well as the incidental social network that arises from two or more different users using the same tag or bookmarking the same resource (for example, Visualising Delicious Tag Communities Using Gephi), there is also an explicit social network constructed using an asymmetric model similar to that used by Twitter: specifically, you can follow me (become a “fan” of me) without my permission, and I can add you to my network (become a fan of you, again without your permission).

Realising that you are part of a social network on delicious is not really that obvious though, nor is the extent to which it is a network. So I thought I’d have a look at the structure of the social network that I can crystallise out around my delicious account, by:

1) grabbing the list of my “fans” on delicious;
2) grabbing the list of the fans of my fans on delicious and then plotting:
2a) connections between my fans and and their fans who are also my fans;
2b) all the fans of my fans.

(Writing “fans” feels a lot more ego-bollox than writing “followers”; is that maybe one of the nails in the delicious social SNAFU coffin?!)

Here’s the way my “fans” on delicious follow each other (maybe? I’m not sure if the fans call always grabs all the fans, or whether it pages the results?):

The network is plotted using Gephi, of course; nodes are coloured according to modularity clusters, the layout is derived from a Force Atlas layout).

Here’s the wider network – that is, showing fans of my fans:

In this case, nodes are sized according to betweenness centrality and coloured according to in-degree (that is, the number of my fans who have this people as fans). [This works in so far as we’re trying to identify reputation networks. If we’re looking for reach in terms of using folk as a resource discovery network, it would probably make more sense to look at the members of my network, and the networks of those folk…)

If you want to try to generate your own, here’s the code:

import simplejson

def getDeliciousUserFans(user,fans):
  url='http://feeds.delicious.com/v2/json/networkfans/'+user
  #needs paging? or does this grab all the fans?
  data = simplejson.load(urllib.urlopen(url))
  for u in data:
    fans.append(u['user'])
    #time also available: u['dt']
  #print fans
  return fans

def getDeliciousFanNetwork(user):
  f=openTimestampedFile("fans-delicious","all-"+user+".gdf")
  f2=openTimestampedFile("fans-delicious","inner-"+user+".gdf")
  f.write(gephiCoreGDFNodeHeader(typ="min")+"\n")
  f.write("edgedef> user1 VARCHAR,user2 VARCHAR\n")
  f2.write(gephiCoreGDFNodeHeader(typ="min")+"\n")
  f2.write("edgedef> user1 VARCHAR,user2 VARCHAR\n")
  fans=[]
  fans=getDeliciousUserFans(user,fans)
  for fan in fans:
    time.sleep(1)
    fans2=[]
    print "Fetching data for fan "+fan
    fans2=getDeliciousUserFans(fan,fans2)
    for fan2 in fans2:
      f.write(fan+","+fan2+"\n")
      if fan2 in fans:
        f2.write(fan+","+fan2+"\n")
  f.close()
  f2.close()

So what”s the next step…?!

Visualising Delicious Tag Communities Using Gephi

Years ago, I used the Javascript Infovis Toolkit to put together a handful of data visualisations around the idea of the “social life of a URL” by looking up bookmarked URLs on delicious and then seeing who had bookmarked them and using what tags (delicious URL History – Hyperbolic Tree Visualisation, More Hyperbolic Tree Visualisations – delicious URL History: Users by Tag). Whilst playing with some Twitter hashtag network visualisations today, I wondered whether I could do something similar based around delicious bookmark tags, so here’s a first pass attempt…

As a matter of course, delicious publishes RSS and JSON feeds from tag pages, optionally containing up to 100 bookmarked entries. Each item in the response is a bookmarked URL, along with details of the single individual person who saved that particular bookmark and the tags they used.

That is, for a particular tag on delicious we can trivially get hold of the 100 most recent bookmarks saved with that tag and data on:

– who bookmarked it;
– what tags they used.

Here’s a little script in Python to grab the user and tag data for each lak11 bookmark and generate a Gephi gdf file to represent the bipartite graph that associates users with the tags they have used:

import simplejson
import urllib

def getDeliciousTagURL(tag,typ='json', num=100):
  #need to add a pager to get data when more than 1 page
  return "http://feeds.delicious.com/v2/json/tag/"+tag+"?count=100"

def getDeliciousTaggedURLDetailsFull(tag):
  durl=getDeliciousTagURL(tag)
  data = simplejson.load(urllib.urlopen(durl))
  userTags={}
  uniqTags=[]
  for i in data:
    url= i['u']
    user=i['a']
    tags=i['t']
    title=i['d']
    if user in userTags:
      for t in tags:
        if t not in uniqTags:
          uniqTags.append(t)
        if t not in userTags[user]:
          userTags[user].append(t)
    else:
      userTags[user]=[]
      for t in tags:
        userTags[user].append(t)
        if t not in uniqTags:
          uniqTags.append(t)
  
  f=open('bookmarks-delicious_'+tag+'.gdf')
  f.write('nodedef> name VARCHAR,label VARCHAR, type VARCHAR\n')
  for user in userTags:
    f.write(user+','+user+',user\n')
  for t in uniqTags:
    f.write(t+','+t+',tag\n')

  f.write('edgedef> user VARCHAR,tag VARCHAR\n')
  for user in userTags:
    for t in userTags[user]:
      f.write(user+','+t+'\n')
  f.close()

tag='lak11'
getDeliciousTaggedURLDetailsFull(tag)

[Note to self: this script needs updating to grab additional results pages?]

Here’s an example of the output, in this case using the tag for Jim Groom’s Digital Storytelling course: ds106. The nodes are coloured according to whether they represent a user or a tag, and sized according to degree, and the layout is based on a force atlas layout with a few tweaks to allow us to see labels clearly.

Note that the actual URLs that are bookmarked are not represented in any way in this visualisation. The netwroks shows the connections between users and the tags they have used irrespective of whether the tags were applies to the same or different URLs. Even if two users share common tags, they may not share any common bookmarks…

Here’s another example, this time using the lak11 tag:

Looking at these networks, a couple of things struck me:

– the commonly used tags might express a category or conceptual tag that describes the original tag used to source the data;

– folk sharing similar tags may share similar interests.

Here’s a view over part of the LAK11 network with the LAK11 tag filtered out, and the Gephi ego filter applied with depth two to a particular user, in this case delicious user rosemary20:

The filtered view shows us:

– the tags a particular user (in this case, rosemary20) has used;

– the people who have used the same tags as rosemary20; note that this does not necessarily mean that they bookmarked any of the same URLs, nor that they are using the tags to mean the same thing*…

(* delicious does allow users to provide a description of a tag, though I’m not sure if this information is generally available via a public API?)

By sizing the nodes according to degree in this subnetwork, we can readily identify the tags commonly used alongside the tag used to source the data, and also the users who have used the largest number of identical tags.

PS it struck me that a single page web app should be quite easy to put together to achieve something similar to the above visualisations. The JSON feed from delicious is easy enough to pull in to any page, and the Protovis code library has a force directed layout package that works on a simple graph representation not totally dissimilar to the Gephi/GDF format.

If I get an hour I’ll try to have a play to put a demo together. If you beat me to it, please post a link to your demo (or even fully blown app!) in the comments:-)

Browse Links in Delicious – Another OUseful Prototype Unprediction Comes True:-)

Although I subscribe to a lot of online app blogs, I don’t subscribe to them all, instead relying on twitter and subscriptions to other commentator blogs to do some of the filtering for me. This isn’t always reliable, of course, and sometimes I rely on “new” flags to alert me to new features in some of the apps I use regularly.

Like this one:

A ‘browse these bookmarks” feature in delicious (original announcement).

Pick a user, one or more tags, or any combination thereof, and you can click through a preview of the bookmarked websites using something they’re calling the browsebar:

If you look at the top of the screenshot you should see the browsebar – it lets you click through the links one at a time, in the order they were bookmarked. So if you’re giving a presentation based around demoing a series of websites, this is a handy way of doing it.

And this is where my unprediction comes from, either from April 2006, or maybe somewhen in 2005, depending on whether you trust me or not…;-) deliShow, aka the Feedshow Link presenter

At it’s simplest, Feedshow would take and RSS feed and present the links in a window in much the same way that the delicious browsebar works:

feedshow

I also added tools to splash a shortcode for the presentation (and maybe in a later tweak, the currently displayed bookmark?), so that viewers could also click through the slideshow in their own browser, and started working on feedshow synching facility so that remote viewers could synch the current state of the presentation to that of the person leading the presentation.

Unfortunately, the code behind feedshow appears to have rotted (maybe I should redo it at Dev8D?)

Of course, if we give delicious a year or two, they might implement something similar themselves? ;-)

PS I wonder if they’ll release a DeliTV app too, to allow users to use delicious to programme their Boxee TV viewing?;-) (More on that in the next couple of weeks….)

Site Limited Search in Delicious…

Whilst mulling over the extent to which I could use the delicious social bookmarking service to provide an ad hoc tagging tool for web pages*, I wondered whether or not it was possible to do a site limited search in delicious.

And apparently, it is possible, using an obvious (and guessed at) notation: “open access” site:ac.uk

The search appears to return results of bookmarked pages limited according to the site: search limit.

So has the OUseful.info blog been bookmarked at all over the last month?

Hmmmm…. :-)

* so for example, I can look up the delicious bookmark details for a page given its URI in the following way: http://feeds.delicious.com/v2/{format}/url/{url md5}
Here are details of a pipe that handles the MD5 encoding for you and gives you a feed relating to who has recently bookmarked a given URL: DeliURL pipe

PS the url: search limit also works, so it’s easy enough to see who’s bookmarked a particular page with a limited search on a specific URI, rather than having to go the MD5 lookup route:

Unfortunately, the delicious search results pages don’t natively provide an RSS or JSON feed output… but I wonder: can we get those via YQL? Arghh, of course they don’t – the search results pages disallow robots, even Yahoo’s own robots:-(

Drag and Drop Ordered Links in Delicious?

One of the things I’ve been interested in for some time is how to use social bookmarking services like delicious as a database for ordered link collections (for example, Ordered Lists of Links from delicious Using Yahoo Pipes).

I don’t have time to try this right now, so here’s a quick holding post about a plan for the future:

– pinch the code used for this jquery demo: “Dynamic Drag’n Drop With jQuery And PHP” which shows how to update a database with the new list order using “an Ajax request in the backend”…

– populate the list using the delicious api from a (logged in) users’ specified tags;

– identify the position of each item in the list using a special machinetag tag. Rewrite the jquery demo to use a delicious API call in place of the demo database update function. I’m guessing that this would mean using the https://api.del.icio.us/v1/posts/add? call, and just copying everything from the previous version of the bookmark apart from the item number machine tag?

– cobble together a Javascript script to pull a tagged list from delicious, as JSON, that includes ordered list machine tags and display the list, appropriately ordered; also provide a ‘reverse order’ switch ;-)

– cobble together a simple web service using a minimal PHP script that will grab a tagged list from delicious, with machine tags, and then display it as an ordered RSS list (also provide a ‘reverse order’ switch in the URI).

If anyone builds these before I do, please post a link to the demo :-)

Twitter Integration Means Delicious Social Bookmarking Site Gets, Err, Social…(?!)

In order to keep track of the dozens of snippets of potentially useful info I come across through m browser each week, I us the delicious online (social) bookmarking sit as a place to dump most of my bookmarks. Three or four times a week (maybe more?), I use my tags to rediscover things I remember bookmarking, and maybe once a month I actually use the delicious search option.

In order to save bookmarks, I used to use the integrated service provided by the flock browser, but in one particular update they made a change I really didn’t get on with (to the dialogue box, I think) and now I tend to use the delicious bookmarklet.

(I’ve also become pretty cavalier about which browser I use – I typically have Flock, Safari and Firefox open, and @dmje was hassling me all last week to use Chrome as well… – so with a bookmarklet on each browser, I get a consistent experience.)

As someone who used to send “FYI” emails out every so often, one of the ways I use twitter is to share potentially interesting or “of the moment” links; I also use a feedthru tag to post one or two links per day, (typically), to my blog sidebar (those links also gt integrated on a daily basis with my blog’s Feedburner feed). Note also that I rarely use the for: option on delicious, possibly because I don’t look at what’s been shared with me very often!

Anyway, one of the hassles with my workflow is the duplicated action required to both tweet and bookmark a link. But it seems that the delicious bookmarklet now has a sharing capability both within and without the delicious ecosystem. (I’m not sure if this is a Good Thing, or a delicious death throe?)

So for example, I can share a bookmark with my delicious network:

social delicious

Or tweet it (it’ll be interesting whether I adopt this workflow…):

So what message gets tweeted? The tweet message, of course:

Note that once the bookmark is saved, there is no evidence or history of it being tweeted. Nor are any of the tags used as hashtags. (If you add a hashtag to the tweet, I don’t think it gets added to the bookmark tags as a simple ‘dehashed’ tag (or hashtag.)

When the link is tweeted, a new delicious shortcode is used:

One Bad Thing about the Twitter integration – you have to provide your twitter credentials. So what the f**k is wrong with OAuth?!

As well as the new social/network amplification options in the bookmark dialogue, there’s also been a revamp (I think) of the search facility:

As well as suggested terms, an improved search display over your own bookmarks, your network’s, or everyone’s, there’s an ability to filter the results by tag. I have to admit I expected live AJAXy UI updates – I didn’t see the effect of filtering by tag unless I clicked the Search button again – but it’s maybe still early days and the live reflow may yet appear. (Or maybe it is there already and just broken for me at the mo?!)

I’m not sure how useful the volume display will be (memories of Google trends etc, there), especially as it only works when you only have one group selected (i.e. only one of my bookmarks, or my network’s, or all of them) and doesn’t reflow when you change the selection? I also wonder how well the ads will fare against the user generated links?

Anyway this is starting to look like it could become quite a powerful search tool, so maybe I need to start growing my delicious network and evangelising once more… (Just a quick note to self – if I do a social bookmarking workshop again, I need to update my slides [uploaded 3 years ago? Sheesh…] ;-)

And as for the twitter integration – I think I’ll give it a go…

PS on the search engine front, I was thinking over the weekend how the mythical ‘social search engine’ that people were trying to hype a year or two ago has actually appeared. But rather than arising out of ‘dead links’ posted to delicious, it’s a live ‘person inside’ application: Twitter.

PPS at last there’s an official announcement post: New and Delicious: Search, Tweet, and Discover the Freshest Bookmarks