Douwe Osinga's Blog: The advance of APIs: WordColor and Landgeist are back

Saturday, July 17, 2010

A while ago I had a server crash and it was really painful to restore the Zope instance I had before. I decided to do away with Zope and go with django on App Engine instead. This meant however rewriting all projects. I never really got around to that and ended up with just a subset.

Today I decided to update some, more specifically WordColor and LandGeist. It is interesting to see how much APIs have improved and how these projects can now be done a lot better.

WordColor used to be a windows executable that would screen scrape image search to get images that matched a search, average the pixel colors returned and declare the average color (with some normalization of saturation) the color of your word. That was kinda bad. If image search changed its html, the program would stop working. And anybody who had installed the program would then have to find back where it came from. But doing this online was near impossible.

Now there is a search api that lets you do image searches right from the page. You still can't access the color values from javascript of course, but a quick ajax call back to the server solves that. App engine comes with a handy images module that has a function to get the histogram of an image so that's really quick and painless now.

Landgeist was in a similar fashion a client side program that would given a word, do searches for that word and all the names of all the countries and then calculate the google share of that country for that word.

But now there is a search api callable from javascript! And you can use the chart api to update a map while you watch. The fun thing is that all the work is now just done in the browser.


1 comments:

K. Gill said...

Thank you for fixing Word Color. I remember being really disappointed when I first found it a couple of years ago and it wasn't working. I'm an artist, and I enjoy tools that can extract colors from data.