data icon indicating copy to clipboard operation
data copied to clipboard

Ensure UK address formatting

Open mal-tee opened this issue 4 years ago • 7 comments

I've noticed that we don't format UK addresses consistently.

By searching https://github.com/datenanfragen/data/search?q=london you can find some addresses formatted like this:

Street name 1 City ZIPCODE

and some like this:

Street name 1 City ZIPCODE

Does this need fixing?

mal-tee avatar Jun 10 '21 14:06 mal-tee

Yeah, we should standardize that.

Unless I forget, I use:

Street name 1 City ZIPCODE

Iirc I decided on that a few years ago as it seemed to be the recommended format. But we should double-check that.

baltpeter avatar Jun 11 '21 09:06 baltpeter

This was fixed for the existing records by @davenewham in #1347. But I am leaving this issue open as I think we should implement a test for that to ensure we don't regress on this in future records.

We can just implement a special case for the UK in the tests. And given the standardised formatting we have agreed on, it shouldn't be hard to verify the city and postcode.

baltpeter avatar Oct 02 '21 09:10 baltpeter

Working on this and I have noticed that quite a few records contain the county. This is not needed https://www.postoffice.co.uk/mail/how-to-address-mail. Do we want to enforce the above format, and remove existing records' counties?

davenewham avatar Jan 03 '23 22:01 davenewham

Sounds good to me :+1:

mal-tee avatar Jan 03 '23 22:01 mal-tee

Just for clarification: In your link is "Locality name (if needed)" the county? Could there be a case where it is needed? (Sorry, I'm not familiar with UK addressing at all. :D)

I'll gladly defer to you on this: If you say that it's never needed, I'm fine with never including the county.

baltpeter avatar Jan 04 '23 12:01 baltpeter

Hey @baltpeter

Out of interest, I checked the updated version of the Royal Mail PAF Guidance.

Please see below.

Organisations PAF® holds the name of the Organisation. The maximum field length is 60 characters.

Organisation Name Building Name Thoroughfare Post Town Postcode

For example

Kath's Cakes Victoria House High Street PORTSMOUTH PO1 1AF

jarvisryan avatar Feb 17 '23 18:02 jarvisryan

Thanks, @Ryan4Reform. If I understand correctly, that means we don't need the county, as @davenewham said?

baltpeter avatar Mar 03 '23 11:03 baltpeter