sshaw / normalize_country

Convert country names and codes to a standard.
67 stars 8 forks source link

ISO_3166-1_alpha-2 BQ (Bonaire, Sint Eustatius and Saba) is missing #7

Open jorbie opened 4 years ago

jorbie commented 4 years ago

found another missing country code:

NormalizeCountry("BQ")
 => nil 

https://en.wikipedia.org/wiki/ISO_3166-2:BQ

and thanks again for all the previous fixes :)

sshaw commented 4 years ago

You're always finding issues related to Dutch islands in the (Lesser) Antilles 😂

The library supports ISO 3166-1. This is for 3166-2, which is for provinces/territories.

I'm not opposed to supporting 3166-2, but it brings up some questions.

1. They're not (always) countries. For example, in the US we have 50 states. If I were to say: NormalizeCountry("S. Carolina") I would expect it to return nil since the great state of South Carolina is not a country.

2. If one says: NormalizeCountry("Georgia") do we return the great US state of Georgia or the home of Borjomi water and Georgian BBQ: Georgia, the country in the Caucasus?

Does this mean we have a different interface for 3166-2?

3. There are a ton of provinces/territories in the standard. Bonaire is 1 of 100s. Add it would be a wee bit of work.