Sunday, 5 March 2017

New Postcodes

I have thought about a tool to see what postcodes have been added recently for a while, so now I've finally got around to looking at it. The UK Office of National Statistics provide all kind of open data under the Open Government Licence and one of these is a list of postcode centroids for Great Britain. The dataset includes the date a postcode was added. 

When an area is quite well mapped it needs to be kept up-to-date. A mapper may have visited somewhere to map it when it's not normally somewhere she might visit, so any new developments might not get mapped as it is built. These new developments all get new postcodes, so showing a map with all the recently added postcodes might help mappers find places that need another survey.

I've put together a map that shows all of the postcodes added since the beginning of 2016. You can see it here http://pcdates.raggedred.net/#10/52.7159/-1.3149.  There would be quite a lot of markers in some areas so I use the excellent MarkerCluster plugin to make the markers more manageable. Each marker is a single centroid. If you click on it it shows a popup with the postcode and start date in it. 

If it is useful please let me know what you think. Would you like anything changed? If people like it I will maintain it as each new release of postcode data  id available, which is currently four times each year.

4 comments:

Unknown said...

Thanks for creating this. Looks rather useful.

Could have a slider to be "show me new postcodes since date x", and even a which postcodes have been removed?

Chris Hill said...

Thanks Shaun,
To show when a postcode has expired would mean loading about a million more records. I could do it but I don't want to affect the performance of the other postcode features. I'll experiment first.

Offering a slider to select the age range is something I'm experimenting with right now. It becomes easy to request massive amounts of data that stalls the process. I think the way round it is to only request & show postcodes for a small area, i.e. high zoom levels, which is what I do with the postcode overlay for editors. I'll show low zoom levels to move around the map then people can zoom in to show the postcodes.

I think colour-coded icons might help with the age profile too. This might be a way to display expired codes too.

Anonymous said...

Hi Chris, do you have this data in an excel format that can be downloaded too? i.e. Postcodes, date added, lat long. Also, I tried to find the list of postcodes and the date it's added in ONS but failed miserably. Can you share the link where you've got this data?

And how do you know the exact location of the postcodes? Is the lat long from ONS too?

Chris Hill said...

The ONS postcode file can be hard to find, especially as it has moved more than once. searching (Google) for ONSPD came up with the Open Geography portal http://geoportal.statistics.gov.uk/

That currently has ONS Postcode Directory (Feb 2018) in the list. Open that and click the download link.

That gives a zip file and buried in the directory structure in that zip file is the full list of postcodes and a separate file explaining, briefly, what all the columns mean. This is a comma separated values format file (CSV) that should import into Excel (not tested).

The location is based on the Ordnance Survey grid reference in the file. I use this to convert to Lon / Lat ('cos OSM overlays work best with Lon / Lat) using proj4 library in Python.

HTH