theodi/uk-postcodes — pull request #30 by danielmbarlow (2014-05-19 16:27:33+00:00)
Title: More than 5 miles => Postcode areas

Hi ODI team,

You are welcome to pull these changes if you so desire. Here is a quick summary of what I have tried to achieve:

#Enable the use of the service for more than 5 miles of data
... by using postcode areas instead of actual postcodes.
The resulting data set contains the postcode area in the postcode field, and the latlng field is a calculated as the centroid of the accumulated post code points, and enables postcode areas. Of course if that sounds like a too much extra load on the server you could always choose not to include the following commit:
https://github.com/danielmbarlow/uk-postcodes/commit/8a3162eca1f41266d93db0c482ea5a24c9f02ba1

An alternative to that approach may have been to find a way to import postcode areas from a CSV file supplied by OS, but I didn't look into that for too long.

#Make a smaller data set available for developers
Importing the whole data set took a long time on my virtual machine, so I set up a few test fixtures

#Fixed an error message
It was being raised when you click the N3 link at the bottom of the the 'nearest' page. Fixed here:
https://github.com/danielmbarlow/uk-postcodes/commit/695d98a5731504858951581463c7f5f2edbfd6b0

#Outstanding issue
If the service returns a postcode area, you can still click on it's link in the 'Postcodes within x miles of ...' screen, but you will get a 404 error.

Open to any suggestions you might like to make.

Best Regards,

Daniel