Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

experimenting with UK ONSPD format #66

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

missinglink
Copy link
Member

@missinglink missinglink commented Jul 16, 2020

This PR adds support for the ONS Postcode Directory (ONSPD) for the United Kingdom
https://geoportal.statistics.gov.uk/datasets/ons-postcode-directory-may-2020

I was interested to see what the coverage was like and found out:

  • It's centroids only
  • 2,643,729 rows in the file, each is a valid UK postcode
  • Some of the rows have bunk coordinates

To use this importer, download the ONSPD_MAY_2020_UK.csv file from the link above and import it as such:

# import the whole file
cat ONSPD_MAY_2020_UK.csv | node bin/spatial.js import onspd

# import just the CSV header and postcodes starting with.. (for quick dev work)
cat ONSPD_MAY_2020_UK.csv | grep  -e 'ur01ind,oac01' -e '^"E8' | node bin/spatial.js import onspd

I had a quick play around with buffering the points to polygons and settled on a 0.001 radius, but this is obviously not an exact science.

Screenshot 2020-07-16 at 11 12 41

cc/ @vicchi

@vicchi
Copy link

vicchi commented Jul 16, 2020

@missinglink Also worth looking at OS CodePoint Open as well; ONS PD is updated more frequently but CodePoint Open is more authoritative IMHO. Sadly, as long as 👑 ✉️ maintain their tight hold on the UK PAF (and I don't see that changing anytime soon) and with Open Addresses UK and Free The Postcode both now defunct, this is as good as it's going to get without resorting to proprietary licensed data, which will cost and not be usable in an open form anyway by definition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants