Plazes + Yahoo Query Language

It’s been awhile since I turned my attention toward Plazes: since its acquisition by Nokia several years ago there’s been no evolution of the application, and I’ve been expecting Nokia to quietly pull the plug on it someday. I’m not sure anyone would notice.

In the meantime, I have a chance to pull out the 10,000-odd geolocations that I stored in Plazes from 2004 to 2009, and this provided me with an opportunity to experiment with Yahoo Query Language (YQL), which is a powerful tool that wraps an SQL-like querying functionality around data provided in XML and JSON from services like Plazes.

Step one using YQL with a new data source is to set up an Open Data Table for it; I did this for Plazes, wiring up the past_activities API method that provides access to a given user’s historical “plazings” and the result is at:

Once this is in place, you can start to use the web-based YQL console to explore Plazes data. For example, if your Plazes userid is fiahless, you can go to the console and paste in the following text in the “Your YQL Statement” text field and click “Test”:

use "" as plazes;
select * from plazes where userid = 'fiahless';

This will return the most recent 100 plazings for this user as XML. You can use any of the XML elements in the “where” part of your YQL query to limit your search. For example, this query will find my own recent plazings that have the word coffee in the status message:

use "" as plazes;
select * from plazes where userid = 'ruk' and status like '%coffee%';

And this query will search my most recent 1,000 plazings and find those where the address of the place I checked in contains the word Prince:

use "" as plazes;
select * from plazes(0,1000) where userid = 'ruk' and 
plaze.address like '%prince%';

You don’t need to configure anything to make this work for yourself; just use these queries as a starting point and start exploring using the YQL console yourself (note that if you get a Could not load table plazes from error from the console, just click Test again – there seems to be some sort of intermittent issue at YQL in retrieving external URLs at the moment).


Add new comment