Archive for the ‘Technology’ Category

Fun with the Last.fm API, python and Wordle

Monday, May 11th, 2009

I’ve been looking for a reason to hack around with python. Recently, my friend @smbrown published a post on his The Monkey Represents Sharing blog entitled Wordle visualization of my Tweetstream where he used a python script to archive his Twitter stream which he then used to create a Wordle, or a visual representation of the frequency of terms used in a collection of words. Words that you use most often are relatively larger than words used less often. Tag Clouds such as these have been around for quite some time, but what sets Wordle apart is its ability to arrange words both vertically and horizontally and even nest small words inside the actually letters of larger words. This got me thinking… “I wonder if I could do the same with data I have scrobbled to my last.fm account”

I started by reading up on the Last.FM API and getting myself an API key so that I could access the data held on Last.FM’s servers. I targeted the user.getTopArtists API call because I thought that would make for an interesting Wordle. Looking over the script used to archive your tweetstream I noticed a python library called Beautiful Soup was used to parse the XML returned from Twitter’s servers. I used Beautiful Soup to parse the top 50 artists from my Last.FM account and their respective playcounts returned from the API call. I looped over that data and exported it to a text file which I then Wordled. The results are below:

lastfm-artists-total-20090511

Click the image to enlarge

Here is the python code:

Notes

I wasn’t sure how Wordle would handle phrases. At first, I noticed that Artist Names like The Flaming Lips were broken up when Wordled. I tried wrapping the artist’s names in quotes but Wordle removed the quotes. I also tried joining the individual words of the phrases with + (plus) signs. This approach kept the words together, but Wordle rendered the plus signs. I eventually found that non-breaking spaces (%nbsp;) would work.

Here is another Wordle I created by making an API call for user.getWeeklyArtistChart which shows who I have listened to so far this week:

lastfm-artists-recent-20090511

Click the image to enlarge

Wordles

Here is a sample of all of my Wordles to date#.

T-Mobile customer service screwed me

Monday, June 19th, 2006

The main objective of this post is to inform the public that T-Mobile is a dishonest, money-grubbing corporation with no respect for their customers, and no interest in taking action to correct their mistakes. I’ll be dropping as many keywords as I can in an effort to attract readers, search results, and links to this page. Just the act of venting in a public forum will be enough to release the tension my cell phone service provider has caused me. And if I can convince just one other person to look elsewhere for their next wireless service, my efforts will all seem worth it. (more…)

Gadget Acquisition: Nokia 9500 Communicator

Saturday, October 29th, 2005

Nokia 9500 CommunicatorThanks to my brother Jim, I have acquired a new (to me) Nokia 9500 Communicator. Jim, who is blind, was interested in trying the 9500 out as a possible portable talking computer solution. The Nokia 9500 uses the Symbian Series 80 Operating System and Nuance has created a version of their SpeechPAKS Talks software for use with any phone that uses this or the Series 60 OS.

(more…)

Gadget Acquisition: Garmin eTrex Vista C

Wednesday, September 28th, 2005

Garmin eTrex Vista CThis year has been marked by a great return of interest in some long time and long lost hobbies of mine: Mountain Biking and Backpacking/Hiking. Having spent a majority of the last ten years of my life glued to a computer screen, I started to become repulsed by all things technology (exaggeration) and found myself craving the great outdoors like I did during my carefree college days. Working from home and living in an area loaded with state parks and recreation areas allowed me to get out into the woods at least a few times a week.


But lets face it, sadecki is synonymous with technology, gadgets, computers, and geek. A strong desire to understand the bigger picture of my adventures, to control nature and to somehow pollute all that is pure and good with technology of somekind, I began finding myself sitting at my computer late at night drawing crude maps based on bike odometer readings, compass headings, foot-paces, and satellite photos (I know it sounds ridiculous, but I actually ended up with some pretty accurate maps). After watching this maddening obsession start to turn the tides of technology back against the calming effects nature had on her husband, my wife thought it was time to get me a GPS receiver. Nancy got together with my brother Jim and my mom to purchase the Garmin eTrex Vista C (pictured above) for my birthday this year.


Not 1 day later and I had a new obsession: Geocaching. An obsession so large it deserves its own section on this website