Pages

Monday, January 25, 2010

wwallo is a tag cloud for where you are

wwallo uses the HTML5 geolocation capabilities of your browser to generate a tag cloud for wherever you are (or, at least, where it guesses you are). Right now, wwallo gathers data just by looking at Twitter; in my experience that means your location is marked by people bitching about work and school, dropping the f-bomb, bragging about how drunk they've gotten or will get and trying to be clever (twitter "trends"). Also, celebrity gossip. Awesomeness. But maybe it's just where I live.

So, beside the insight into that little slice of life outside your dark, linux infested man cave and creeping on the cute neighbourhood girls (not that I condone such behaviour, you perv o.O), what is wwallo useful for? Aside from marvelling at the inaccuracy of Twitter's geographic data and meditating on the 504's resulting from their "RESTful" API?

wwallo, like a lot of web applications nowadays, is just a bunch of (well, 2, sort of) RESTful interfaces exposed as an API that a Javascript application calls ("exposes" an API is sort of funny, teetering between jargon and a criminal warrant for indecent usage). The application, in this case, runs in a browser.

Well, you can see for yourself. I'll wait.

It's pretty simple, isn't it? None of the complications you've probably been dreading if you've worked with any enterprise web applications <cough>SOAP<cough>. The interfaces are simple and predictable, therefore safer. With many web apps, even the developer can't tell you all the paths for input and output of data (hence, the need for tools like LAPSE in the Java world (BTW, check out the URL for LAPSE, that username is awesome and inspires, in me, just a bit of jealousy)).

You can try out wwallo yourself by visiting the website. It's running on a test server for now but maybe someday it'll move to somewhere permanent.

Using wwallo's RESTful Interface


If for some insane reason you want to integrate your web application with wwallo, it's simple. Given the user's location, use a GET request:
http://wwallo.com/geocode/<lat>,<lon>,<radius>km
The radius must be in kilometers (don't even ask, just multiply by 1.6 already).

If you don't know the user's location, you can call into wwallo using the following and wwallo will figure out the location by the IP address:
http://wwallo.com/geocode/null,<radius>km
But if you're proxying the user's request from your service, well, you've just made a tag cloud for wherever your server, not your user, is.

wwallo will return a JSON data structure. The beauty of webmachine is that it can, very simply, be made to return any presentation format; however, at the moment, wwallo only returns JSON.
"pos" is the location based on your IP address. "address" is, obviously, the source IP address. "tweet", "author" and "image" are arrays, sharing a common offset. "count" contains each word, after processing through a stemming library.
{
    "pos": "45.000000,-69.500000,5km",
    "address": "1.1.1.11",
    "country": "Antartica",
    "city": "Penguinistaville",
    "tweet": [
        "What am I going to spend my Saturdays doing now that college football is done??",
        "@SI_PeterKing dick butkis still my fav name! http://myloc.me/2KNBX",
        "@SI_PeterKing I the ray guy sent u that tweet using a different name! Lol http://myloc.me/2KNqq",
        "I bought my 1st snow shovel today. Not really sure how I feel about that.",
    ],
    "author": [
        "clint_on_barley",
        "Botha420",
        "Botha420",
        "clint_on_barley",
    ],
    "image": [
        "http://a1.twimg.com/profile_images/579214364/Photo_on_2009-11-23_at_10.20__5_normal.jpg",
        "http://a1.twimg.com/profile_images/280041192/1041_normal.gif",
        "http://a1.twimg.com/profile_images/280041192/1041_normal.gif",
        "http://a1.twimg.com/profile_images/579214364/Photo_on_2009-11-23_at_10.20__5_normal.jpg",
    ],
    "count": {
        "that": "5",
        "be":"2",
        "big":"2",
        "know":"2",
        "love":"2",
        "not":"2",
        "1st":"1",
        "abl":"1",
        "about":"1",
        "after":"1",
        "appear":"1",
        "appl":"1",
        "around":"1",
        "becom":"1",
    }
}
In conclusion, wwallo allows you to voyeuristically live your life through the lives of others who aren't leading very interesting lives either. Maybe the next version of wwallo should be a tagcloud for where you want to be, geocoordinates set to Tahiti.

And did I mention that webmachine and jQuery are freaking awesome?

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.