The Forestry Commission, OpenData and Ordnance Survey

At the start of the week I decided to try to collect some information together regarding the Forestry Commissions’ owned woodland and map that data so we can see the scale and find out which ones are locally owned. (Jump to the app here if you’re impatient!).

There’s lots of reports on this news story (here for instance) but the basic idea is that the publicly owned forests of England are to be sold off to the private sector so the government can make a quick buck.  In other words currently protected ancient forests could be sold to the highest timber bidders. Even with so called safe guards this is a bad idea, so I decided to get hold of the Forestry Commissions’ current data.

Unfortunately I couldn’t find any download for the type of data I wanted, mainly map data, so I resorted to a technique called Report Mining which in this case meant essentially extracting the information from their webpages. I think if you are going to do report mining then you have to be responsible with it, make sure you are not overloading the other parties servers. In reality one machine isn’t going to crash another, but it can certainly slow response times down for others.

I used a fairly simple bit of python code using the httplib2 library to access the pages, then collected all this data together in a CSV file. My miner had lots of sleeps (Python: <pre>time.sleep()</pre> )  – in fact it was mostly sleeping – and it ran over night to limit it’s impact, I’d recommend you do something similar. I’d estimate it took me about ten hours to write the code, collect the information together and process it into a usable form.

Next was the mapping. I’ve known  about Ordnance Survey’s open data for a while but hadn’t had the right opportunity to look into it – but now was perfect. I’ve been very impressed with what they’ve written. Their API is a breeze to use, within something like 15 minutes I was up and running with my very own map and data.

If you are thinking of playing with Ordnance Survey then I’d recommend your first port of call is the Examples page. The one’s which were of most use to me, and probable starting positions for most, were:

And the map? Well you can see it here: http://www.akademy.co.uk/software/forests/forests.php . It’s all interactive so scroll and zoom with the mouse as you would expect. Click on the markers for a little bit of info and a link to the detailed page in the Forestry Commission. You can also download some of the information for yourself from there.

Here’s hoping the 84% of the population who don’t want these sales to go through won’t be ignored. And don’t forget to sign the petition at 38degrees .

One Reply to “The Forestry Commission, OpenData and Ordnance Survey”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.