After the BBC announced that they were going to enter into a timeshare of sorts for the live TV rights to Formula 1 from 2012 onwards there’s been a fairly vocal crowd on Twitter, Facebook, the BBC message boards and petition sites making their views known. And those views are, understandably, almost universally negative. At time of writing, the ‘Keep F1 Coverage On The BBC For All Races From 2012‘ petition on PetitionBuzz has over 28,000 signatures and nearly 20,000 Facebook likes.
Since I’d intended this to be a technical blog, I figured that there wasn’t much better a way of starting off than hammering out some code over a single malt to track the progress of the petition as a chart:

A cron job running every 15 minutes first scrapes the petition site for the number of signatories, which is stored in a MySQL database against a timestamp. The above graph is then refreshed and saved to disk, such that it’s always in line with the latest data but not forever being generated on-the-fly. The graph is generated using the jpGraph library (the free version) with the actual incantations effectively copied-and-pasted from a sample on the website – I was going for quick and dirty with this one, and good Lord is it that.



