Plotting leaked postcode data

Using the leaked post­code data that turned up on WikiLeaks:

UK gov­ern­ment data­base of all 1,841,177 UK post­codes together with lat­i­tude and lon­gi­tude, grid ref­er­ences, county, dis­trict, ward, NHS codes and regions, Ord­nance Sur­vey ref­er­ence, and date of intro­duc­tion. The data­base was last updated on July 8, 2009 and is over 100,000 pages in size.

You may be aware that in Sep­tem­ber 2009 this file appeared on Wik­iLeaks, at the time I thought lit­tle of it until I stum­bled across an inter­est­ing post by Paul BattleyNR1 Postcodes

He plot­ted his local postal dis­trict in alphanu­meric order using JavaScript and the HTML5 can­vas ele­ment sup­ported in most mod­ern browsers (you need not apply if using Inter­net Explorer). The whole process is done by using a Ruby script and a dataset in CSV for­mat that has been processed with dos2unix.

My main rea­son behind ask­ing Paul for the source was to have a try myself and in ret­ro­spect upon find­ing it to be Ruby based, as a prac­ti­cal method to help me bet­ter under­stand Ruby and how it works.

Click the image to view the ani­ma­tion. Bare in mind if you use any­thing such as NoScript you will need to allow my domain for the ani­ma­tion to work.

I may have a play around with new datasets, and alter­ing the colours at a later date. For now I have plot­ted NR1 with Paul’s orig­i­nal set­tings.