Timelines through YQL

collAPI.getTimelines

OpenHackNYC gave me an excuse to start playing with the Yahoo Query Language. With YQL, you build a binding to datasource, an XML table or other web service, and use an “expressive SQL-like language” to manipulate the  data. Instant database functionality with minimal overhead.

The Heilbrunn Timeline of Art History has these great individual timelines of key art/world events. The timelines are classified by time period and geographically with an encompasses free text string, e.g. Eastern Europe and Scandinavia, 1600–1800 A.D. encompasses “Belarus, Denmark, Estonia, Finland, Iceland, Latvia, Lithuania, Norway, western Russia, Sweden, and Ukraine.”

I’d like to point to all of the related timelines for an arbitrary work of art – provided it has an associated geographical term and date range. I scraped all of the timeline links, titles, dates, and encompasses strings, formatted all the data in an XML table, made a simple binding, and rigged a pipe front-end.

USE "https://netfiles.uiuc.edu/pdadamcz/www/museumpipes/yql/Timelines.xml" AS Timelines; SELECT * FROM Timelines
Try it in the YQL console.

YQL / Timelines Pipe

YQL / Timelines Pipe

USE "https://netfiles.uiuc.edu/pdadamcz/www/museumpipes/yql/Timelines.xml" AS Timelines; SELECT title, link FROM Timelines where encompasses like "%Poland%" and datebegin > 1000 and dateend < 2000
Try it in the YQL console.

//TODO: The entire vocabulary of the encompasses strings isn’t exhaustive – understandably. But maybe I can pass the query from the pipe through a geo service to find neighbor terms and send them all through the YQL statement?

Posted in Uncategorized Tagged: timeline, yql