countries-states-cities-database icon indicating copy to clipboard operation
countries-states-cities-database copied to clipboard

For countries, `phone_code` sometimes include area code and sometimes does not.

Open MaybeThisIsRu opened this issue 2 years ago • 1 comments

For example, for the US, the phone code is 1 which is correct if we consider country codes.

For the Dominican Republic, the phone code in the countries-states-cities-database is listed as 1809 and 1829 which is correct if we consider country+area codes. Country code being 1 and area codes being 809 and 829 (and also 849, but that's besides the point right now).

What methodology is being used? Can we rename phone_code to correctly reflect if the field means country_code or country_area_code?

MaybeThisIsRu avatar Jun 13 '22 09:06 MaybeThisIsRu

@MaybeThisIsRu Thanks for reporting. 🎉

This column is messed up actually, Previously I took data from this resource https://restcountries.com/v2/all

They've updated the calling codes to be more accurate now. So I will soon update them as per the new version. https://restcountries.com/v3.1/all

dr5hn avatar Jun 17 '22 05:06 dr5hn