countries icon indicating copy to clipboard operation
countries copied to clipboard

Adding GB Subdivisions Per ISO 3166-2:GB

Open rubengmurray opened this issue 4 years ago • 7 comments

I have a use case for England, Scotland, Wales & Northern Ireland to be identified individually rather than blanket 'GB' attribution.

I note that this was mentioned quite a while ago in https://github.com/mledoze/countries/issues/6#issuecomment-27485840 but can't see there's been any discussion since...

@mledoze I'd be happy to contribute. Sounds like there were some hierarchy changes suggested for implementation, were they started? Did you have any thoughts on this specific issue? Could we put them at the top-level and retain shared information across the 4?

rubengmurray avatar Sep 29 '19 13:09 rubengmurray

Hello @rubengmurray thank you for bringing up this issue again. It is time that we provide a clean solution to it.

I'd be happy to contribute. Sounds like there were some hierarchy changes suggested for implementation, were they started?

Yes there were, but no work was made on this subject. Your contribution is more than welcome! As you can see—with my delay to answer you—I lack the time to implement all the ideas I have for this project, especially this one.

There are two subjects here:

  1. add GB subdivisions per ISO 3166-2:GB, which would basically mean to implement ISO 3166-2 for all countries because it would not make sense to do it for only one country

  2. refactor the implementation of countries.json into separate files

If you are willing to contribute, I would prefer to start with 2. since it is something that I have wanted for a long time. Once it is done, I think we will be in a better position to start thinking about 1..

What do you think?

mledoze avatar Dec 21 '19 15:12 mledoze

I may be able to help with this.

I have compiled a set of files containing subdivision information for each country, but I stalled when trying to come up with a way of structuring the hierarchy of data. I think it might be better to just have a flat list for each country.

I agree that adding this information would greatly increase the size of the file and should probably be split into separate files.

I need the information for a project due in January/February of the new year, so I should be able to help in the near future.

jjlharrison avatar Dec 21 '19 15:12 jjlharrison

Hi @mledoze

@jjlharrison what did you end up doing for your project?

Splitting them out into separate files is probably a good idea. I've knocked something up on a separate branch splitting the json out and I'm happy to push to this repo to share and work on if you're still interested? I don't have a ton of time either but can share the load on a branch or two.

Cheers

rubengmurray avatar Mar 03 '20 20:03 rubengmurray

Initial split: https://github.com/rubengmurray/countries/tree/individual-files/country-data

rubengmurray avatar Mar 14 '20 21:03 rubengmurray

Hello @rubengmurray thank you for your work, yes I am still interested!

I have looked at your branch on your fork. I would like to change some things:

  • I would prefer that we use the existing data directory
  • since all files in the data directory are already named with the ISO 3166-1 alpha-3 country code, I propose the following directory structure:
data
├── gbr
│   ├── gbr.country.json
│   ├── gbr.geo.json
│   ├── gbr.svg
│   └── gbr.topo.json
├── fra
│   ├── fra.country.json
│   ├── fra.geo.json
│   ├── fra.svg
│   └── fra.topo.json

What do you think? You said that you don't have a lot of time, I could continue your work if you want.

I will also need to update the build code to accommodate these changes.

mledoze avatar Apr 10 '20 13:04 mledoze

Sounds good to me - I think this is it:

https://github.com/mledoze/countries/pull/393

Maybe we can merge this PR into a separate branch on this repo so you can do the build work?

Cheers

rubengmurray avatar Apr 15 '20 19:04 rubengmurray

@mledoze any appetite for https://github.com/mledoze/countries/pull/393 ?

Seems to have a few merge conflicts now... may be best to close if not part of the plans for the repo?

rubengmurray avatar Mar 26 '21 20:03 rubengmurray