mysociety / uk_local_authority_names_and_codes

Data and lookups between different kinds of local authority
https://mysociety.github.io/uk_local_authority_names_and_codes/
MIT License
8 stars 3 forks source link

alt-names field comma separation #9

Open drkane opened 4 months ago

drkane commented 4 months ago

The alt-names field within the CSV and JSON versions of UK Local Authorities including Future is comma separated, but some of the council names themselves contain commas. This creates ambiguities.

For example, the alt-names for council ABC (Armagh City, Banbridge and Craigavon) are given as "Armagh City, Banbridge and Craigavon,armagh city, banbridge and craigavon,armagh, banbridge and craigavon"

This should parse into:

But instead splitting by comma produces:

A work around is to only split on commas where they are not followed by a space.

ajparsons commented 4 months ago

Hmm, in retrospect it should be pipe separated - but I don't want to just switch because that will break scripts based on that.

Might introduce a new alt-names-pipe-separated column, with a mind to eventually deprecating the other column.