GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
ISO-3166-2 Administrative Division Code  XML
Forum Index -> Administrative Divisions
Author Message
chetta



Joined: 10/12/2008 19:19:58
Messages: 1
Offline

Where can I get (dump file or web service) the ISO-3166-2 Administrative division code for province/state?

As displayed here http://www.geonames.org/CA/administrative-division-canada.html (QC,BC,ON, etc) ISO-3166-2 column

Thank you.
marc



Joined: 08/12/2005 07:39:47
Messages: 3728
Offline

Hi

The ISO codes are not yet in the dump. We are working on it.

Best

Marc

[WWW]
aaronchi



Joined: 14/10/2009 20:07:21
Messages: 2
Offline

Any chance that this might happen some day soon???
marc



Joined: 08/12/2005 07:39:47
Messages: 3728
Offline

not in the next weeks. We simply don't have enough resources. Do you want to help?

Marc

[WWW]
aaronchi



Joined: 14/10/2009 20:07:21
Messages: 2
Offline

I will help if I can. I'm not sure what the issue is. I just want to have another column in the dump that specifies the ISO-3166-2 code if it exists. Maybe it can be put into the admin1CodesASCII.txt or even a new dump file?

What can I do to help?
bundini



Joined: 03/11/2009 05:01:00
Messages: 2
Offline

It should be possible to make it 90% there by cross referencing the information in:

http://www.commondatahub.com/live/geography/state_province_region/fips_states_codes

They have a primary key there.
They also maintain an iso code table (with the same pk).

Files are downloadable separately. I'm going to import a dump of their data and hack the two together into one table that has both fips and iso codes and report back.

bundini



Joined: 03/11/2009 05:01:00
Messages: 2
Offline

So here's the results of what I've done.

If you know some better data sources let me know. I've included a rapidly strewn together script that I used to generate this data. The CDH data referenced can be found online (not sure what the legality of me including it in the file would be).

The attached file contains "results.txt" which has the cross references between country, and administrative region 1 fips code, and administrative region 1 iso code. It's tab delimited so it should be easy to blow apart with your favorite scripting language to generate the sql required. I'd probably just create a nested associative array(PHP)/dictionary(Python) and use them to look up the iso code from the 2 letter country codes / fips codes we already have.
 Description [Disk] Download
 Filesize 28 Kbytes
 Downloaded:  613 time(s)

 
Forum Index -> Administrative Divisions
Go to:   
Powered by JForum 2.1.5 © JForum Team