Skip to content

Commit 127ffc3

Browse files
committed
Update CSV fields to reflect latest ONSPD release
Some of the CSV field names in the ONS Postcode Directory have changed as of the August 2025 release.
1 parent 66f61c1 commit 127ffc3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

onsdb/onsdb.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ type PostcodeData struct {
1818
Longitude string `csv:"long"`
1919
Inception string `csv:"dointr"`
2020
Cessation string `csv:"doterm"`
21-
CountryCode string `csv:"ctry"`
22-
RegionCode string `csv:"rgn"`
23-
CountyCode string `csv:"oscty"`
24-
DistrictCode string `csv:"oslaua"`
25-
PositionalQuality string `csv:"osgrdind"`
21+
CountryCode string `csv:"ctry25cd"`
22+
RegionCode string `csv:"rgn25cd"`
23+
CountyCode string `csv:"cty25cd"`
24+
DistrictCode string `csv:"lad25cd"`
25+
PositionalQuality string `csv:"gridind"`
2626
}
2727

2828
// ONSDB is a wrapper around an SQLite database containing the ONS Poscode Directory

0 commit comments

Comments
 (0)