Commit 1f89f74f authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Add synonyms in the countries definition.

parent 1bb25059
......@@ -2,9 +2,9 @@
""" countries
List of countries extract from the geographical database www.geonames.org:
"""
from countries import COUNTRIES
for el in COUNTRIES:
dbui.get_create_id(db.countries, country=el)
dbui.get_create_id(db.countries, country=el[0], synonyms=el[1])
......@@ -2,264 +2,270 @@
""" countries
List of countries extract from the geographical database www.geonames.org:
1. get the file C{countryInfo.txt}
from U{http://download.geonames.org/export/dump/}
1. get the file *countryInfo.txt*
from http://download.geonames.org/export/dump/
2. open the file with libreoffice calc
and remove all columns but the country names
and remove all columns but the country names, ISO, ISO3,
ISO-Numeric and fips.
3. The synonyms column concatenate ISO, ISO3, ISO-Numeric and fips/
Extract in Nov. 2014
Add synonyms in Oct 2015
"""
COUNTRIES = ['Andorra',
'United Arab Emirates',
'Afghanistan',
'Antigua and Barbuda',
'Anguilla',
'Albania',
'Armenia',
'Angola',
'Antarctica',
'Argentina',
'American Samoa',
'Austria',
'Australia',
'Aruba',
'Aland Islands',
'Azerbaijan',
'Bosnia and Herzegovina',
'Barbados',
'Bangladesh',
'Belgium',
'Burkina Faso',
'Bulgaria',
'Bahrain',
'Burundi',
'Benin',
'Saint Barthelemy',
'Bermuda',
'Brunei',
'Bolivia',
'Bonaire',
'Brazil',
'Bahamas',
'Bhutan',
'Bouvet Island',
'Botswana',
'Belarus',
'Belize',
'Canada',
'Cocos Islands',
'Democratic Republic of the Congo',
'Central African Republic',
'Republic of the Congo',
'Switzerland',
'Ivory Coast',
'Cook Islands',
'Chile',
'Cameroon',
'China',
'Colombia',
'Costa Rica',
'Cuba',
'Cape Verde',
'Curacao',
'Christmas Island',
'Cyprus',
'Czech Republic',
'Germany',
'Djibouti',
'Denmark',
'Dominica',
'Dominican Republic',
'Algeria',
'Ecuador',
'Estonia',
'Egypt',
'Western Sahara',
'Eritrea',
'Spain',
'Ethiopia',
'Finland',
'Fiji',
'Falkland Islands',
'Micronesia',
'Faroe Islands',
'France',
'Gabon',
'United Kingdom',
'Grenada',
'Georgia',
'French Guiana',
'Guernsey',
'Ghana',
'Gibraltar',
'Greenland',
'Gambia',
'Guinea',
'Guadeloupe',
'Equatorial Guinea',
'Greece',
'South Georgia and the South Sandwich Islands',
'Guatemala',
'Guam',
'Guinea-Bissau',
'Guyana',
'Hong Kong',
'Heard Island and McDonald Islands',
'Honduras',
'Croatia',
'Haiti',
'Hungary',
'Indonesia',
'Ireland',
'Israel',
'Isle of Man',
'India',
'British Indian Ocean Territory',
'Iraq',
'Iran',
'Iceland',
'Italy',
'Jersey',
'Jamaica',
'Jordan',
'Japan',
'Kenya',
'Kyrgyzstan',
'Cambodia',
'Kiribati',
'Comoros',
'Saint Kitts and Nevis',
'North Korea',
'South Korea',
'Kosovo',
'Kuwait',
'Cayman Islands',
'Kazakhstan',
'Laos',
'Lebanon',
'Saint Lucia',
'Liechtenstein',
'Sri Lanka',
'Liberia',
'Lesotho',
'Lithuania',
'Luxembourg',
'Latvia',
'Libya',
'Morocco',
'Monaco',
'Moldova',
'Montenegro',
'Saint Martin',
'Madagascar',
'Marshall Islands',
'Macedonia',
'Mali',
'Myanmar',
'Mongolia',
'Macao',
'Northern Mariana Islands',
'Martinique',
'Mauritania',
'Montserrat',
'Malta',
'Mauritius',
'Maldives',
'Malawi',
'Mexico',
'Malaysia',
'Mozambique',
'Namibia',
'New Caledonia',
'Niger',
'Norfolk Island',
'Nigeria',
'Nicaragua',
'Netherlands',
'Norway',
'Nepal',
'Nauru',
'Niue',
'New Zealand',
'Oman',
'Panama',
'Peru',
'French Polynesia',
'Papua New Guinea',
'Philippines',
'Pakistan',
'Poland',
'Saint Pierre and Miquelon',
'Pitcairn',
'Puerto Rico',
'Palestinian Territory',
'Portugal',
'Palau',
'Paraguay',
'Qatar',
'Reunion',
'Romania',
'Serbia',
'Russia',
'Rwanda',
'Saudi Arabia',
'Solomon Islands',
'Seychelles',
'Sudan',
'South Sudan',
'Sweden',
'Singapore',
'Saint Helena',
'Slovenia',
'Svalbard and Jan Mayen',
'Slovakia',
'Sierra Leone',
'San Marino',
'Senegal',
'Somalia',
'Suriname',
'Sao Tome and Principe',
'El Salvador',
'Sint Maarten',
'Syria',
'Swaziland',
'Turks and Caicos Islands',
'Chad',
'French Southern Territories',
'Togo',
'Thailand',
'Tajikistan',
'Tokelau',
'East Timor',
'Turkmenistan',
'Tunisia',
'Tonga',
'Turkey',
'Trinidad and Tobago',
'Tuvalu',
'Taiwan',
'Tanzania',
'Ukraine',
'Uganda',
'United States Minor Outlying Islands',
'United States',
'Uruguay',
'Uzbekistan',
'Vatican',
'Saint Vincent and the Grenadines',
'Venezuela',
'British Virgin Islands',
'U.S. Virgin Islands',
'Vietnam',
'Vanuatu',
'Wallis and Futuna',
'Samoa',
'Yemen',
'Mayotte',
'South Africa',
'Zambia',
'Zimbabwe',
'Serbia and Montenegro',
'Netherlands Antilles']
COUNTRIES = [('Afghanistan', 'AF, AFG, 4, AF'),
('Aland Islands', 'AX, ALA, 248, '),
('Albania', 'AL, ALB, 8, AL'),
('Algeria', 'DZ, DZA, 12, AG'),
('American Samoa', 'AS, ASM, 16, AQ'),
('Andorra', 'AD, AND, 20, AN'),
('Angola', 'AO, AGO, 24, AO'),
('Anguilla', 'AI, AIA, 660, AV'),
('Antarctica', 'AQ, ATA, 10, AY'),
('Antigua and Barbuda', 'AG, ATG, 28, AC'),
('Argentina', 'AR, ARG, 32, AR'),
('Armenia', 'AM, ARM, 51, AM'),
('Aruba', 'AW, ABW, 533, AA'),
('Australia', 'AU, AUS, 36, AS'),
('Austria', 'AT, AUT, 40, AU'),
('Azerbaijan', 'AZ, AZE, 31, AJ'),
('Bahamas', 'BS, BHS, 44, BF'),
('Bahrain', 'BH, BHR, 48, BA'),
('Bangladesh', 'BD, BGD, 50, BG'),
('Barbados', 'BB, BRB, 52, BB'),
('Belarus', 'BY, BLR, 112, BO'),
('Belgium', 'BE, BEL, 56, BE'),
('Belize', 'BZ, BLZ, 84, BH'),
('Benin', 'BJ, BEN, 204, BN'),
('Bermuda', 'BM, BMU, 60, BD'),
('Bhutan', 'BT, BTN, 64, BT'),
('Bolivia', 'BO, BOL, 68, BL'),
('Bonaire', 'BQ, BES, 535'),
('Bosnia and Herzegovina', 'BA, BIH, 70, BK'),
('Botswana', 'BW, BWA, 72, BC'),
('Bouvet Island', 'BV, BVT, 74, BV'),
('Brazil', 'BR, BRA, 76, BR'),
('British Indian Ocean Territory', 'IO, IOT, 86, IO'),
('British Virgin Islands', 'VG, VGB, 92, VI'),
('Brunei', 'BN, BRN, 96, BX'),
('Bulgaria', 'BG, BGR, 100, BU'),
('Burkina Faso', 'BF, BFA, 854, UV'),
('Burundi', 'BI, BDI, 108, BY'),
('Cambodia', 'KH, KHM, 116, CB'),
('Cameroon', 'CM, CMR, 120, CM'),
('Canada', 'CA, CAN, 124, CA'),
('Cape Verde', 'CV, CPV, 132, CV'),
('Cayman Islands', 'KY, CYM, 136, CJ'),
('Central African Republic', 'CF, CAF, 140, CT'),
('Chad', 'TD, TCD, 148, CD'),
('Chile', 'CL, CHL, 152, CI'),
('China', 'CN, CHN, 156, CH'),
('Christmas Island', 'CX, CXR, 162, KT'),
('Cocos Islands', 'CC, CCK, 166, CK'),
('Colombia', 'CO, COL, 170, CO'),
('Comoros', 'KM, COM, 174, CN'),
('Cook Islands', 'CK, COK, 184, CW'),
('Costa Rica', 'CR, CRI, 188, CS'),
('Croatia', 'HR, HRV, 191, HR'),
('Cuba', 'CU, CUB, 192, CU'),
('Curacao', 'CW, CUW, 531, UC'),
('Cyprus', 'CY, CYP, 196, CY'),
('Czech Republic', 'CZ, CZE, 203, EZ'),
('Democratic Republic of the Congo', 'CD, COD, 180, CG'),
('Denmark', 'DK, DNK, 208, DA'),
('Djibouti', 'DJ, DJI, 262, DJ'),
('Dominica', 'DM, DMA, 212, DO'),
('Dominican Republic', 'DO, DOM, 214, DR'),
('East Timor', 'TL, TLS, 626, TT'),
('Ecuador', 'EC, ECU, 218, EC'),
('Egypt', 'EG, EGY, 818, EG'),
('El Salvador', 'SV, SLV, 222, ES'),
('Equatorial Guinea', 'GQ, GNQ, 226, EK'),
('Eritrea', 'ER, ERI, 232, ER'),
('Estonia', 'EE, EST, 233, EN'),
('Ethiopia', 'ET, ETH, 231, ET'),
('Falkland Islands', 'FK, FLK, 238, FK'),
('Faroe Islands', 'FO, FRO, 234, FO'),
('Fiji', 'FJ, FJI, 242, FJ'),
('Finland', 'FI, FIN, 246, FI'),
('France', 'FR, FRA, 250, FR'),
('French Guiana', 'GF, GUF, 254, FG'),
('French Polynesia', 'PF, PYF, 258, FP'),
('French Southern Territories', 'TF, ATF, 260, FS'),
('Gabon', 'GA, GAB, 266, GB'),
('Gambia', 'GM, GMB, 270, GA'),
('Georgia', 'GE, GEO, 268, GG'),
('Germany', 'DE, DEU, 276, GM'),
('Ghana', 'GH, GHA, 288, GH'),
('Gibraltar', 'GI, GIB, 292, GI'),
('Greece', 'GR, GRC, 300, GR'),
('Greenland', 'GL, GRL, 304, GL'),
('Grenada', 'GD, GRD, 308, GJ'),
('Guadeloupe', 'GP, GLP, 312, GP'),
('Guam', 'GU, GUM, 316, GQ'),
('Guatemala', 'GT, GTM, 320, GT'),
('Guernsey', 'GG, GGY, 831, GK'),
('Guinea', 'GN, GIN, 324, GV'),
('Guinea-Bissau', 'GW, GNB, 624, PU'),
('Guyana', 'GY, GUY, 328, GY'),
('Haiti', 'HT, HTI, 332, HA'),
('Heard Island and McDonald Islands', 'HM, HMD, 334, HM'),
('Honduras', 'HN, HND, 340, HO'),
('Hong Kong', 'HK, HKG, 344, HK'),
('Hungary', 'HU, HUN, 348, HU'),
('Iceland', 'IS, ISL, 352, IC'),
('India', 'IN, IND, 356, IN'),
('Indonesia', 'ID, IDN, 360, ID'),
('Iran', 'IR, IRN, 364, IR'),
('Iraq', 'IQ, IRQ, 368, IZ'),
('Ireland', 'IE, IRL, 372, EI'),
('Isle of Man', 'IM, IMN, 833, IM'),
('Israel', 'IL, ISR, 376, IS'),
('Italy', 'IT, ITA, 380, IT'),
('Ivory Coast', 'CI, CIV, 384, IV'),
('Jamaica', 'JM, JAM, 388, JM'),
('Japan', 'JP, JPN, 392, JA'),
('Jersey', 'JE, JEY, 832, JE'),
('Jordan', 'JO, JOR, 400, JO'),
('Kazakhstan', 'KZ, KAZ, 398, KZ'),
('Kenya', 'KE, KEN, 404, KE'),
('Kiribati', 'KI, KIR, 296, KR'),
('Kosovo', 'XK, XKX, 0, KV'),
('Kuwait', 'KW, KWT, 414, KU'),
('Kyrgyzstan', 'KG, KGZ, 417, KG'),
('Laos', 'LA, LAO, 418, LA'),
('Latvia', 'LV, LVA, 428, LG'),
('Lebanon', 'LB, LBN, 422, LE'),
('Lesotho', 'LS, LSO, 426, LT'),
('Liberia', 'LR, LBR, 430, LI'),
('Libya', 'LY, LBY, 434, LY'),
('Liechtenstein', 'LI, LIE, 438, LS'),
('Lithuania', 'LT, LTU, 440, LH'),
('Luxembourg', 'LU, LUX, 442, LU'),
('Macao', 'MO, MAC, 446, MC'),
('Macedonia', 'MK, MKD, 807, MK'),
('Madagascar', 'MG, MDG, 450, MA'),
('Malawi', 'MW, MWI, 454, MI'),
('Malaysia', 'MY, MYS, 458, MY'),
('Maldives', 'MV, MDV, 462, MV'),
('Mali', 'ML, MLI, 466, ML'),
('Malta', 'MT, MLT, 470, MT'),
('Marshall Islands', 'MH, MHL, 584, RM'),
('Martinique', 'MQ, MTQ, 474, MB'),
('Mauritania', 'MR, MRT, 478, MR'),
('Mauritius', 'MU, MUS, 480, MP'),
('Mayotte', 'YT, MYT, 175, MF'),
('Mexico', 'MX, MEX, 484, MX'),
('Micronesia', 'FM, FSM, 583, FM'),
('Moldova', 'MD, MDA, 498, MD'),
('Monaco', 'MC, MCO, 492, MN'),
('Mongolia', 'MN, MNG, 496, MG'),
('Montenegro', 'ME, MNE, 499, MJ'),
('Montserrat', 'MS, MSR, 500, MH'),
('Morocco', 'MA, MAR, 504, MO'),
('Mozambique', 'MZ, MOZ, 508, MZ'),
('Myanmar', 'MM, MMR, 104, BM'),
('Namibia', 'NA, NAM, 516, WA'),
('Nauru', 'NR, NRU, 520, NR'),
('Nepal', 'NP, NPL, 524, NP'),
('Netherlands', 'NL, NLD, 528, NL'),
('Netherlands Antilles', 'AN, ANT, 530, NT'),
('New Caledonia', 'NC, NCL, 540, NC'),
('New Zealand', 'NZ, NZL, 554, NZ'),
('Nicaragua', 'NI, NIC, 558, NU'),
('Niger', 'NE, NER, 562, NG'),
('Nigeria', 'NG, NGA, 566, NI'),
('Niue', 'NU, NIU, 570, NE'),
('Norfolk Island', 'NF, NFK, 574, NF'),
('North Korea', 'KP, PRK, 408, KN'),
('Northern Mariana Islands', 'MP, MNP, 580, CQ'),
('Norway', 'NO, NOR, 578, NO'),
('Oman', 'OM, OMN, 512, MU'),
('Pakistan', 'PK, PAK, 586, PK'),
('Palau', 'PW, PLW, 585, PS'),
('Palestinian Territory', 'PS, PSE, 275, WE'),
('Panama', 'PA, PAN, 591, PM'),
('Papua New Guinea', 'PG, PNG, 598, PP'),
('Paraguay', 'PY, PRY, 600, PA'),
('Peru', 'PE, PER, 604, PE'),
('Philippines', 'PH, PHL, 608, RP'),
('Pitcairn', 'PN, PCN, 612, PC'),
('Poland', 'PL, POL, 616, PL'),
('Portugal', 'PT, PRT, 620, PO'),
('Puerto Rico', 'PR, PRI, 630, RQ'),
('Qatar', 'QA, QAT, 634, QA'),
('Republic of the Congo', 'CG, COG, 178, CF'),
('Reunion', 'RE, REU, 638, RE'),
('Romania', 'RO, ROU, 642, RO'),
('Russia', 'RU, RUS, 643, RS'),
('Rwanda', 'RW, RWA, 646, RW'),
('Saint Barthelemy', 'BL, BLM, 652, TB'),
('Saint Helena', 'SH, SHN, 654, SH'),
('Saint Kitts and Nevis', 'KN, KNA, 659, SC'),
('Saint Lucia', 'LC, LCA, 662, ST'),
('Saint Martin', 'MF, MAF, 663, RN'),
('Saint Pierre and Miquelon', 'PM, SPM, 666, SB'),
('Saint Vincent and the Grenadines', 'VC, VCT, 670, VC'),
('Samoa', 'WS, WSM, 882, WS'),
('San Marino', 'SM, SMR, 674, SM'),
('Sao Tome and Principe', 'ST, STP, 678, TP'),
('Saudi Arabia', 'SA, SAU, 682, SA'),
('Senegal', 'SN, SEN, 686, SG'),
('Serbia', 'RS, SRB, 688, RI'),
('Serbia and Montenegro', 'CS, SCG, 891, YI'),
('Seychelles', 'SC, SYC, 690, SE'),
('Sierra Leone', 'SL, SLE, 694, SL'),
('Singapore', 'SG, SGP, 702, SN'),
('Sint Maarten', 'SX, SXM, 534, NN'),
('Slovakia', 'SK, SVK, 703, LO'),
('Slovenia', 'SI, SVN, 705, SI'),
('Solomon Islands', 'SB, SLB, 90, BP'),
('Somalia', 'SO, SOM, 706, SO'),
('South Africa', 'ZA, ZAF, 710, SF'),
('South Georgia and the South Sandwich Islands', 'GS, SGS, 239, SX'),
('South Korea', 'KR, KOR, 410, KS'),
('South Sudan', 'SS, SSD, 728, OD'),
('Spain', 'ES, ESP, 724, SP'),
('Sri Lanka', 'LK, LKA, 144, CE'),
('Sudan', 'SD, SDN, 729, SU'),
('Suriname', 'SR, SUR, 740, NS'),
('Svalbard and Jan Mayen', 'SJ, SJM, 744, SV'),
('Swaziland', 'SZ, SWZ, 748, WZ'),
('Sweden', 'SE, SWE, 752, SW'),
('Switzerland', 'CH, CHE, 756, SZ'),
('Syria', 'SY, SYR, 760, SY'),
('Taiwan', 'TW, TWN, 158, TW'),
('Tajikistan', 'TJ, TJK, 762, TI'),
('Tanzania', 'TZ, TZA, 834, TZ'),
('Thailand', 'TH, THA, 764, TH'),
('Togo', 'TG, TGO, 768, TO'),
('Tokelau', 'TK, TKL, 772, TL'),
('Tonga', 'TO, TON, 776, TN'),
('Trinidad and Tobago', 'TT, TTO, 780, TD'),
('Tunisia', 'TN, TUN, 788, TS'),
('Turkey', 'TR, TUR, 792, TU'),
('Turkmenistan', 'TM, TKM, 795, TX'),
('Turks and Caicos Islands', 'TC, TCA, 796, TK'),
('Tuvalu', 'TV, TUV, 798, TV'),
('U.S. Virgin Islands', 'VI, VIR, 850, VQ'),
('Uganda', 'UG, UGA, 800, UG'),
('Ukraine', 'UA, UKR, 804, UP'),
('United Arab Emirates', 'AE, ARE, 784, AE'),
('United Kingdom', 'GB, GBR, 826, UK'),
('United States', 'US, USA, 840, US'),
('United States Minor Outlying Islands', 'UM, UMI, 581'),
('Uruguay', 'UY, URY, 858, UY'),
('Uzbekistan', 'UZ, UZB, 860, UZ'),
('Vanuatu', 'VU, VUT, 548, NH'),
('Vatican', 'VA, VAT, 336, VT'),
('Venezuela', 'VE, VEN, 862, VE'),
('Vietnam', 'VN, VNM, 704, VM'),
('Wallis and Futuna', 'WF, WLF, 876, WF'),
('Western Sahara', 'EH, ESH, 732, WI'),
('Yemen', 'YE, YEM, 887, YM'),
('Zambia', 'ZM, ZMB, 894, ZA'),
('Zimbabwe', 'ZW, ZWE, 716, ZI')]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment