samayo / country-json

A simple data of the world by country each in JSON format.
https://data.world/samayo
MIT License
1.07k stars 805 forks source link

Discussion #229

Closed samayo closed 3 months ago

samayo commented 2 years ago

Hello, this is to discuss about new major change to the repo.

I am trying to remove most countries not recognized by UN. Currently, there are 248 countries in this repo, but the UN recognizes only 193 of them, so this will be a big change.

Other than that, I will fill all data for each country (so, no null or empty values)

All data will be also automated (to be updated each week whenever something changes in the source like wikipedia)

Let me know if you like to keep this repo as per the UN recognized countries only

samayo commented 1 year ago

@kennarddh

I think it's better to use 7 (007) as the others seem to be extensions

https://countrycode.org/russia

kennarddh commented 1 year ago

@kennarddh

I think it's better to use 7 (007) as the others seem to be extensions

https://countrycode.org/russia

image

Kazakhstan Also uses 7

image

And also this

samayo commented 1 year ago

Yes the two first countries are not officially recognised.

Let's use 7 for Russia until something changes

kennarddh commented 1 year ago

Yes the two first countries are not officially recognised.

Let's use 7 for Russia until something changes

image

And for this?

samayo commented 1 year ago

1242

The Bahamas is an independent country but uses the US calling code +1 and extension 242

So we should use the full calling code 242

kennarddh commented 1 year ago

1242

The Bahamas is an independent country but uses the US calling code +1 and extension 242

So we should use the full calling code 242

Its not consistent.

@samayo how to parse it if its not consistent?

samayo commented 1 year ago

In that case let's use the value as seen as in Wikipedia, just the way it is written

1 (variation 1, variation 2)

This is harder than I thought but this is the right thing to do imo

samayo commented 1 year ago

In that case let's use the value as seen as in Wikipedia, just the way it is written

1 (variation 1, variation 2)

This is harder than I thought but this is the right thing to do imo

Another question is should we include 00 or + or just nothing as the prefix, I say to include 001

So a JSON entry for US should be 001 For the Bahamas 001 (x, y,)

kennarddh commented 1 year ago

So use string instead of number @samayo?

And should we pad the x and y with 00?

And for russia should we leave it like x (y-z, c, d)

samayo commented 1 year ago

Good question, yes we should use string but we should not pad x, y with with 00 because then it would mean 00100424

kennarddh commented 1 year ago

Good question, yes we should use string but we should not pad x, y with with 00 because then it would mean 00100424

isn't it should be 00x if x is 1 char?

0x if x is 2 chars

and x if its more than 2 chars

And russia will be 007 (1–5, 8, 9)

samayo commented 3 months ago

closing as no update needed