Skip to content

Instantly share code, notes, and snippets.

@francisbarton
Last active February 4, 2020 12:20
Show Gist options
  • Save francisbarton/08e912377632d5c7f05d8e5263f1ff12 to your computer and use it in GitHub Desktop.
Save francisbarton/08e912377632d5c7f05d8e5263f1ff12 to your computer and use it in GitHub Desktop.
Making life hard for myself by trying to use the ONS Open Geography API

My mission: to programmatically analyse and map postcode-level fixed connectivity data for Harrogate district

I thought this would be quite a quick job.

  1. I knew that I had the postcode-level data from Ofcom
  2. I knew that I had a script for looking up latitude and longitude from a postcode, using Chris Bell's API
  3. I was pretty sure that a list of postcodes in the district would be downloadable from the ONS Open Geography Portal

The easiest thing to do would have been to work in Excel using manually downloaded data from websites. But I wanted to construct a script to retrieve, process and combine the data [programatically][] and [reproducibly][] and preferably [DRY][]-ly as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment