| Author |
Message |
|
|
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.
|
 |
|
|
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.
|
 |
|
|