WhatfettleOne CSV, thirty stories: 18. Choropleth

This is day 18 of One CSV, 30 stories a series of articles exploring price paid data from the Land Registry found on GOV.UK. The code for this and the other articles is available as open source from GitHub

Following on from yesterday I wanted to create a choropleth map to show how prices are distributed across the country. A number of people have constructed shapefiles for postcodes which can be used in d3 but as discussed on day 13 the licensing of this data isn’t clear.

So I wrote a small Perl script to use the points in the OS OpenData™ Code-Point® Open dataset to place each price into one of 1024 squares on a 32×32 grid, then a used a small PHP template to present the average price of each square as a coloured grid on an HTML page. Re-running the script for each year also shows how property prices have heated up over time:



A choropleth map made without a map. I’ve an idea about iterating on this hack for tomorrow.