My Own Tag Cloud
|
I really like the way a tag cloud can visually present what are the most popular tags. I like it so much that I decided to hack one up for the tags on my own blog postings. |
I'm sure there are better ways of doing this. For example, TagCloud use the Yahoo! Content Analysis API to get all the tags, but I specifically just wanted to do it with the special Technorati tags I append to the end of my posts. There are others out there who have been playing around with this idea.
I used the Grabber Java application from the BlogClientUI jar file, to create a backup of all my blog posts. These were written as HTML files into a single directory on my local hard disk drive, with one blog post per file.
I then wrote a simple Python script to process these files. For each of the files in that blog posting directory, it extracts all the Technorati tags and generated a long list of them. This list is then sorted, and another routine processes that list and generates a dictionary of unique tags and the frequency count for each one.
This dictionary is then used to write an HTML page to standard output containing a tag cloud representation. The CSS describes ten levels, each of which has differing font-size's, line-height's and font-weight's. Level 0 is a different color than the other levels. I based all this on the CSS that the TagCloud folks use.
Here's the results (wedged fit into the next paragraph):
AJAX AVR Accessibility Advertising Amazon Amusement Anagrams Animals Appliances Architecture Archives Art Astronomy Audio Audio CD Australia Awards BBQ Backups Bay Area Benchmarking Bicycles Bikes Blog Blogging Bloggoing Blogs Bookmarks Books Boy+Scouts Brand Browser Browsers Buildings CAD CDROM California Cars Cartoons Case Mods Catalogs Chess Christmas Citizen Clocks Clothes Coding Collaboration Computer Games Computer History Computers Computers and Internet Computing Congress Crafts Cub Scouts Cycling DMV Data Representation Design Desktop Dogs Education Electronic Keyboards Electronics Email Entertainers Entertainment Exercising FAQ Family Fast Food Film Films Fish Food and Drink Football Frys Fun Funny Furniture GNOME Galaxy Games Garden Gardening Google Graphics HCI HDTV HTML Hacking Hacks Haiku Hardware Harry Potter History Holiday Home Improvements Humor Ideas Ikea Internet Interviews JVM Java Jigsaws John Lennon Katrina Keyboard Keyboards Kids LEGO LEGO Mindstorms Language Lego Library Links Linux Lists Logos Magazines Marketing Mathematics Mechanical Engineering Mentoring Microprogramming Mods Monterey Bay Aquarium Motivation Movies Moving Music NIST NTP Names Naming News Newspaper NiagaraCMT OSX Office Olympics Open Solaris Open Source OpenStep PC PDF Parks Passports Perl Personal Pets Phones Photography Photos Plants Plogs Posters Poultry Predictions Presentations Productivity Programming Project Planning Projects Puzzles Python Quantum Computing Quiz RFID RSS Radio Random Rants Renovation Reverse Engineering Roads Robotics SPAM Safety Sale Sales Science Science Fiction Scrabble Self Help Selling Servers Service Signs Software Software Design Solaris Songs Speech Statistics Stuff Sun Sun Microsystems Synergy T-shirts TV Tags Teaching Tech Technology Terry Pratchett Testing The White Stripes Throughput Time Tools Toys UI Design UNIX USA UltraSPARC VOIP Vacation Validation Vinyl Records Virtual Reality Visualization Walking Watches Web Web Related Web/Tech Weblog Websites Wedding Anniversary Whales Wikipedia Wood Words Writing accessibility awards blog books browsers cars computers dancing fish games hobbies iTunes laptops links maps pets random reviews software solaris technology thoughts
Here's the Python script in case this is useful to others.
I've got further plans for it. What I'd like to try next is to turn each of these tag words into hypertext links and generate a dynamic tooltip for each. That tooltip would contain a list of links for all of my posts that had that tag. All I need to do now is work out how to do this, or find a version that's freely available for others to use.
( Feb 06 2006, 07:21:40 AM PST ) [Listen] Permalink Comments [2]
Comments are closed for this entry.












Posted by Rich Sharples on February 06, 2006 at 09:52 AM PST #
Posted by tony : frosty on February 06, 2006 at 12:34 PM PST #