Code-Point Open is a dataset of UK postcodes. This script makes the dataset easier to use by denormalising it, concatenating the files, adding headers, and standardising some of the formatting.
Ensure you have Python 3.7+ installed on your machine.
pip3 install "git+https://github.com/timwis/code-point-open-transformer#egg=code-point-open-transformer"
Usage: codepointopen [OPTIONS] PACKAGE_DIR OUTPUT_DIR
Improve usability of Code-Point Open data and link to lookup files
This script does the following:
- For each set of regions in the "code list" files, outputs a
.csv
file to create a register from - Merges all the data files into
code-point-open.csv
- Converts all the linked values in the data files to CURIE format
- Formats the
postcode
column with a single space between outward and inward parts - Adds a
geometry
column that is a space-separated combination ofeastings
andnorthings