Sunday afternoon with tilemill, sinatra and polymaps

I had a rare Sunday on my own today... if you don't include the dog.  She was hoping for a 6 hour dog-walkathon, I was hoping to play with Tilemill on a rainy afternoon.  We did both in the end.  

So while Millie picked the (phantom) rabbit fluff from her teeth in front of the fire, I set about creating tiles of marine protected areas.  Turned out to be very simple. The install was easy and the map styling css stuff was a pleasure.  Exporting to MBTile format took a bit of time but I hear thats being looked at.  Not exporting zoom 0 and 1 made it much faster (it was a 100MB global dataset)- around 30 mins I think.  

Here's a polymap of the marine protected areas served from a little sinatra app I wrote on top of the MBTile sqlite database.  And here is the code

Mpa-tiles

[I reduced the extent to keep the db under the free *skinflint* 5MB limit set by heroku]

Not bad for a rainy Sunday afternoon.  Millie wasn't bothered about the tiles by the way.

Filed under  //   Marine Protected Areas   open source   polymaps   sinatra   tilemill  

I'll swap you three Belgiums for a Portugal

I have been thinking about how ones brain interprets spatial stats.  For example, when talking about spatial scale, the popular media often quote, ‘an area the size of Belgium/Wales/Texas’ and with that they try and invoke in your mind the impressive scale of whatever they are describing. The most recent example I discovered  is a report about a newly designated marine protected area in the South Orkneys.  The area stands at 94,000km2- an area the size of Portugal.   Impressive you may think…. This led my train of thought to marine protected areas in general and how much of the sea has been targeted for protection.  While this isn’t the arena to rattle on about UN mandates and conservation conventions, the rough amount of sea that would ideally be protected from us human beans is 10% - an area the size of AFRICA (now we are talking). For me the size of Africa seems a lot, and also, I like to see stuff to believe it. I thought the easiest way to visualize this was to displace all the African nations across the seas.  So that’s what I did.
Media_httpwwwcraigmmi_uijjb
Using a simple random placement algorithm I picked up each country in Africa and slung it in the sea (with a little help from ArcObjects).  I constrained the randomness so not to allow countries to overlap with each other or the coastline and outputted a simple map to see the results.  For me, I think it looks like a large part of the sea needs protecting and if these targets which have to be met in two years are going to be, there is a pile of work twice the size of Belgium to achieve it. Caveats:  I wouldn’t recommend designing the marine protected areas network on this analysis, there is no account of whether protecting a Kenyan shaped area in the Atlantic would be useful or not- better than what we currently have I suppose, but as my biology teacher regularly told me ‘you must do better…’
Filed under  //   Marine Protected Areas   Ponderings   Random  

About

Web bloke. Project runner. Terrible poet. Always think I have more time than I do. Need to write shorter posts. Then they might get written. Know a little about protected areas and the sea. Only a little though.