Carisenda

this space left intentionally blank

BT Postcodes & Processing.js

October 2009, Sometime on Thursday 8th

A few months ago I bought Visualizing data By Ben Fry and apart from the odd skim read it has sat on the shelf waiting patiently for me to make time for it. A week or so ago I thought maybe it was time to take another look at the Crime Map stuff I did with Steve Rushe last year and had the notion I could try something similar in Processing. While the crime stuff isn't ready for show just yet I have been messing about with NI postcodes from NISRA and some NINIS data, nothing terribly exciting but I thought some sketches looked cool so I'm posting them here now.

postcodes of northern ireland joined to each other with a line
Figure 1. Join the postcodes

Figure 1. is simply a join the dots exercise, each postcode in Northern Ireland is joined sequentially to the next one in alphanumeric order (BT1 1AA to BT1AB). I think it looks pretty, not sure it tells you much other than maybe Belfast ran out of its first allocation of BT's ages ago. The real thing is available here, WARNING: it won't work in IE and it might slow down your browser a bit.

postcodes of northern ireland coloured by distance from hospital
Figure 1. Colour postcodes

In Figure 2. each postcode is coloured by its distance (straight line) to the nearest hospital, red is near, blue is far. The real thing is available here, WARNING: it won't work in IE and it might slow down your browser a bit. Distance calculations were done by PostGIS, I wrote a Perl script to convert Irish Grid x,y to lat/lon and then find the distance to the nearest hospital for each BT.

Both examples are rendered in browser using the Canvas tag from HTML5 and Processing.js/JavaScript.

I hope to get time to do something more useful that just some pretty images soon, and when I do I'll write up what I've done but for now this is just a quick look at the sort of thing can be done.

NINIS and NISRA both deserve plaudits for making all this data available, both are excellent resources.