Tuesday, April 17, 2012

A Treemap View of the F1 2011 Drivers and Constructors Championship

The ergast Motor Racing API provides API access to a wealth of F1 racing results data including championship points year on year (and race by race), lap timing data, and, for 2012, pit stop timing data. The API publishes data in JSON or XML format, but I've been exploring how much easier it would be if the data were to be published using the Chart Tools Datasource Protocol (V0.6) response format. Easier to do what, you might ask... well... easier to create interactive sortable tables and charts, such as these (click through to see them...)
(It should be possible to embed the Javascript/HTML required to load in and render the treemap in an arbitrary web page, such as this page. But I couldn't get it to work just now, and I figure I'm not thinking clearly enough right now to see why... So here's a demo HTML page that does work (view source on the page to see how it does it... ) See also: Scraperwiki Glue Between the Ergast Experimental Motor Racing API and Google Chart Tools

No comments:

Post a Comment

There seem to be a few issues with posting comments. I think you need to preview your comment before you can submit it... Any problems, send me a message on twitter: @psychemedia