diff --git a/bower.json b/bower.json index db60951..154d9b3 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "Countries", - "version": "1.3.0", + "version": "1.3.1", "homepage": "http://annexare.github.io/Countries/", "author": { "name": "Dmytro", diff --git a/composer.json b/composer.json index dede2ab..afe785b 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "annexare/countries-list", - "version": "1.3.0", + "version": "1.3.1", "description": "Continents & countries: ISO 3166-1 alpha-2 code, name, languages, capital and currency, native name, calling codes. Available in JSON, CSV and SQL formats.", "type": "library", "keywords": [ diff --git a/countries.csv b/countries.csv index 2ca4d42..62aba32 100644 --- a/countries.csv +++ b/countries.csv @@ -1,250 +1,251 @@ -"Andorra","Andorra","376","Europe","Andorra la Vella","EUR","ca" -"United Arab Emirates","دولة الإمارات العربية المتحدة","971","Asia","Abu Dhabi","AED","ar" -"Afghanistan","افغانستان","93","Asia","Kabul","AFN","ps,uz,tk" -"Antigua and Barbuda","Antigua and Barbuda","1268","North America","Saint John's","XCD","en" -"Anguilla","Anguilla","1264","North America","The Valley","XCD","en" -"Albania","Shqipëria","355","Europe","Tirana","ALL","sq" -"Armenia","Հայաստան","374","Asia","Yerevan","AMD","hy,ru" -"Angola","Angola","244","Africa","Luanda","AOA","pt" -"Antarctica","Antarctica","","Antarctica","","","" -"Argentina","Argentina","54","South America","Buenos Aires","ARS","es,gn" -"American Samoa","American Samoa","1684","Oceania","Pago Pago","USD","en,sm" -"Austria","Österreich","43","Europe","Vienna","EUR","de" -"Australia","Australia","61","Oceania","Canberra","AUD","en" -"Aruba","Aruba","297","North America","Oranjestad","AWG","nl,pa" -"Åland","Åland","358","Europe","Mariehamn","EUR","sv" -"Azerbaijan","Azərbaycan","994","Asia","Baku","AZN","az,hy" -"Bosnia and Herzegovina","Bosna i Hercegovina","387","Europe","Sarajevo","BAM","bs,hr,sr" -"Barbados","Barbados","1246","North America","Bridgetown","BBD","en" -"Bangladesh","Bangladesh","880","Asia","Dhaka","BDT","bn" -"Belgium","België","32","Europe","Brussels","EUR","nl,fr,de" -"Burkina Faso","Burkina Faso","226","Africa","Ouagadougou","XOF","fr,ff" -"Bulgaria","България","359","Europe","Sofia","BGN","bg" -"Bahrain","‏البحرين","973","Asia","Manama","BHD","ar" -"Burundi","Burundi","257","Africa","Bujumbura","BIF","fr,rn" -"Benin","Bénin","229","Africa","Porto-Novo","XOF","fr" -"Saint Barthélemy","Saint-Barthélemy","590","North America","Gustavia","EUR","fr" -"Bermuda","Bermuda","1441","North America","Hamilton","BMD","en" -"Brunei","Negara Brunei Darussalam","673","Asia","Bandar Seri Begawan","BND","ms" -"Bolivia","Bolivia","591","South America","Sucre","BOB,BOV","es,ay,qu" -"Bonaire","Bonaire","5997","North America","Kralendijk","USD","nl" -"Brazil","Brasil","55","South America","Brasília","BRL","pt" -"Bahamas","Bahamas","1242","North America","Nassau","BSD","en" -"Bhutan","ʼbrug-yul","975","Asia","Thimphu","BTN,INR","dz" -"Bouvet Island","Bouvetøya","","Antarctica","","NOK","" -"Botswana","Botswana","267","Africa","Gaborone","BWP","en,tn" -"Belarus","Белару́сь","375","Europe","Minsk","BYR","be,ru" -"Belize","Belize","501","North America","Belmopan","BZD","en,es" -"Canada","Canada","1","North America","Ottawa","CAD","en,fr" -"Cocos [Keeling] Islands","Cocos (Keeling) Islands","61","Asia","West Island","AUD","en" -"Democratic Republic of the Congo","République démocratique du Congo","243","Africa","Kinshasa","CDF","fr,ln,kg,sw,lu" -"Central African Republic","Ködörösêse tî Bêafrîka","236","Africa","Bangui","XAF","fr,sg" -"Republic of the Congo","République du Congo","242","Africa","Brazzaville","XAF","fr,ln" -"Switzerland","Schweiz","41","Europe","Bern","CHE,CHF,CHW","de,fr,it" -"Ivory Coast","Côte d'Ivoire","225","Africa","Yamoussoukro","XOF","fr" -"Cook Islands","Cook Islands","682","Oceania","Avarua","NZD","en" -"Chile","Chile","56","South America","Santiago","CLF,CLP","es" -"Cameroon","Cameroon","237","Africa","Yaoundé","XAF","en,fr" -"China","中国","86","Asia","Beijing","CNY","zh" -"Colombia","Colombia","57","South America","Bogotá","COP","es" -"Costa Rica","Costa Rica","506","North America","San José","CRC","es" -"Cuba","Cuba","53","North America","Havana","CUC,CUP","es" -"Cape Verde","Cabo Verde","238","Africa","Praia","CVE","pt" -"Curacao","Curaçao","5999","North America","Willemstad","ANG","nl,pa,en" -"Christmas Island","Christmas Island","61","Asia","Flying Fish Cove","AUD","en" -"Cyprus","Κύπρος","357","Europe","Nicosia","EUR","el,tr,hy" -"Czech Republic","Česká republika","420","Europe","Prague","CZK","cs,sk" -"Germany","Deutschland","49","Europe","Berlin","EUR","de" -"Djibouti","Djibouti","253","Africa","Djibouti","DJF","fr,ar" -"Denmark","Danmark","45","Europe","Copenhagen","DKK","da" -"Dominica","Dominica","1767","North America","Roseau","XCD","en" -"Dominican Republic","República Dominicana","1809,1829,1849","North America","Santo Domingo","DOP","es" -"Algeria","الجزائر","213","Africa","Algiers","DZD","ar" -"Ecuador","Ecuador","593","South America","Quito","USD","es" -"Estonia","Eesti","372","Europe","Tallinn","EUR","et" -"Egypt","مصر‎","20","Africa","Cairo","EGP","ar" -"Western Sahara","الصحراء الغربية","212","Africa","El Aaiún","MAD,DZD,MRO","es" -"Eritrea","ኤርትራ","291","Africa","Asmara","ERN","ti,ar,en" -"Spain","España","34","Europe","Madrid","EUR","es,eu,ca,gl,oc" -"Ethiopia","ኢትዮጵያ","251","Africa","Addis Ababa","ETB","am" -"Finland","Suomi","358","Europe","Helsinki","EUR","fi,sv" -"Fiji","Fiji","679","Oceania","Suva","FJD","en,fj,hi,ur" -"Falkland Islands","Falkland Islands","500","South America","Stanley","FKP","en" -"Micronesia","Micronesia","691","Oceania","Palikir","USD","en" -"Faroe Islands","Føroyar","298","Europe","Tórshavn","DKK","fo" -"France","France","33","Europe","Paris","EUR","fr" -"Gabon","Gabon","241","Africa","Libreville","XAF","fr" -"United Kingdom","United Kingdom","44","Europe","London","GBP","en" -"Grenada","Grenada","1473","North America","St. George's","XCD","en" -"Georgia","საქართველო","995","Asia","Tbilisi","GEL","ka" -"French Guiana","Guyane française","594","South America","Cayenne","EUR","fr" -"Guernsey","Guernsey","44","Europe","St. Peter Port","GBP","en,fr" -"Ghana","Ghana","233","Africa","Accra","GHS","en" -"Gibraltar","Gibraltar","350","Europe","Gibraltar","GIP","en" -"Greenland","Kalaallit Nunaat","299","North America","Nuuk","DKK","kl" -"Gambia","Gambia","220","Africa","Banjul","GMD","en" -"Guinea","Guinée","224","Africa","Conakry","GNF","fr,ff" -"Guadeloupe","Guadeloupe","590","North America","Basse-Terre","EUR","fr" -"Equatorial Guinea","Guinea Ecuatorial","240","Africa","Malabo","XAF","es,fr" -"Greece","Ελλάδα","30","Europe","Athens","EUR","el" -"South Georgia and the South Sandwich Islands","South Georgia","500","Antarctica","King Edward Point","GBP","en" -"Guatemala","Guatemala","502","North America","Guatemala City","GTQ","es" -"Guam","Guam","1671","Oceania","Hagåtña","USD","en,ch,es" -"Guinea-Bissau","Guiné-Bissau","245","Africa","Bissau","XOF","pt" -"Guyana","Guyana","592","South America","Georgetown","GYD","en" -"Hong Kong","香港","852","Asia","City of Victoria","HKD","zh,en" -"Heard Island and McDonald Islands","Heard Island and McDonald Islands","","Antarctica","","AUD","en" -"Honduras","Honduras","504","North America","Tegucigalpa","HNL","es" -"Croatia","Hrvatska","385","Europe","Zagreb","HRK","hr" -"Haiti","Haïti","509","North America","Port-au-Prince","HTG,USD","fr,ht" -"Hungary","Magyarország","36","Europe","Budapest","HUF","hu" -"Indonesia","Indonesia","62","Asia","Jakarta","IDR","id" -"Ireland","Éire","353","Europe","Dublin","EUR","ga,en" -"Israel","יִשְׂרָאֵל","972","Asia","Jerusalem","ILS","he,ar" -"Isle of Man","Isle of Man","44","Europe","Douglas","GBP","en,gv" -"India","भारत","91","Asia","New Delhi","INR","hi,en" -"British Indian Ocean Territory","British Indian Ocean Territory","246","Asia","Diego Garcia","USD","en" -"Iraq","العراق","964","Asia","Baghdad","IQD","ar,ku" -"Iran","ایران","98","Asia","Tehran","IRR","fa" -"Iceland","Ísland","354","Europe","Reykjavik","ISK","is" -"Italy","Italia","39","Europe","Rome","EUR","it" -"Jersey","Jersey","44","Europe","Saint Helier","GBP","en,fr" -"Jamaica","Jamaica","1876","North America","Kingston","JMD","en" -"Jordan","الأردن","962","Asia","Amman","JOD","ar" -"Japan","日本","81","Asia","Tokyo","JPY","ja" -"Kenya","Kenya","254","Africa","Nairobi","KES","en,sw" -"Kyrgyzstan","Кыргызстан","996","Asia","Bishkek","KGS","ky,ru" -"Cambodia","Kâmpŭchéa","855","Asia","Phnom Penh","KHR","km" -"Kiribati","Kiribati","686","Oceania","South Tarawa","AUD","en" -"Comoros","Komori","269","Africa","Moroni","KMF","ar,fr" -"Saint Kitts and Nevis","Saint Kitts and Nevis","1869","North America","Basseterre","XCD","en" -"North Korea","북한","850","Asia","Pyongyang","KPW","ko" -"South Korea","대한민국","82","Asia","Seoul","KRW","ko" -"Kuwait","الكويت","965","Asia","Kuwait City","KWD","ar" -"Cayman Islands","Cayman Islands","1345","North America","George Town","KYD","en" -"Kazakhstan","Қазақстан","76,77","Asia","Astana","KZT","kk,ru" -"Laos","ສປປລາວ","856","Asia","Vientiane","LAK","lo" -"Lebanon","لبنان","961","Asia","Beirut","LBP","ar,fr" -"Saint Lucia","Saint Lucia","1758","North America","Castries","XCD","en" -"Liechtenstein","Liechtenstein","423","Europe","Vaduz","CHF","de" -"Sri Lanka","śrī laṃkāva","94","Asia","Colombo","LKR","si,ta" -"Liberia","Liberia","231","Africa","Monrovia","LRD","en" -"Lesotho","Lesotho","266","Africa","Maseru","LSL,ZAR","en,st" -"Lithuania","Lietuva","370","Europe","Vilnius","LTL","lt" -"Luxembourg","Luxembourg","352","Europe","Luxembourg","EUR","fr,de,lb" -"Latvia","Latvija","371","Europe","Riga","EUR","lv" -"Libya","‏ليبيا","218","Africa","Tripoli","LYD","ar" -"Morocco","المغرب","212","Africa","Rabat","MAD","ar" -"Monaco","Monaco","377","Europe","Monaco","EUR","fr" -"Moldova","Moldova","373","Europe","Chișinău","MDL","ro" -"Montenegro","Црна Гора","382","Europe","Podgorica","EUR","sr,bs,sq,hr" -"Saint Martin","Saint-Martin","590","North America","Marigot","EUR","en,fr,nl" -"Madagascar","Madagasikara","261","Africa","Antananarivo","MGA","fr,mg" -"Marshall Islands","M̧ajeļ","692","Oceania","Majuro","USD","en,mh" -"Macedonia","Македонија","389","Europe","Skopje","MKD","mk" -"Mali","Mali","223","Africa","Bamako","XOF","fr" -"Myanmar [Burma]","Myanma","95","Asia","Naypyidaw","MMK","my" -"Mongolia","Монгол улс","976","Asia","Ulan Bator","MNT","mn" -"Macao","澳門","853","Asia","","MOP","zh,pt" -"Northern Mariana Islands","Northern Mariana Islands","1670","Oceania","Saipan","USD","en,ch" -"Martinique","Martinique","596","North America","Fort-de-France","EUR","fr" -"Mauritania","موريتانيا","222","Africa","Nouakchott","MRO","ar" -"Montserrat","Montserrat","1664","North America","Plymouth","XCD","en" -"Malta","Malta","356","Europe","Valletta","EUR","mt,en" -"Mauritius","Maurice","230","Africa","Port Louis","MUR","en" -"Maldives","Maldives","960","Asia","Malé","MVR","dv" -"Malawi","Malawi","265","Africa","Lilongwe","MWK","en,ny" -"Mexico","México","52","North America","Mexico City","MXN","es" -"Malaysia","Malaysia","60","Asia","Kuala Lumpur","MYR","" -"Mozambique","Moçambique","258","Africa","Maputo","MZN","pt" -"Namibia","Namibia","264","Africa","Windhoek","NAD,ZAR","en,af" -"New Caledonia","Nouvelle-Calédonie","687","Oceania","Nouméa","XPF","fr" -"Niger","Niger","227","Africa","Niamey","XOF","fr" -"Norfolk Island","Norfolk Island","672","Oceania","Kingston","AUD","en" -"Nigeria","Nigeria","234","Africa","Abuja","NGN","en" -"Nicaragua","Nicaragua","505","North America","Managua","NIO","es" -"Netherlands","Nederland","31","Europe","Amsterdam","EUR","nl" -"Norway","Norge","47","Europe","Oslo","NOK","no,nb,nn" -"Nepal","नपल","977","Asia","Kathmandu","NPR","ne" -"Nauru","Nauru","674","Oceania","Yaren","AUD","en,na" -"Niue","Niuē","683","Oceania","Alofi","NZD","en" -"New Zealand","New Zealand","64","Oceania","Wellington","NZD","en,mi" -"Oman","عمان","968","Asia","Muscat","OMR","ar" -"Panama","Panamá","507","North America","Panama City","PAB,USD","es" -"Peru","Perú","51","South America","Lima","PEN","es" -"French Polynesia","Polynésie française","689","Oceania","Papeetē","XPF","fr" -"Papua New Guinea","Papua Niugini","675","Oceania","Port Moresby","PGK","en" -"Philippines","Pilipinas","63","Asia","Manila","PHP","en" -"Pakistan","Pakistan","92","Asia","Islamabad","PKR","en,ur" -"Poland","Polska","48","Europe","Warsaw","PLN","pl" -"Saint Pierre and Miquelon","Saint-Pierre-et-Miquelon","508","North America","Saint-Pierre","EUR","fr" -"Pitcairn Islands","Pitcairn Islands","64","Oceania","Adamstown","NZD","en" -"Puerto Rico","Puerto Rico","1787,1939","North America","San Juan","USD","es,en" -"Palestine","فلسطين","970","Asia","Ramallah","ILS","ar" -"Portugal","Portugal","351","Europe","Lisbon","EUR","pt" -"Palau","Palau","680","Oceania","Ngerulmud","USD","en" -"Paraguay","Paraguay","595","South America","Asunción","PYG","es,gn" -"Qatar","قطر","974","Asia","Doha","QAR","ar" -"Réunion","La Réunion","262","Africa","Saint-Denis","EUR","fr" -"Romania","România","40","Europe","Bucharest","RON","ro" -"Serbia","Србија","381","Europe","Belgrade","RSD","sr" -"Russia","Россия","7","Europe","Moscow","RUB","ru" -"Rwanda","Rwanda","250","Africa","Kigali","RWF","rw,en,fr" -"Saudi Arabia","العربية السعودية","966","Asia","Riyadh","SAR","ar" -"Solomon Islands","Solomon Islands","677","Oceania","Honiara","SBD","en" -"Seychelles","Seychelles","248","Africa","Victoria","SCR","fr,en" -"Sudan","السودان","249","Africa","Khartoum","SDG","ar,en" -"Sweden","Sverige","46","Europe","Stockholm","SEK","sv" -"Singapore","Singapore","65","Asia","Singapore","SGD","en,ms,ta,zh" -"Saint Helena","Saint Helena","290","Africa","Jamestown","SHP","en" -"Slovenia","Slovenija","386","Europe","Ljubljana","EUR","sl" -"Svalbard and Jan Mayen","Svalbard og Jan Mayen","4779","Europe","Longyearbyen","NOK","no" -"Slovakia","Slovensko","421","Europe","Bratislava","EUR","sk" -"Sierra Leone","Sierra Leone","232","Africa","Freetown","SLL","en" -"San Marino","San Marino","378","Europe","City of San Marino","EUR","it" -"Senegal","Sénégal","221","Africa","Dakar","XOF","fr" -"Somalia","Soomaaliya","252","Africa","Mogadishu","SOS","so,ar" -"Suriname","Suriname","597","South America","Paramaribo","SRD","nl" -"South Sudan","South Sudan","211","Africa","Juba","SSP","en" -"São Tomé and Príncipe","São Tomé e Príncipe","239","Africa","São Tomé","STD","pt" -"El Salvador","El Salvador","503","North America","San Salvador","SVC,USD","es" -"Sint Maarten","Sint Maarten","1721","North America","Philipsburg","ANG","nl,en" -"Syria","سوريا","963","Asia","Damascus","SYP","ar" -"Swaziland","Swaziland","268","Africa","Lobamba","SZL","en,ss" -"Turks and Caicos Islands","Turks and Caicos Islands","1649","North America","Cockburn Town","USD","en" -"Chad","Tchad","235","Africa","N'Djamena","XAF","fr,ar" -"French Southern Territories","Territoire des Terres australes et antarctiques fr","","Antarctica","Port-aux-Français","EUR","fr" -"Togo","Togo","228","Africa","Lomé","XOF","fr" -"Thailand","ประเทศไทย","66","Asia","Bangkok","THB","th" -"Tajikistan","Тоҷикистон","992","Asia","Dushanbe","TJS","tg,ru" -"Tokelau","Tokelau","690","Oceania","Fakaofo","NZD","en" -"East Timor","Timor-Leste","670","Oceania","Dili","USD","pt" -"Turkmenistan","Türkmenistan","993","Asia","Ashgabat","TMT","tk,ru" -"Tunisia","تونس","216","Africa","Tunis","TND","ar" -"Tonga","Tonga","676","Oceania","Nuku'alofa","TOP","en,to" -"Turkey","Türkiye","90","Asia","Ankara","TRY","tr" -"Trinidad and Tobago","Trinidad and Tobago","1868","North America","Port of Spain","TTD","en" -"Tuvalu","Tuvalu","688","Oceania","Funafuti","AUD","en" -"Taiwan","臺灣","886","Asia","Taipei","TWD","zh" -"Tanzania","Tanzania","255","Africa","Dodoma","TZS","sw,en" -"Ukraine","Україна","380","Europe","Kiev","UAH","uk" -"Uganda","Uganda","256","Africa","Kampala","UGX","en,sw" -"U.S. Minor Outlying Islands","United States Minor Outlying Islands","","Oceania","","USD","en" -"United States","United States","1","North America","Washington D.C.","USD,USN,USS","en" -"Uruguay","Uruguay","598","South America","Montevideo","UYI,UYU","es" -"Uzbekistan","O‘zbekiston","998","Asia","Tashkent","UZS","uz,ru" -"Vatican City","Vaticano","39066,379","Europe","Vatican City","EUR","it,la" -"Saint Vincent and the Grenadines","Saint Vincent and the Grenadines","1784","North America","Kingstown","XCD","en" -"Venezuela","Venezuela","58","South America","Caracas","VEF","es" -"British Virgin Islands","British Virgin Islands","1284","North America","Road Town","USD","en" -"U.S. Virgin Islands","United States Virgin Islands","1340","North America","Charlotte Amalie","USD","en" -"Vietnam","Việt Nam","84","Asia","Hanoi","VND","vi" -"Vanuatu","Vanuatu","678","Oceania","Port Vila","VUV","bi,en,fr" -"Wallis and Futuna","Wallis et Futuna","681","Oceania","Mata-Utu","XPF","fr" -"Samoa","Samoa","685","Oceania","Apia","WST","sm,en" -"Kosovo","Republika e Kosovës","377,381,386","Europe","Pristina","EUR","sq,sr" -"Yemen","اليَمَن","967","Asia","Sana'a","YER","ar" -"Mayotte","Mayotte","262","Africa","Mamoudzou","EUR","fr" -"South Africa","South Africa","27","Africa","Pretoria","ZAR","af,en,nr,st,ss,tn,ts,ve,xh,zu" -"Zambia","Zambia","260","Africa","Lusaka","ZMK","en" -"Zimbabwe","Zimbabwe","263","Africa","Harare","ZWL","en,sn,nd" +"Code","Name","Native","Phone","Continent","Capital","Currency","Languages" +"AD","Andorra","Andorra","376","Europe","Andorra la Vella","EUR","ca" +"AE","United Arab Emirates","دولة الإمارات العربية المتحدة","971","Asia","Abu Dhabi","AED","ar" +"AF","Afghanistan","افغانستان","93","Asia","Kabul","AFN","ps,uz,tk" +"AG","Antigua and Barbuda","Antigua and Barbuda","1268","North America","Saint John's","XCD","en" +"AI","Anguilla","Anguilla","1264","North America","The Valley","XCD","en" +"AL","Albania","Shqipëria","355","Europe","Tirana","ALL","sq" +"AM","Armenia","Հայաստան","374","Asia","Yerevan","AMD","hy,ru" +"AO","Angola","Angola","244","Africa","Luanda","AOA","pt" +"AQ","Antarctica","Antarctica","","Antarctica","","","" +"AR","Argentina","Argentina","54","South America","Buenos Aires","ARS","es,gn" +"AS","American Samoa","American Samoa","1684","Oceania","Pago Pago","USD","en,sm" +"AT","Austria","Österreich","43","Europe","Vienna","EUR","de" +"AU","Australia","Australia","61","Oceania","Canberra","AUD","en" +"AW","Aruba","Aruba","297","North America","Oranjestad","AWG","nl,pa" +"AX","Åland","Åland","358","Europe","Mariehamn","EUR","sv" +"AZ","Azerbaijan","Azərbaycan","994","Asia","Baku","AZN","az,hy" +"BA","Bosnia and Herzegovina","Bosna i Hercegovina","387","Europe","Sarajevo","BAM","bs,hr,sr" +"BB","Barbados","Barbados","1246","North America","Bridgetown","BBD","en" +"BD","Bangladesh","Bangladesh","880","Asia","Dhaka","BDT","bn" +"BE","Belgium","België","32","Europe","Brussels","EUR","nl,fr,de" +"BF","Burkina Faso","Burkina Faso","226","Africa","Ouagadougou","XOF","fr,ff" +"BG","Bulgaria","България","359","Europe","Sofia","BGN","bg" +"BH","Bahrain","‏البحرين","973","Asia","Manama","BHD","ar" +"BI","Burundi","Burundi","257","Africa","Bujumbura","BIF","fr,rn" +"BJ","Benin","Bénin","229","Africa","Porto-Novo","XOF","fr" +"BL","Saint Barthélemy","Saint-Barthélemy","590","North America","Gustavia","EUR","fr" +"BM","Bermuda","Bermuda","1441","North America","Hamilton","BMD","en" +"BN","Brunei","Negara Brunei Darussalam","673","Asia","Bandar Seri Begawan","BND","ms" +"BO","Bolivia","Bolivia","591","South America","Sucre","BOB,BOV","es,ay,qu" +"BQ","Bonaire","Bonaire","5997","North America","Kralendijk","USD","nl" +"BR","Brazil","Brasil","55","South America","Brasília","BRL","pt" +"BS","Bahamas","Bahamas","1242","North America","Nassau","BSD","en" +"BT","Bhutan","ʼbrug-yul","975","Asia","Thimphu","BTN,INR","dz" +"BV","Bouvet Island","Bouvetøya","","Antarctica","","NOK","" +"BW","Botswana","Botswana","267","Africa","Gaborone","BWP","en,tn" +"BY","Belarus","Белару́сь","375","Europe","Minsk","BYR","be,ru" +"BZ","Belize","Belize","501","North America","Belmopan","BZD","en,es" +"CA","Canada","Canada","1","North America","Ottawa","CAD","en,fr" +"CC","Cocos [Keeling] Islands","Cocos (Keeling) Islands","61","Asia","West Island","AUD","en" +"CD","Democratic Republic of the Congo","République démocratique du Congo","243","Africa","Kinshasa","CDF","fr,ln,kg,sw,lu" +"CF","Central African Republic","Ködörösêse tî Bêafrîka","236","Africa","Bangui","XAF","fr,sg" +"CG","Republic of the Congo","République du Congo","242","Africa","Brazzaville","XAF","fr,ln" +"CH","Switzerland","Schweiz","41","Europe","Bern","CHE,CHF,CHW","de,fr,it" +"CI","Ivory Coast","Côte d'Ivoire","225","Africa","Yamoussoukro","XOF","fr" +"CK","Cook Islands","Cook Islands","682","Oceania","Avarua","NZD","en" +"CL","Chile","Chile","56","South America","Santiago","CLF,CLP","es" +"CM","Cameroon","Cameroon","237","Africa","Yaoundé","XAF","en,fr" +"CN","China","中国","86","Asia","Beijing","CNY","zh" +"CO","Colombia","Colombia","57","South America","Bogotá","COP","es" +"CR","Costa Rica","Costa Rica","506","North America","San José","CRC","es" +"CU","Cuba","Cuba","53","North America","Havana","CUC,CUP","es" +"CV","Cape Verde","Cabo Verde","238","Africa","Praia","CVE","pt" +"CW","Curacao","Curaçao","5999","North America","Willemstad","ANG","nl,pa,en" +"CX","Christmas Island","Christmas Island","61","Asia","Flying Fish Cove","AUD","en" +"CY","Cyprus","Κύπρος","357","Europe","Nicosia","EUR","el,tr,hy" +"CZ","Czech Republic","Česká republika","420","Europe","Prague","CZK","cs,sk" +"DE","Germany","Deutschland","49","Europe","Berlin","EUR","de" +"DJ","Djibouti","Djibouti","253","Africa","Djibouti","DJF","fr,ar" +"DK","Denmark","Danmark","45","Europe","Copenhagen","DKK","da" +"DM","Dominica","Dominica","1767","North America","Roseau","XCD","en" +"DO","Dominican Republic","República Dominicana","1809,1829,1849","North America","Santo Domingo","DOP","es" +"DZ","Algeria","الجزائر","213","Africa","Algiers","DZD","ar" +"EC","Ecuador","Ecuador","593","South America","Quito","USD","es" +"EE","Estonia","Eesti","372","Europe","Tallinn","EUR","et" +"EG","Egypt","مصر‎","20","Africa","Cairo","EGP","ar" +"EH","Western Sahara","الصحراء الغربية","212","Africa","El Aaiún","MAD,DZD,MRO","es" +"ER","Eritrea","ኤርትራ","291","Africa","Asmara","ERN","ti,ar,en" +"ES","Spain","España","34","Europe","Madrid","EUR","es,eu,ca,gl,oc" +"ET","Ethiopia","ኢትዮጵያ","251","Africa","Addis Ababa","ETB","am" +"FI","Finland","Suomi","358","Europe","Helsinki","EUR","fi,sv" +"FJ","Fiji","Fiji","679","Oceania","Suva","FJD","en,fj,hi,ur" +"FK","Falkland Islands","Falkland Islands","500","South America","Stanley","FKP","en" +"FM","Micronesia","Micronesia","691","Oceania","Palikir","USD","en" +"FO","Faroe Islands","Føroyar","298","Europe","Tórshavn","DKK","fo" +"FR","France","France","33","Europe","Paris","EUR","fr" +"GA","Gabon","Gabon","241","Africa","Libreville","XAF","fr" +"GB","United Kingdom","United Kingdom","44","Europe","London","GBP","en" +"GD","Grenada","Grenada","1473","North America","St. George's","XCD","en" +"GE","Georgia","საქართველო","995","Asia","Tbilisi","GEL","ka" +"GF","French Guiana","Guyane française","594","South America","Cayenne","EUR","fr" +"GG","Guernsey","Guernsey","44","Europe","St. Peter Port","GBP","en,fr" +"GH","Ghana","Ghana","233","Africa","Accra","GHS","en" +"GI","Gibraltar","Gibraltar","350","Europe","Gibraltar","GIP","en" +"GL","Greenland","Kalaallit Nunaat","299","North America","Nuuk","DKK","kl" +"GM","Gambia","Gambia","220","Africa","Banjul","GMD","en" +"GN","Guinea","Guinée","224","Africa","Conakry","GNF","fr,ff" +"GP","Guadeloupe","Guadeloupe","590","North America","Basse-Terre","EUR","fr" +"GQ","Equatorial Guinea","Guinea Ecuatorial","240","Africa","Malabo","XAF","es,fr" +"GR","Greece","Ελλάδα","30","Europe","Athens","EUR","el" +"GS","South Georgia and the South Sandwich Islands","South Georgia","500","Antarctica","King Edward Point","GBP","en" +"GT","Guatemala","Guatemala","502","North America","Guatemala City","GTQ","es" +"GU","Guam","Guam","1671","Oceania","Hagåtña","USD","en,ch,es" +"GW","Guinea-Bissau","Guiné-Bissau","245","Africa","Bissau","XOF","pt" +"GY","Guyana","Guyana","592","South America","Georgetown","GYD","en" +"HK","Hong Kong","香港","852","Asia","City of Victoria","HKD","zh,en" +"HM","Heard Island and McDonald Islands","Heard Island and McDonald Islands","","Antarctica","","AUD","en" +"HN","Honduras","Honduras","504","North America","Tegucigalpa","HNL","es" +"HR","Croatia","Hrvatska","385","Europe","Zagreb","HRK","hr" +"HT","Haiti","Haïti","509","North America","Port-au-Prince","HTG,USD","fr,ht" +"HU","Hungary","Magyarország","36","Europe","Budapest","HUF","hu" +"ID","Indonesia","Indonesia","62","Asia","Jakarta","IDR","id" +"IE","Ireland","Éire","353","Europe","Dublin","EUR","ga,en" +"IL","Israel","יִשְׂרָאֵל","972","Asia","Jerusalem","ILS","he,ar" +"IM","Isle of Man","Isle of Man","44","Europe","Douglas","GBP","en,gv" +"IN","India","भारत","91","Asia","New Delhi","INR","hi,en" +"IO","British Indian Ocean Territory","British Indian Ocean Territory","246","Asia","Diego Garcia","USD","en" +"IQ","Iraq","العراق","964","Asia","Baghdad","IQD","ar,ku" +"IR","Iran","ایران","98","Asia","Tehran","IRR","fa" +"IS","Iceland","Ísland","354","Europe","Reykjavik","ISK","is" +"IT","Italy","Italia","39","Europe","Rome","EUR","it" +"JE","Jersey","Jersey","44","Europe","Saint Helier","GBP","en,fr" +"JM","Jamaica","Jamaica","1876","North America","Kingston","JMD","en" +"JO","Jordan","الأردن","962","Asia","Amman","JOD","ar" +"JP","Japan","日本","81","Asia","Tokyo","JPY","ja" +"KE","Kenya","Kenya","254","Africa","Nairobi","KES","en,sw" +"KG","Kyrgyzstan","Кыргызстан","996","Asia","Bishkek","KGS","ky,ru" +"KH","Cambodia","Kâmpŭchéa","855","Asia","Phnom Penh","KHR","km" +"KI","Kiribati","Kiribati","686","Oceania","South Tarawa","AUD","en" +"KM","Comoros","Komori","269","Africa","Moroni","KMF","ar,fr" +"KN","Saint Kitts and Nevis","Saint Kitts and Nevis","1869","North America","Basseterre","XCD","en" +"KP","North Korea","북한","850","Asia","Pyongyang","KPW","ko" +"KR","South Korea","대한민국","82","Asia","Seoul","KRW","ko" +"KW","Kuwait","الكويت","965","Asia","Kuwait City","KWD","ar" +"KY","Cayman Islands","Cayman Islands","1345","North America","George Town","KYD","en" +"KZ","Kazakhstan","Қазақстан","76,77","Asia","Astana","KZT","kk,ru" +"LA","Laos","ສປປລາວ","856","Asia","Vientiane","LAK","lo" +"LB","Lebanon","لبنان","961","Asia","Beirut","LBP","ar,fr" +"LC","Saint Lucia","Saint Lucia","1758","North America","Castries","XCD","en" +"LI","Liechtenstein","Liechtenstein","423","Europe","Vaduz","CHF","de" +"LK","Sri Lanka","śrī laṃkāva","94","Asia","Colombo","LKR","si,ta" +"LR","Liberia","Liberia","231","Africa","Monrovia","LRD","en" +"LS","Lesotho","Lesotho","266","Africa","Maseru","LSL,ZAR","en,st" +"LT","Lithuania","Lietuva","370","Europe","Vilnius","LTL","lt" +"LU","Luxembourg","Luxembourg","352","Europe","Luxembourg","EUR","fr,de,lb" +"LV","Latvia","Latvija","371","Europe","Riga","EUR","lv" +"LY","Libya","‏ليبيا","218","Africa","Tripoli","LYD","ar" +"MA","Morocco","المغرب","212","Africa","Rabat","MAD","ar" +"MC","Monaco","Monaco","377","Europe","Monaco","EUR","fr" +"MD","Moldova","Moldova","373","Europe","Chișinău","MDL","ro" +"ME","Montenegro","Црна Гора","382","Europe","Podgorica","EUR","sr,bs,sq,hr" +"MF","Saint Martin","Saint-Martin","590","North America","Marigot","EUR","en,fr,nl" +"MG","Madagascar","Madagasikara","261","Africa","Antananarivo","MGA","fr,mg" +"MH","Marshall Islands","M̧ajeļ","692","Oceania","Majuro","USD","en,mh" +"MK","Macedonia","Македонија","389","Europe","Skopje","MKD","mk" +"ML","Mali","Mali","223","Africa","Bamako","XOF","fr" +"MM","Myanmar [Burma]","Myanma","95","Asia","Naypyidaw","MMK","my" +"MN","Mongolia","Монгол улс","976","Asia","Ulan Bator","MNT","mn" +"MO","Macao","澳門","853","Asia","","MOP","zh,pt" +"MP","Northern Mariana Islands","Northern Mariana Islands","1670","Oceania","Saipan","USD","en,ch" +"MQ","Martinique","Martinique","596","North America","Fort-de-France","EUR","fr" +"MR","Mauritania","موريتانيا","222","Africa","Nouakchott","MRO","ar" +"MS","Montserrat","Montserrat","1664","North America","Plymouth","XCD","en" +"MT","Malta","Malta","356","Europe","Valletta","EUR","mt,en" +"MU","Mauritius","Maurice","230","Africa","Port Louis","MUR","en" +"MV","Maldives","Maldives","960","Asia","Malé","MVR","dv" +"MW","Malawi","Malawi","265","Africa","Lilongwe","MWK","en,ny" +"MX","Mexico","México","52","North America","Mexico City","MXN","es" +"MY","Malaysia","Malaysia","60","Asia","Kuala Lumpur","MYR","" +"MZ","Mozambique","Moçambique","258","Africa","Maputo","MZN","pt" +"NA","Namibia","Namibia","264","Africa","Windhoek","NAD,ZAR","en,af" +"NC","New Caledonia","Nouvelle-Calédonie","687","Oceania","Nouméa","XPF","fr" +"NE","Niger","Niger","227","Africa","Niamey","XOF","fr" +"NF","Norfolk Island","Norfolk Island","672","Oceania","Kingston","AUD","en" +"NG","Nigeria","Nigeria","234","Africa","Abuja","NGN","en" +"NI","Nicaragua","Nicaragua","505","North America","Managua","NIO","es" +"NL","Netherlands","Nederland","31","Europe","Amsterdam","EUR","nl" +"NO","Norway","Norge","47","Europe","Oslo","NOK","no,nb,nn" +"NP","Nepal","नपल","977","Asia","Kathmandu","NPR","ne" +"NR","Nauru","Nauru","674","Oceania","Yaren","AUD","en,na" +"NU","Niue","Niuē","683","Oceania","Alofi","NZD","en" +"NZ","New Zealand","New Zealand","64","Oceania","Wellington","NZD","en,mi" +"OM","Oman","عمان","968","Asia","Muscat","OMR","ar" +"PA","Panama","Panamá","507","North America","Panama City","PAB,USD","es" +"PE","Peru","Perú","51","South America","Lima","PEN","es" +"PF","French Polynesia","Polynésie française","689","Oceania","Papeetē","XPF","fr" +"PG","Papua New Guinea","Papua Niugini","675","Oceania","Port Moresby","PGK","en" +"PH","Philippines","Pilipinas","63","Asia","Manila","PHP","en" +"PK","Pakistan","Pakistan","92","Asia","Islamabad","PKR","en,ur" +"PL","Poland","Polska","48","Europe","Warsaw","PLN","pl" +"PM","Saint Pierre and Miquelon","Saint-Pierre-et-Miquelon","508","North America","Saint-Pierre","EUR","fr" +"PN","Pitcairn Islands","Pitcairn Islands","64","Oceania","Adamstown","NZD","en" +"PR","Puerto Rico","Puerto Rico","1787,1939","North America","San Juan","USD","es,en" +"PS","Palestine","فلسطين","970","Asia","Ramallah","ILS","ar" +"PT","Portugal","Portugal","351","Europe","Lisbon","EUR","pt" +"PW","Palau","Palau","680","Oceania","Ngerulmud","USD","en" +"PY","Paraguay","Paraguay","595","South America","Asunción","PYG","es,gn" +"QA","Qatar","قطر","974","Asia","Doha","QAR","ar" +"RE","Réunion","La Réunion","262","Africa","Saint-Denis","EUR","fr" +"RO","Romania","România","40","Europe","Bucharest","RON","ro" +"RS","Serbia","Србија","381","Europe","Belgrade","RSD","sr" +"RU","Russia","Россия","7","Europe","Moscow","RUB","ru" +"RW","Rwanda","Rwanda","250","Africa","Kigali","RWF","rw,en,fr" +"SA","Saudi Arabia","العربية السعودية","966","Asia","Riyadh","SAR","ar" +"SB","Solomon Islands","Solomon Islands","677","Oceania","Honiara","SBD","en" +"SC","Seychelles","Seychelles","248","Africa","Victoria","SCR","fr,en" +"SD","Sudan","السودان","249","Africa","Khartoum","SDG","ar,en" +"SE","Sweden","Sverige","46","Europe","Stockholm","SEK","sv" +"SG","Singapore","Singapore","65","Asia","Singapore","SGD","en,ms,ta,zh" +"SH","Saint Helena","Saint Helena","290","Africa","Jamestown","SHP","en" +"SI","Slovenia","Slovenija","386","Europe","Ljubljana","EUR","sl" +"SJ","Svalbard and Jan Mayen","Svalbard og Jan Mayen","4779","Europe","Longyearbyen","NOK","no" +"SK","Slovakia","Slovensko","421","Europe","Bratislava","EUR","sk" +"SL","Sierra Leone","Sierra Leone","232","Africa","Freetown","SLL","en" +"SM","San Marino","San Marino","378","Europe","City of San Marino","EUR","it" +"SN","Senegal","Sénégal","221","Africa","Dakar","XOF","fr" +"SO","Somalia","Soomaaliya","252","Africa","Mogadishu","SOS","so,ar" +"SR","Suriname","Suriname","597","South America","Paramaribo","SRD","nl" +"SS","South Sudan","South Sudan","211","Africa","Juba","SSP","en" +"ST","São Tomé and Príncipe","São Tomé e Príncipe","239","Africa","São Tomé","STD","pt" +"SV","El Salvador","El Salvador","503","North America","San Salvador","SVC,USD","es" +"SX","Sint Maarten","Sint Maarten","1721","North America","Philipsburg","ANG","nl,en" +"SY","Syria","سوريا","963","Asia","Damascus","SYP","ar" +"SZ","Swaziland","Swaziland","268","Africa","Lobamba","SZL","en,ss" +"TC","Turks and Caicos Islands","Turks and Caicos Islands","1649","North America","Cockburn Town","USD","en" +"TD","Chad","Tchad","235","Africa","N'Djamena","XAF","fr,ar" +"TF","French Southern Territories","Territoire des Terres australes et antarctiques fr","","Antarctica","Port-aux-Français","EUR","fr" +"TG","Togo","Togo","228","Africa","Lomé","XOF","fr" +"TH","Thailand","ประเทศไทย","66","Asia","Bangkok","THB","th" +"TJ","Tajikistan","Тоҷикистон","992","Asia","Dushanbe","TJS","tg,ru" +"TK","Tokelau","Tokelau","690","Oceania","Fakaofo","NZD","en" +"TL","East Timor","Timor-Leste","670","Oceania","Dili","USD","pt" +"TM","Turkmenistan","Türkmenistan","993","Asia","Ashgabat","TMT","tk,ru" +"TN","Tunisia","تونس","216","Africa","Tunis","TND","ar" +"TO","Tonga","Tonga","676","Oceania","Nuku'alofa","TOP","en,to" +"TR","Turkey","Türkiye","90","Asia","Ankara","TRY","tr" +"TT","Trinidad and Tobago","Trinidad and Tobago","1868","North America","Port of Spain","TTD","en" +"TV","Tuvalu","Tuvalu","688","Oceania","Funafuti","AUD","en" +"TW","Taiwan","臺灣","886","Asia","Taipei","TWD","zh" +"TZ","Tanzania","Tanzania","255","Africa","Dodoma","TZS","sw,en" +"UA","Ukraine","Україна","380","Europe","Kiev","UAH","uk" +"UG","Uganda","Uganda","256","Africa","Kampala","UGX","en,sw" +"UM","U.S. Minor Outlying Islands","United States Minor Outlying Islands","","Oceania","","USD","en" +"US","United States","United States","1","North America","Washington D.C.","USD,USN,USS","en" +"UY","Uruguay","Uruguay","598","South America","Montevideo","UYI,UYU","es" +"UZ","Uzbekistan","O‘zbekiston","998","Asia","Tashkent","UZS","uz,ru" +"VA","Vatican City","Vaticano","39066,379","Europe","Vatican City","EUR","it,la" +"VC","Saint Vincent and the Grenadines","Saint Vincent and the Grenadines","1784","North America","Kingstown","XCD","en" +"VE","Venezuela","Venezuela","58","South America","Caracas","VEF","es" +"VG","British Virgin Islands","British Virgin Islands","1284","North America","Road Town","USD","en" +"VI","U.S. Virgin Islands","United States Virgin Islands","1340","North America","Charlotte Amalie","USD","en" +"VN","Vietnam","Việt Nam","84","Asia","Hanoi","VND","vi" +"VU","Vanuatu","Vanuatu","678","Oceania","Port Vila","VUV","bi,en,fr" +"WF","Wallis and Futuna","Wallis et Futuna","681","Oceania","Mata-Utu","XPF","fr" +"WS","Samoa","Samoa","685","Oceania","Apia","WST","sm,en" +"XK","Kosovo","Republika e Kosovës","377,381,386","Europe","Pristina","EUR","sq,sr" +"YE","Yemen","اليَمَن","967","Asia","Sana'a","YER","ar" +"YT","Mayotte","Mayotte","262","Africa","Mamoudzou","EUR","fr" +"ZA","South Africa","South Africa","27","Africa","Pretoria","ZAR","af,en,nr,st,ss,tn,ts,ve,xh,zu" +"ZM","Zambia","Zambia","260","Africa","Lusaka","ZMK","en" +"ZW","Zimbabwe","Zimbabwe","263","Africa","Harare","ZWL","en,sn,nd" diff --git a/gulpfile.js b/gulpfile.js index 78a1a52..524c271 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -2,11 +2,15 @@ const NAME = 'countries', + COMMA = '","', LF = "\n", + QUOTE = '"', + DO_CSV = 'csv', DO_MIN = 'min', DO_MINIMAL = 'minimal', DO_SQL = 'sql', + JSON_EXT = 'json', fs = require('fs'), gulp = require('gulp'), @@ -14,12 +18,15 @@ const gulp.task(DO_CSV, function (callback) { const continents = data.continents; - const countryList = getCountryList(); - const csvData = countryList.map(country => { - const countryData = Object.assign({}, country); - countryData.continent = continents[country.continent]; - - return '"' + objectValues(countryData).join('","') + '"'; + const countryList = Object.keys(data.countries); + const csvHeader = QUOTE + 'Code' + COMMA + + Object.keys(data.countries.UA).map(key => titleCase(key)).join(COMMA) + + QUOTE; + const csvData = csvHeader + LF + countryList.map(code => { + const country = Object.assign({}, data.countries[code]); + country.continent = continents[country.continent]; + + return QUOTE + code + COMMA + objectValues(country).join(COMMA) + QUOTE; }).join(LF); fs.writeFile(`./${NAME}.${DO_CSV}`, csvData + LF, callback); @@ -112,10 +119,13 @@ function objectValues(item) { return Object.keys(item) .map(key => item[key]); } -function getCountryList() { - return objectValues(data.countries); +function titleCase(str) { + str = str.toLowerCase().split(' '); + for (var i = 0; i < str.length; i++) { + str[i] = str[i].charAt(0).toUpperCase() + str[i].slice(1); + } + return str.join(' '); } - function sqlHeader(table, fields) { let lines = [ 'DROP TABLE IF EXISTS `' + table + '`;', diff --git a/package.json b/package.json index 878b132..75a25b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "countries-list", - "version": "1.3.0", + "version": "1.3.1", "description": "Continents & countries: ISO 3166-1 alpha-2 code, name, languages, capital and currency, native name, calling codes. Available in JSON, CSV and SQL formats.", "main": "countries.json", "repository": {