The thoughts of a web 2.0 research fellow on all things in the technological sphere that capture his interest.

Thursday, 10 July 2008

Python for API Dummies

Python is a really simple programming language for the novice programmer. As such I held an afternoon's "workshop" for a couple of PhD students in my front room:

The aim of the workshop was to provide sufficient information about programming in Python so that at the end of the afternoon the user could:
-Install Python libraries
-Download information through various APIs
-Manipulate the downloaded information.
As it was necessary to create an extensive slide show, covering everything from installing Python to getting data from the Yahoo API, I thought it may potentially be of interest to other novice users who don't know where to start.





It doesn't necessarily include the quickest or most efficient way of doing things, but it is simple and does the job.

If you have any questions about specific points, feel free to ask...the questions can't be more stupid than the questions the PhD students asked...and some of the slides could probably benefit from further explanation.

Labels: , , , ,

posted by David at | 1 Comments Links to this post

Sunday, 6 April 2008

Average photos per Flickr Member: ZERO

67% of Flickr members have no photos! Whilst Lotka's law teaches us that the majority of contributors to a community make very few contributions, I was still surprised at the number of members with no photos; after all, I am not talking visitors to the site, but those who have taken the trouble to join. What is the point of joining Flickr if you are not going to put photos on the site?

Data was collected about the number of photos for 324 randomly selected users. 216 had no photos, an additional 58 had less than 20, with only 50 having over 20:


Really I should have a look at whether these missing users are active in other ways, (e.g., members of groups, leavers of comments), but this was little more than an aside as I spend my time messing about with Python. I have now loaded Python on my main computer as well as my Eee PC, and can barely believe how easy it is!

Labels: , ,

posted by David at | 4 Comments Links to this post

Saturday, 29 March 2008

Python & the Flickr API on the Eee PC

Until yesterday I hadn't really thought about programming on the Eee PC, but once I started looking I was surprised how easy it was: Unbeknown to me, it has had Python 2.4 and 2.5 sitting there the whole time! Despite not being a particularly competent programmer, I found Python to be very user friendly, and look forward to programming on the Eee PC in a variety of settings in the future. My first Python program was used to find random Flickr users:

> import flickrapi
> import random
> api_key = 'XXXXXXXXXXXXXXX'
> for counter in range (1,1000):
>>> flickr = flickrapi.FlickrAPI(api_key, fail_on_error=False)
>>> a=random.randint(1, 99999999)
>>> b=random.randint(0,1)
>>> c=random.randint(0,9)
>>> d=str(a)+"@N"+str(b)+str(c)
>>> photos = flickr.photos_search(user_id=d)
>>> if photos['stat'] == "ok":
>>>>>> print d
> print 'done'

Webometric studies are always searching for ways of finding random users, unfortunately I have no idea how Flickr assigns its user_ids. O'Reilly's "Flickr Hacks' says:

"...a string of numbers, followed by an at sign (@), an N, and two more numbers (often 00 or 01)..."

Not exactly specific. The program calculates a number up to eight digits long before the '@N' and from 00 to 19 after the '@N'. Whilst most may be 00 or 01, I found them as high as 08. If anyone knows of any user_ids not included in these parameters, please let me know.

Sending 1,000 queries, 10 random users were identified. Not exactly efficient.

Labels: , , , ,

posted by David at | 0 Comments Links to this post

Tuesday, 4 March 2008

Flickr: Are other people's tags useful?

The short answer is: YES. The longer answer can be found in the latest issue of Online Information Review, hot off of the presses this morning:

Angus, E., Thelwall, M., Stuart, D. (2008). General patterns of tag usage among university groups in Flickr. Online Information Review, 32(1), 89-101.

If, however, you (or your institution) are not a subscriber to Online Information Review, I have made a preprint available for your enjoyment HERE (Emerald has impressively liberal author publishing rights).

Labels: , ,

posted by David at | 0 Comments Links to this post

Wednesday, 14 November 2007

2 billion Flickr photos!

However much you may question the quality of many of the Flickr photos, and whether the vast majority of photos are worth the space they take up (however cheap it is), there is no getting away from the fact that 2 billion is massive number.

The 2 billionth photo sums up so much of Flickr's stuff, pleasant enough in a pseudo-arty fashion. Personally I would loved to have seen the 2 billionth photo to be a big fat man sitting in his pants with absolutely no artistic merit at all....but maybe it was and Flickr just juggled the figures a little bit for the momentous occasion...but who could blame them?

Labels:

posted by David at | 0 Comments Links to this post