Monday, June 08, 2009

The Springwatch Cuckoos

Cuckoo sightings in the UK

My BBC colleagues, Tom Scott and Roo Reynolds were recently kicking around ideas for what to do with the 12,000 or so comments (a BBC record) that a blog post for the BBC TV show Springwatch recently received after asking if people had heard a cuckoo. They had lots of interesting ideas but I immediately connected this with the recent release of the Yahoo Placemaker API. This service allows you to submit some text and receive a list of recognised places back - the place name, a unique Where-on-Earth ID (WOEID) and a latitude/longitude. So I've written some Python scripts to extract placenames from the cuckoo comments and plot the sightings (hearings?) on a map.

I submit the comment text to the Yahoo Placemaker API in batches because Placemaker has a 50,000 byte limit for posted documents. This discovered 16078 place mentions consisting of 5386 unique places. The Top 20 are...


  1. New Forest, England, GB, 99 mentions

  2. Scotland, GB, 94

  3. Woodland, England, GB, 83

  4. Suffolk, England, GB, 80

  5. Yorkshire, England, GB, 79

  6. Norfolk, England, GB, 77

  7. Lake District National Park, England, GB, 77

  8. Dartmoor National Park, England, GB, 77

  9. Wales, GB, 74

  10. Essex, England, GB, 72

  11. Sussex, England, GB, 66

  12. Surrey, England, GB, 66

  13. Kent, England, GB, 59

  14. Somerset, England, GB, 51

  15. Hampshire, England, GB, 50

  16. Cumbria, England, GB, 48

  17. Norwich, England, GB, 47

  18. Island of Skye, Scotland, GB, 47

  19. Perthshire, Scotland, GB, 46

  20. Dorset, England, GB, 45


The top places are mainly counties or areas as you'd expect but further down the list are towns and villages. There are some false positives, like "Woodland" above, but by filtering the place names to include "GB" I removed many of these. There is another problem where some comments will generate multiple locations - e.g. "Basingstoke, Hampshire" gets two places extracted.

Then I converted these places into KML, the data format used by Google Earth, and generated a compressed KML file of the sightings that you can download. You can load this into Google Earth and it seems to cope, though it's pretty useless looking at a map full of pins until you zoom in. You can also paste that URL into the Google Maps search box to see the sightings but it will only load 1000 points and only plot about 80 points at one time - zoom in for more detail.

Cuckoo sightings in Google Earth

Finally, as originally suggested by Tom, I drew a heatmap-type image using Nodebox and Python to plot translucent dots onto a map of the UK (courtesy of OpenStreetMap). I fiddled around with the size and opacity until I got this (click to enlarge)...

Heatmap of cuckoo sightings in the UK

Tom got into contact with Springwatch and I was phoned by Paul, their web producer. It turns out they had already got a data entry company to extract the place names from the comments, using people to do what I'm doing with code, but hopefully getting higher quality results. They are also sharing the data with the British Trust for Ornithology who will work on producing more accurate results from it. I redrew the map using their manual data and they also asked for a couple of closer views of London, Birmingham, Manchester and Scotland which I also generated though these aren't quite as pretty..

Cuckoo sightings in the North-west of the UK

Cuckoo sightings in the London area

It's not scientifically accurate by any means but it is interesting and was a good experiment in extracting useful data from large numbers of comments.

I've just been watching Springwatch right now and they featured a map but I'm not sure it was mine - looks like it was this one from the BTO.

Disclaimer: These are my thoughts and opinions and not those of my employer

blog archive

labels

recent bookmarks

recent music

recent photos

www.flickr.com

about this blog

I'm Tristan Ferne and I'm a coder/producer/manager in thePrototyping team of BBC R&D and also look after BBC Radio Labs. I'm interested in lots of things, but here I write about the web, media, music and books. You can contact me at tristanferne at yahoo[dot]co[dot]uk

Why is it called cookin'/relaxin'? They're the titles of two of a series of Miles Davis albums which also describe some of my favourite things.

View my complete profile

other blogs

food at cookin'/relaxin' My food blog

  © Blogger template 'Photoblog' by Ourblogtemplates.com 2008

Back to TOP