Using GeoNames database does not provide the proper province_code, needing advice

Highlighted
New Member
1 0 0

My company is using the free database GeoNames http://www.geonames.org/ but one thing that we have found is that the admin1_code (which is the state/province code provided by the country itself which tends to be an ISO-3166-2 subdivision) but the province_code expected here is not the same. We cannot even go by the abbreviations for most regions because either none are provided or two character abbreviations are given but in some cases Shopify expects three character abbreviations. What advice does anyone have using freely available databases such as GeoNames?

 

Example:

Country: United States

State: Texas

Abbreviation given by GeoNames: TX

Shopify expects province_code to be: TX

GeoNames provides admin1_code: TX

 

Country: Mexico

State: Aguascalientes

Abbreviation given by GeoNames: AG

Shopify expect sprovince_code to be: AGS

GeoNames provides admin1_code: 01

 

Country: Canada

Province: British Columbia

Abbreviation given by GeoNames: BC

Shopify expects province_code to be: BC

GeoNames provides admin1_code: 02

 

Country: Japan

Prefecture: Hokkaido

Abbreviation given by GeoNames: none

Shopify expects province_code to be: JP-01

GeoNames provides admin1_code: 12

0 Likes