Questions tagged [iso-3166]

A standard published by ISO that defines codes for the names of countries, dependent territories, special areas of geographical interest, and their principal subdivisions (e.g., provinces or states). The official name of the standard is "Codes for the representation of names of countries and their subdivisions".

It consists of three parts:

  • ISO 3166-1, Codes for the representation of names of countries and their subdivisions – Part 1: Country codes, defines codes for the names of countries, dependent territories, and special areas of geographical interest. It defines three sets of country codes:
    • ISO 3166-1 alpha-2 – two-letter country codes which are the most widely used of the three, and used most prominently for the Internet's country code top-level domains (with a few exceptions).
    • ISO 3166-1 alpha-3 – three-letter country codes which allow a better visual association between the codes and the country names than the alpha-2 codes.
    • ISO 3166-1 numeric – three-digit country codes which are identical to those developed and maintained by the United Nations Statistics Division, with the advantage of script (writing system) independence, and hence useful for people or systems using non-Latin scripts.
  • ISO 3166-2, Codes for the representation of names of countries and their subdivisions – Part 2: Country subdivision code, defines codes for the names of the principal subdivisions (e.g., provinces or states) of all countries coded in ISO 3166-1.
  • ISO 3166-3, Codes for the representation of names of countries and their subdivisions – Part 3: Code for formerly used names of countries, defines codes for country names which have been deleted from ISO 3166-1 since its first publication in 1974.
37 questions
2
votes
1 answer

Fetch ISO-3166-2 code from Google Maps API. Is it possible?

I need to match locations recorded with their coordinates (latitude/longitude) to the visitor's selection from an interactive map using region codes (ISO-3166-2). Anyone has a take on this please? Not too sure how to go about it and/or if it's…
FusionDesign
  • 353
  • 1
  • 4
  • 13
2
votes
2 answers

How to find ISD code from ISO 3166 code?

I want to show ISO 3166 country code and its ISD code in list Like: ind +91 irq +964 ita +39 With the help of java.util.Locale I have got all ISO 3166 country codes but now I want ISD codes of every country.
DCoder
  • 3,486
  • 7
  • 36
  • 68
2
votes
1 answer

Mapping ISO-3166-1 country codes to phone number prefix

I am looking for the best way of translating country codes to phone number prefixes. For example, SE should map to +46, NO to +47, etc. Any open source java library out there that does the job ?
Jan-Olav Eide
  • 403
  • 1
  • 6
  • 17
2
votes
3 answers

ISO 3166-1 alpha-2 comma separated values

http://www.iso.org/iso/country_names_and_code_elements has "VIRGIN ISLANDS, BRITISH". I would've thought the country is called "British Virgin Islands'. Am I looking at the wrong place for country names? And yes, this is a programming question, I…
chx
  • 11,270
  • 7
  • 55
  • 129
1
vote
1 answer

Retrieving Country (ISO 3166-1) and Region (ISO 3166-2) codes from address (using existing web services)

Are there any web services or DBs available that will be able to return the ISO 3166-1 and ISO 3166-2 (Country & region) codes given a particular address or latitude/longitude coordinates? I'm currently using the Google Geocode API in a PHP app, and…
Prembo
  • 2,256
  • 2
  • 30
  • 50
1
vote
2 answers

ISO3166 not importing method properly -Pycharm

Anyone know why this is not working properly. According to https://pypi.org/project/iso3166/ this should work. from iso3166 import countries Get following error: ImportError: cannot import name 'countries' from 'iso3166'
kosh66
  • 60
  • 4
1
vote
3 answers

How do I get the country name from a given ISO-3166-1 alpha-2 code in Python?

I want the user to input a ISO-3166-1 alpha-2 code. country_code = input("Please enter a country's two-letter code (e.g. FR, US) :") I then want to translate the code into the country's name: FR -> France US -> United States of…
Akyna
  • 67
  • 1
  • 8
1
vote
1 answer

How to get a country's official name from a Java Locale?

In ISO-3166, when it comes to the country, there is a difference between "short name" and "full name". For example, Denmark (link to iso.org reference : https://www.iso.org/obp/ui/#iso:code:3166:DK). Its country code would be DK and DNK (alpha-2 and…
1
vote
0 answers

How to retrieve or enumerate ISO-3166 numeric codes?

With EnumSystemLocalesEx I can enumerate supported countries and get the ISO-3166-Alpha 2 code. With GetLocaleInfoEx I can retrieve the language name and the ISO-3166-Alpha 3 code. The list of information I can get does not contain the ISO-3166…
xMRi
  • 14,982
  • 3
  • 26
  • 59
1
vote
2 answers

NetSuite data import with country code?

Question for the NetSuite experts: Before my time, my current company decided to move to NetSuite. I'm being asked to retrieve customer data from our in-house SaaS and reformat it for import to NetSuite. Our NetSuite consultant says the customer…
1
vote
3 answers

Determining customary distance unit from ISO 3166 country code

ISO 3166 defines country codes such as GB, US, FR or RU. I would like a reasonably definitive association from these country codes to the customary unit of measure for distances between places in those countries. Specifically on iOS and OS X, the…
Benjohn
  • 13,228
  • 9
  • 65
  • 127
1
vote
3 answers

Country name to ISO 3166-1 alpha 2 code

I have a country name like Australia and I would like to get the ISO 3166-1 alpha 2 code like AU in this case. Is there a way to easily do this in .NET?
Sachin Kainth
  • 45,256
  • 81
  • 201
  • 304
0
votes
1 answer

How to convert coordinates or addresses to ISO 3166 codes

while trying to analyse some data i ran into a problem where i am supposed to convert some locations to their iso3166 equivalence so as to make a need Choropleth map of the data but converting the data has seem to be a hassle sorry that i have not…
nkdtech
  • 33
  • 2
0
votes
2 answers

How to convert country names to ISO 3166-1 alpha-2 values in arm template

I have an ARM-template and I would like convert country name like "United States" and I would like to get the ISO 3166-1 alpha 2 code like "US". This converted value I would use for name of resource group. I tryed use condicion "if", but this…
0
votes
1 answer

Change Location information related with Country to "ISO_3166-2:ES" code

I am using HERE API to search for a request that gives me a Location dta object giving latitude and longitude. I am receiving Country information in "ISO_3166-1_alpha-3", which is ISO by default. What I need in my code is to distinguiss between…