Getting the street name for a UPRN

Blog main page RSS icon

I was complaining recently about the poor state of UPRN data. But it turns out I was mostly wrong and the problem was my poor research abilities (or things have changed for the better recently). A Disqus conversation led me to this page which provides the links between different identifiers.

These are all CSV files that can be imported into your favourite database. To get the street name of a UPRN, we need to download the UPRN -> USRN links file. Once we've got the USRN, we need to download the Road TOID -> USRN links file. Once we've got the TOID, we can link to the street name using the OS Open Names download (it's probably also possible to do this using the OS Open Roads download but that's a bit more difficult to process).

We're still not able to construct an open version of PAF but we are slowly creeping closer towards that. 

So I've pulled all that data into this site and started displaying it in a couple of places (like here and here) but I'm keen to hear suggestions for other potential uses for this data e.g. all the roads in a postcode area/district/sector, all the postcodes for a road. 

One thing to note. The OS provides a UPRN dataset and the ONS also provides a UPRN dataset. The OS version doesn't include postcodes but the ONS version does so is likely to be somewhat more useful.

Update - I'm not convinced the data provided in the linked identifiers is completely accurate. I noticed some strange results for some roads, so tried re-importing using the RoadLink TOID rather than the USRN (there's a useful diagram in this document that shows how everything links together). That gave better results but still not entirely accurate, this postcode shows two properties on the wrong street. I guess it's better than nothing but you're probably still better off purchasing PAF currently

Update 2 - Since I still wasn't happy with the results I was getting, I returned to the USRN to road TOID links and tried a different approach. The basic problem we have to deal with is that a single USRN can map to multiple road TOIDs. Most of these TOIDs aren't related to the USRN other than they intersect it. So I summed the distance from each UPRN to the centre point of each TOID. I'm now assuming the TOID that has the lowest value for this calculation is the TOID of interest. So far the results seem sensible. Let me know if you spot any oddities

Tagged: Postcodes