This list was made using ONDAS and AddressBase. Here's a rough giude to how it was made:
- Get ONSAD
- Get a CSV file with
UPRN,Postcode
, I got this from the AddressBase - Install
csvkit
- Remove all the columns in ONSAD that we don't care about (we only want the 'LAD' column):
cat ../ONSAD_JAN_2017/Data/*.csv | csvcut -c 1,3 > uprn_lad.csv
- We now have two CSV files, each with two columns. One
UPRN,postcode
the otherUPRN,LAD
. - Run
join.py
to join the two files in to a single file with 3 columns - Make a file with
postcode,lad
:cat joined.csv | csvcut -c 3,2 > postcode_lad.csv
- Filter out duplicate rows:
sort -u postcode_lad.csv> unique_rows.csv