Last active
May 22, 2022 09:42
-
-
Save michalskop/001f6182db52d08f4925 to your computer and use it in GitHub Desktop.
EU map: leaflet, topojson
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"bn": {"population": "408786", "region": "Asia", "id": "bn", "name": "Brunei Darussalam", "sub-region": "South-Eastern Asia", "latitude": "4.5", "longitude": "114.666666667", "code": "bn"}, "us": {"population": "313847465", "region": "Americas", "id": "us", "name": "United States", "sub-region": "Northern America", "latitude": "38", "longitude": "-97", "code": "us"}, "cx": {"population": "1496", "region": "", "id": "cx", "name": "Christmas Island", "sub-region": "", "latitude": "-10.5", "longitude": "105.666666667", "code": "cx"}, "li": {"population": "36713", "region": "Europe", "id": "li", "name": "Liechtenstein", "sub-region": "Western Europe", "latitude": "47.2666666667", "longitude": "9.5333333333", "code": "li"}, "la": {"population": "6586266", "region": "Asia", "id": "la", "name": "Lao People's Democratic Republic", "sub-region": "South-Eastern Asia", "latitude": "18", "longitude": "105", "code": "la"}, "pn": {"population": "48", "region": "Oceania", "id": "pn", "name": "Pitcairn", "sub-region": "Polynesia", "latitude": "-25.0666666667", "longitude": "-130.1", "code": "pn"}, "za": {"population": "48810427", "region": "Africa", "id": "za", "name": "South Africa", "sub-region": "Southern Africa", "latitude": "-29", "longitude": "24", "code": "za"}, "no": {"population": "4707270", "region": "Europe", "id": "no", "name": "Norway", "sub-region": "Northern Europe", "latitude": "62", "longitude": "10", "code": "no"}, "ad": {"population": "85082", "region": "Europe", "id": "ad", "name": "Andorra", "sub-region": "Southern Europe", "latitude": "42.5", "longitude": "1.5", "code": "ad"}, "sj": {"population": "2067", "region": "Europe", "id": "sj", "name": "Svalbard and Jan Mayen", "sub-region": "Northern Europe", "latitude": "78", "longitude": "20", "code": "sj"}, "ge": {"population": "4570934", "region": "Asia", "id": "ge", "name": "Georgia", "sub-region": "Western Asia", "latitude": "42", "longitude": "43.5", "code": "ge"}, "cd": {"population": "73599190", "region": "Africa", "id": "cd", "name": "Congo, the Democratic Republic of the", "sub-region": "Middle Africa", "latitude": "0.0166666667", "longitude": "25", "code": "cd"}, "gu": {"population": "183286", "region": "Oceania", "id": "gu", "name": "Guam", "sub-region": "Micronesia", "latitude": "13.4666666667", "longitude": "144.783333333", "code": "gu"}, "mr": {"population": "3359185", "region": "Africa", "id": "mr", "name": "Mauritania", "sub-region": "Western Africa", "latitude": "20", "longitude": "-12", "code": "mr"}, "sk": {"population": "5483088", "region": "Europe", "id": "sk", "name": "Slovakia", "sub-region": "Eastern Europe", "latitude": "48.6666666667", "longitude": "19.5", "code": "sk"}, "iq": {"population": "31129225", "region": "Asia", "id": "iq", "name": "Iraq", "sub-region": "Western Asia", "latitude": "33", "longitude": "44", "code": "iq"}, "sc": {"population": "90024", "region": "Africa", "id": "sc", "name": "Seychelles", "sub-region": "Eastern Africa", "latitude": "-4.5833333333", "longitude": "55.6666666667", "code": "sc"}, "lb": {"population": "4140289", "region": "Asia", "id": "lb", "name": "Lebanon", "sub-region": "Western Asia", "latitude": "33.8333333333", "longitude": "35.8333333333", "code": "lb"}, "ie": {"population": "4722028", "region": "Europe", "id": "ie", "name": "Ireland", "sub-region": "Northern Europe", "latitude": "53", "longitude": "-8", "code": "ie"}, "cf": {"population": "5057208", "region": "Africa", "id": "cf", "name": "Central African Republic", "sub-region": "Middle Africa", "latitude": "7", "longitude": "21", "code": "cf"}, "ug": {"population": "35873253", "region": "Africa", "id": "ug", "name": "Uganda", "sub-region": "Eastern Africa", "latitude": "1", "longitude": "32", "code": "ug"}, "pk": {"population": "190291129", "region": "Asia", "id": "pk", "name": "Pakistan", "sub-region": "Southern Asia", "latitude": "30", "longitude": "70", "code": "pk"}, "bz": {"population": "327719", "region": "Americas", "id": "bz", "name": "Belize", "sub-region": "Central America", "latitude": "17.25", "longitude": "-88.75", "code": "bz"}, "me": {"population": "657394", "region": "Europe", "id": "me", "name": "Montenegro", "sub-region": "Southern Europe", "latitude": "42.5", "longitude": "19.3", "code": "me"}, "tz": {"population": "43601796", "region": "Africa", "id": "tz", "name": "Tanzania, United Republic of", "sub-region": "Eastern Africa", "latitude": "-6", "longitude": "35", "code": "tz"}, "gs": {"population": "0", "region": "", "id": "gs", "name": "South Georgia and the South Sandwich Islands", "sub-region": "", "latitude": "-54.5", "longitude": "-37", "code": "gs"}, "ml": {"population": "14533511", "region": "Africa", "id": "ml", "name": "Mali", "sub-region": "Western Africa", "latitude": "17", "longitude": "-4", "code": "ml"}, "kn": {"population": "50726", "region": "Americas", "id": "kn", "name": "Saint Kitts and Nevis", "sub-region": "Caribbean", "latitude": "17.3333333333", "longitude": "-62.75", "code": "kn"}, "sy": {"population": "22530746", "region": "Asia", "id": "sy", "name": "Syrian Arab Republic", "sub-region": "Western Asia", "latitude": "35", "longitude": "38", "code": "sy"}, "im": {"population": "85421", "region": "Europe", "id": "im", "name": "Isle of Man", "sub-region": "Northern Europe", "latitude": "54.25", "longitude": "-4.5", "code": "im"}, "sv": {"population": "6090646", "region": "Americas", "id": "sv", "name": "El Salvador", "sub-region": "Central America", "latitude": "13.8333333333", "longitude": "-88.9166666667", "code": "sv"}, "lk": {"population": "21481334", "region": "Asia", "id": "lk", "name": "Sri Lanka", "sub-region": "Southern Asia", "latitude": "7", "longitude": "81", "code": "lk"}, "aw": {"population": "107635", "region": "Americas", "id": "aw", "name": "Aruba", "sub-region": "Caribbean", "latitude": "12.5", "longitude": "-69.9666666667", "code": "aw"}, "ly": {"population": "6733620", "region": "Africa", "id": "ly", "name": "Libya", "sub-region": "Northern Africa", "latitude": "25", "longitude": "17", "code": "ly"}, "al": {"population": "3002859", "region": "Europe", "id": "al", "name": "Albania", "sub-region": "Southern Europe", "latitude": "41", "longitude": "20", "code": "al"}, "ai": {"population": "15423", "region": "Americas", "id": "ai", "name": "Anguilla", "sub-region": "Caribbean", "latitude": "18.25", "longitude": "-63.1666666667", "code": "ai"}, "cv": {"population": "523568", "region": "Africa", "id": "cv", "name": "Cape Verde", "sub-region": "Western Africa", "latitude": "16", "longitude": "-24", "code": "cv"}, "ee": {"population": "1274709", "region": "Europe", "id": "ee", "name": "Estonia", "sub-region": "Northern Europe", "latitude": "59", "longitude": "26", "code": "ee"}, "sz": {"population": "1386914", "region": "Africa", "id": "sz", "name": "Swaziland", "sub-region": "Southern Africa", "latitude": "-26.5", "longitude": "31.5", "code": "sz"}, "pg": {"population": "6310129", "region": "Oceania", "id": "pg", "name": "Papua New Guinea", "sub-region": "Melanesia", "latitude": "-6", "longitude": "147", "code": "pg"}, "is": {"population": "313183", "region": "Europe", "id": "is", "name": "Iceland", "sub-region": "Northern Europe", "latitude": "65", "longitude": "-18", "code": "is"}, "um": {"population": "316", "region": "", "id": "um", "name": "United States Minor Outlying Islands", "sub-region": "", "latitude": "16.75", "longitude": "-169.516666667", "code": "um"}, "ye": {"population": "24771809", "region": "Asia", "id": "ye", "name": "Yemen", "sub-region": "Western Asia", "latitude": "15", "longitude": "48", "code": "ye"}, "gp": {"population": "405500", "region": "Americas", "id": "gp", "name": "Guadeloupe", "sub-region": "Caribbean", "latitude": "16.25", "longitude": "-61.5833333333", "code": "gp"}, "ru": {"population": "138082178", "region": "Europe", "id": "ru", "name": "Russian Federation", "sub-region": "Eastern Europe", "latitude": "60", "longitude": "100", "code": "ru"}, "bq": {"population": "0", "region": "Americas", "id": "bq", "name": "Bonaire, Sint Eustatius and Saba", "sub-region": "Caribbean", "latitude": "12.1666666667", "longitude": "-68.25", "code": "bq"}, "lu": {"population": "509074", "region": "Europe", "id": "lu", "name": "Luxembourg", "sub-region": "Western Europe", "latitude": "49.75", "longitude": "6.1666666667", "code": "lu"}, "do": {"population": "10088598", "region": "Americas", "id": "do", "name": "Dominican Republic", "sub-region": "Caribbean", "latitude": "19", "longitude": "-70.6666666667", "code": "do"}, "fi": {"population": "5262930", "region": "Europe", "id": "fi", "name": "Finland", "sub-region": "Northern Europe", "latitude": "64", "longitude": "26", "code": "fi"}, "as": {"population": "68061", "region": "Oceania", "id": "as", "name": "American Samoa", "sub-region": "Polynesia", "latitude": "-14.3333333333", "longitude": "-170", "code": "as"}, "cz": {"population": "10177300", "region": "Europe", "id": "cz", "name": "Czech Republic", "sub-region": "Eastern Europe", "latitude": "49.75", "longitude": "15.5", "code": "cz"}, "sh": {"population": "7728", "region": "Africa", "id": "sh", "name": "Saint Helena, Ascension and Tristan da Cunha", "sub-region": "Western Africa", "latitude": "-15.95", "longitude": "-5.7", "code": "sh"}, "bw": {"population": "2098018", "region": "Africa", "id": "bw", "name": "Botswana", "sub-region": "Southern Africa", "latitude": "-22", "longitude": "24", "code": "bw"}, "vc": {"population": "103537", "region": "Americas", "id": "vc", "name": "Saint Vincent and the Grenadines", "sub-region": "Caribbean", "latitude": "13.25", "longitude": "-61.2", "code": "vc"}, "sn": {"population": "12969606", "region": "Africa", "id": "sn", "name": "Senegal", "sub-region": "Western Africa", "latitude": "14", "longitude": "-14", "code": "sn"}, "ng": {"population": "170123740", "region": "Africa", "id": "ng", "name": "Nigeria", "sub-region": "Western Africa", "latitude": "10", "longitude": "8", "code": "ng"}, "kp": {"population": "24589122", "region": "Asia", "id": "kp", "name": "Korea, Democratic People's Republic of", "sub-region": "Eastern Asia", "latitude": "40", "longitude": "127", "code": "kp"}, "tm": {"population": "5054828", "region": "Asia", "id": "tm", "name": "Turkmenistan", "sub-region": "Central Asia", "latitude": "40", "longitude": "60", "code": "tm"}, "ne": {"population": "17078839", "region": "Africa", "id": "ne", "name": "Niger", "sub-region": "Western Africa", "latitude": "16", "longitude": "8", "code": "ne"}, "nr": {"population": "9378", "region": "Oceania", "id": "nr", "name": "Nauru", "sub-region": "Micronesia", "latitude": "-0.5333333333", "longitude": "166.916666667", "code": "nr"}, "nc": {"population": "260166", "region": "Oceania", "id": "nc", "name": "New Caledonia", "sub-region": "Melanesia", "latitude": "-21.5", "longitude": "165.5", "code": "nc"}, "bf": {"population": "17275115", "region": "Africa", "id": "bf", "name": "Burkina Faso", "sub-region": "Western Africa", "latitude": "13", "longitude": "-2", "code": "bf"}, "fj": {"population": "890057", "region": "Oceania", "id": "fj", "name": "Fiji", "sub-region": "Melanesia", "latitude": "-18", "longitude": "175", "code": "fj"}, "zm": {"population": "14309466", "region": "Africa", "id": "zm", "name": "Zambia", "sub-region": "Eastern Africa", "latitude": "-15", "longitude": "30", "code": "zm"}, "jm": {"population": "2889187", "region": "Americas", "id": "jm", "name": "Jamaica", "sub-region": "Caribbean", "latitude": "18.25", "longitude": "-77.5", "code": "jm"}, "hu": {"population": "9958453", "region": "Europe", "id": "hu", "name": "Hungary", "sub-region": "Eastern Europe", "latitude": "47", "longitude": "20", "code": "hu"}, "lc": {"population": "162178", "region": "Americas", "id": "lc", "name": "Saint Lucia", "sub-region": "Caribbean", "latitude": "13.8833333333", "longitude": "-60.9666666667", "code": "lc"}, "ke": {"population": "43013341", "region": "Africa", "id": "ke", "name": "Kenya", "sub-region": "Eastern Africa", "latitude": "1", "longitude": "38", "code": "ke"}, "dz": {"population": "35406303", "region": "Africa", "id": "dz", "name": "Algeria", "sub-region": "Northern Africa", "latitude": "28", "longitude": "3", "code": "dz"}, "co": {"population": "45239079", "region": "Americas", "id": "co", "name": "Colombia", "sub-region": "South America", "latitude": "4", "longitude": "-72", "code": "co"}, "mq": {"population": "397730", "region": "Americas", "id": "mq", "name": "Martinique", "sub-region": "Caribbean", "latitude": "14.6", "longitude": "-61.0833333333", "code": "mq"}, "gg": {"population": "64775", "region": "Europe", "id": "gg", "name": "Guernsey", "sub-region": "Northern Europe", "latitude": "49.4666666667", "longitude": "-2.5833333333", "code": "gg"}, "ar": {"population": "42192494", "region": "Americas", "id": "ar", "name": "Argentina", "sub-region": "South America", "latitude": "-34", "longitude": "-64", "code": "ar"}, "am": {"population": "2970495", "region": "Asia", "id": "am", "name": "Armenia", "sub-region": "Western Asia", "latitude": "40", "longitude": "45", "code": "am"}, "pt": {"population": "10781459", "region": "Europe", "id": "pt", "name": "Portugal", "sub-region": "Southern Europe", "latitude": "39.5", "longitude": "-8", "code": "pt"}, "et": {"population": "93815992", "region": "Africa", "id": "et", "name": "Ethiopia", "sub-region": "Eastern Africa", "latitude": "8", "longitude": "38", "code": "et"}, "my": {"population": "29179952", "region": "Asia", "id": "my", "name": "Malaysia", "sub-region": "South-Eastern Asia", "latitude": "2.5", "longitude": "112.5", "code": "my"}, "mv": {"population": "394451", "region": "Asia", "id": "mv", "name": "Maldives", "sub-region": "Southern Asia", "latitude": "3.25", "longitude": "73", "code": "mv"}, "tk": {"population": "1368", "region": "Oceania", "id": "tk", "name": "Tokelau", "sub-region": "Polynesia", "latitude": "-9", "longitude": "-172", "code": "tk"}, "bb": {"population": "287733", "region": "Americas", "id": "bb", "name": "Barbados", "sub-region": "Caribbean", "latitude": "13.1666666667", "longitude": "-59.5333333333", "code": "bb"}, "az": {"population": "9493600", "region": "Asia", "id": "az", "name": "Azerbaijan", "sub-region": "Western Asia", "latitude": "40.5", "longitude": "47.5", "code": "az"}, "tv": {"population": "10619", "region": "Oceania", "id": "tv", "name": "Tuvalu", "sub-region": "Polynesia", "latitude": "-8", "longitude": "178", "code": "tv"}, "mx": {"population": "114975406", "region": "Americas", "id": "mx", "name": "Mexico", "sub-region": "Central America", "latitude": "23", "longitude": "-102", "code": "mx"}, "ss": {"population": "10625176", "region": "Africa", "id": "ss", "name": "South Sudan", "sub-region": "Eastern Africa", "latitude": "8", "longitude": "30", "code": "ss"}, "rs": {"population": "7276604", "region": "Europe", "id": "rs", "name": "Serbia", "sub-region": "Southern Europe", "latitude": "44", "longitude": "21", "code": "rs"}, "nf": {"population": "2182", "region": "Oceania", "id": "nf", "name": "Norfolk Island", "sub-region": "Australia and New Zealand", "latitude": "-29.0333333333", "longitude": "167.95", "code": "nf"}, "xk": {"population": "1824000", "region": "Europe", "id": "xk", "name": "Kosovo", "sub-region": "Eastern Europe", "latitude": "42.563", "longitude": "20.902", "code": "xk"}, "sx": {"population": "37429", "region": "Americas", "id": "sx", "name": "Sint Maarten (Dutch part)", "sub-region": "Caribbean", "latitude": "18.04167", "longitude": "-63.06667", "code": "sx"}, "kw": {"population": "2646314", "region": "Asia", "id": "kw", "name": "Kuwait", "sub-region": "Western Asia", "latitude": "29.366667", "longitude": "47.966667", "code": "kw"}, "cu": {"population": "11075244", "region": "Americas", "id": "cu", "name": "Cuba", "sub-region": "Caribbean", "latitude": "21.5", "longitude": "-80", "code": "cu"}, "ae": {"population": "5314317", "region": "Asia", "id": "ae", "name": "United Arab Emirates", "sub-region": "Western Asia", "latitude": "24", "longitude": "54", "code": "ae"}, "sl": {"population": "5485998", "region": "Africa", "id": "sl", "name": "Sierra Leone", "sub-region": "Western Africa", "latitude": "8.5", "longitude": "-11.5", "code": "sl"}, "sg": {"population": "5353494", "region": "Asia", "id": "sg", "name": "Singapore", "sub-region": "South-Eastern Asia", "latitude": "1.3666666667", "longitude": "103.8", "code": "sg"}, "so": {"population": "10085638", "region": "Africa", "id": "so", "name": "Somalia", "sub-region": "Eastern Africa", "latitude": "10", "longitude": "49", "code": "so"}, "mz": {"population": "23515934", "region": "Africa", "id": "mz", "name": "Mozambique", "sub-region": "Eastern Africa", "latitude": "-18.25", "longitude": "35", "code": "mz"}, "np": {"population": "29890686", "region": "Asia", "id": "np", "name": "Nepal", "sub-region": "Southern Asia", "latitude": "28", "longitude": "84", "code": "np"}, "ck": {"population": "10777", "region": "Oceania", "id": "ck", "name": "Cook Islands", "sub-region": "Polynesia", "latitude": "-21.2333333333", "longitude": "-159.766666667", "code": "ck"}, "ch": {"population": "7655628", "region": "Europe", "id": "ch", "name": "Switzerland", "sub-region": "Western Europe", "latitude": "47", "longitude": "8", "code": "ch"}, "fo": {"population": "49483", "region": "Europe", "id": "fo", "name": "Faroe Islands", "sub-region": "Northern Europe", "latitude": "62", "longitude": "-7", "code": "fo"}, "at": {"population": "8219743", "region": "Europe", "id": "at", "name": "Austria", "sub-region": "Western Europe", "latitude": "47.3333333333", "longitude": "13.3333333333", "code": "at"}, "bo": {"population": "10290003", "region": "Americas", "id": "bo", "name": "Bolivia, Plurinational State of", "sub-region": "South America", "latitude": "-17", "longitude": "-65", "code": "bo"}, "bv": {"population": "0", "region": "", "id": "bv", "name": "Bouvet Island", "sub-region": "", "latitude": "-54.4333333333", "longitude": "3.4", "code": "bv"}, "mu": {"population": "1313095", "region": "Africa", "id": "mu", "name": "Mauritius", "sub-region": "Eastern Africa", "latitude": "-20.2833333333", "longitude": "57.55", "code": "mu"}, "th": {"population": "67091089", "region": "Asia", "id": "th", "name": "Thailand", "sub-region": "South-Eastern Asia", "latitude": "15", "longitude": "100", "code": "th"}, "au": {"population": "22015576", "region": "Oceania", "id": "au", "name": "Australia", "sub-region": "Australia and New Zealand", "latitude": "-27", "longitude": "133", "code": "au"}, "mw": {"population": "16323044", "region": "Africa", "id": "mw", "name": "Malawi", "sub-region": "Eastern Africa", "latitude": "-13.5", "longitude": "34", "code": "mw"}, "cl": {"population": "17067369", "region": "Americas", "id": "cl", "name": "Chile", "sub-region": "South America", "latitude": "-30", "longitude": "-71", "code": "cl"}, "ky": {"population": "52560", "region": "Americas", "id": "ky", "name": "Cayman Islands", "sub-region": "Caribbean", "latitude": "19.5", "longitude": "-80.5", "code": "ky"}, "sr": {"population": "560157", "region": "Americas", "id": "sr", "name": "Suriname", "sub-region": "South America", "latitude": "4", "longitude": "-56", "code": "sr"}, "ag": {"population": "89018", "region": "Americas", "id": "ag", "name": "Antigua and Barbuda", "sub-region": "Caribbean", "latitude": "17.05", "longitude": "-61.8", "code": "ag"}, "va": {"population": "836", "region": "Europe", "id": "va", "name": "Holy See (Vatican City State)", "sub-region": "Southern Europe", "latitude": "41.9", "longitude": "12.45", "code": "va"}, "gl": {"population": "57695", "region": "Americas", "id": "gl", "name": "Greenland", "sub-region": "Northern America", "latitude": "72", "longitude": "-40", "code": "gl"}, "wf": {"population": "15453", "region": "Oceania", "id": "wf", "name": "Wallis and Futuna", "sub-region": "Polynesia", "latitude": "-13.3", "longitude": "-176.2", "code": "wf"}, "bh": {"population": "1248348", "region": "Asia", "id": "bh", "name": "Bahrain", "sub-region": "Western Asia", "latitude": "26", "longitude": "50.55", "code": "bh"}, "tf": {"population": "0", "region": "", "id": "tf", "name": "French Southern Territories", "sub-region": "", "latitude": "-37.8333333333", "longitude": "77.5333333333", "code": "tf"}, "kz": {"population": "17522010", "region": "Asia", "id": "kz", "name": "Kazakhstan", "sub-region": "Central Asia", "latitude": "48", "longitude": "68", "code": "kz"}, "ca": {"population": "34300083", "region": "Americas", "id": "ca", "name": "Canada", "sub-region": "Northern America", "latitude": "60", "longitude": "-95", "code": "ca"}, "by": {"population": "9542883", "region": "Europe", "id": "by", "name": "Belarus", "sub-region": "Eastern Europe", "latitude": "53", "longitude": "28", "code": "by"}, "pm": {"population": "5831", "region": "Americas", "id": "pm", "name": "Saint Pierre and Miquelon", "sub-region": "Northern America", "latitude": "46.8333333333", "longitude": "-56.3333333333", "code": "pm"}, "ba": {"population": "4622292", "region": "Europe", "id": "ba", "name": "Bosnia and Herzegovina", "sub-region": "Southern Europe", "latitude": "44", "longitude": "18", "code": "ba"}, "cy": {"population": "1138071", "region": "Asia", "id": "cy", "name": "Cyprus", "sub-region": "Western Asia", "latitude": "35", "longitude": "33", "code": "cy"}, "zw": {"population": "12619600", "region": "Africa", "id": "zw", "name": "Zimbabwe", "sub-region": "Eastern Africa", "latitude": "-20", "longitude": "30", "code": "zw"}, "vu": {"population": "227574", "region": "Oceania", "id": "vu", "name": "Vanuatu", "sub-region": "Melanesia", "latitude": "-16", "longitude": "167", "code": "vu"}, "si": {"population": "1996617", "region": "Europe", "id": "si", "name": "Slovenia", "sub-region": "Southern Europe", "latitude": "46.1166666667", "longitude": "14.8166666667", "code": "si"}, "gh": {"population": "25241998", "region": "Africa", "id": "gh", "name": "Ghana", "sub-region": "Western Africa", "latitude": "8", "longitude": "-2", "code": "gh"}, "ro": {"population": "21848504", "region": "Europe", "id": "ro", "name": "Romania", "sub-region": "Eastern Europe", "latitude": "46", "longitude": "25", "code": "ro"}, "ki": {"population": "101998", "region": "Oceania", "id": "ki", "name": "Kiribati", "sub-region": "Micronesia", "latitude": "1.4166666667", "longitude": "173", "code": "ki"}, "mo": {"population": "578025", "region": "Asia", "id": "mo", "name": "Macao", "sub-region": "Eastern Asia", "latitude": "22.1666666667", "longitude": "113.55", "code": "mo"}, "td": {"population": "10975648", "region": "Africa", "id": "td", "name": "Chad", "sub-region": "Middle Africa", "latitude": "15", "longitude": "19", "code": "td"}, "jo": {"population": "6508887", "region": "Asia", "id": "jo", "name": "Jordan", "sub-region": "Western Asia", "latitude": "31", "longitude": "36", "code": "jo"}, "ec": {"population": "15223680", "region": "Americas", "id": "ec", "name": "Ecuador", "sub-region": "South America", "latitude": "-2", "longitude": "-77.5", "code": "ec"}, "eg": {"population": "83688164", "region": "Africa", "id": "eg", "name": "Egypt", "sub-region": "Northern Africa", "latitude": "27", "longitude": "30", "code": "eg"}, "uz": {"population": "28394180", "region": "Asia", "id": "uz", "name": "Uzbekistan", "sub-region": "Central Asia", "latitude": "41", "longitude": "64", "code": "uz"}, "ir": {"population": "78868711", "region": "Asia", "id": "ir", "name": "Iran, Islamic Republic of", "sub-region": "Southern Asia", "latitude": "32", "longitude": "53", "code": "ir"}, "vi": {"population": "109574", "region": "Americas", "id": "vi", "name": "Virgin Islands, U.S.", "sub-region": "Caribbean", "latitude": "18.3333333333", "longitude": "-64.8333333333", "code": "vi"}, "tl": {"population": "1201255", "region": "Asia", "id": "tl", "name": "Timor-Leste", "sub-region": "South-Eastern Asia", "latitude": "-8.8333333333", "longitude": "125.916666667", "code": "tl"}, "vg": {"population": "31148", "region": "Americas", "id": "vg", "name": "Virgin Islands, British", "sub-region": "Caribbean", "latitude": "18.5", "longitude": "-64.5", "code": "vg"}, "mt": {"population": "409836", "region": "Europe", "id": "mt", "name": "Malta", "sub-region": "Southern Europe", "latitude": "35.8333333333", "longitude": "14.5833333333", "code": "mt"}, "gm": {"population": "1840454", "region": "Africa", "id": "gm", "name": "Gambia", "sub-region": "Western Africa", "latitude": "13.4666666667", "longitude": "-16.5666666667", "code": "gm"}, "bl": {"population": "7332", "region": "Americas", "id": "bl", "name": "Saint Barth\u00e9lemy", "sub-region": "Caribbean", "latitude": "17.9", "longitude": "-62.833333", "code": "bl"}, "gi": {"population": "29034", "region": "Europe", "id": "gi", "name": "Gibraltar", "sub-region": "Southern Europe", "latitude": "36.1333333333", "longitude": "-5.35", "code": "gi"}, "es": {"population": "47042984", "region": "Europe", "id": "es", "name": "Spain", "sub-region": "Southern Europe", "latitude": "40", "longitude": "-4", "code": "es"}, "pr": {"population": "3998905", "region": "Americas", "id": "pr", "name": "Puerto Rico", "sub-region": "Caribbean", "latitude": "18.25", "longitude": "-66.5", "code": "pr"}, "ci": {"population": "21952093", "region": "Africa", "id": "ci", "name": "C\u00f4te d'Ivoire", "sub-region": "Western Africa", "latitude": "8", "longitude": "-5", "code": "ci"}, "kh": {"population": "14952665", "region": "Asia", "id": "kh", "name": "Cambodia", "sub-region": "South-Eastern Asia", "latitude": "13", "longitude": "105", "code": "kh"}, "tw": {"population": "23113901", "region": "Asia", "id": "tw", "name": "Taiwan, Province of China", "sub-region": "Eastern Asia", "latitude": "23.5", "longitude": "121", "code": "tw"}, "dm": {"population": "73126", "region": "Americas", "id": "dm", "name": "Dominica", "sub-region": "Caribbean", "latitude": "15.4166666667", "longitude": "-61.3333333333", "code": "dm"}, "dj": {"population": "774389", "region": "Africa", "id": "dj", "name": "Djibouti", "sub-region": "Eastern Africa", "latitude": "11.5", "longitude": "43", "code": "dj"}, "fm": {"population": "106487", "region": "Oceania", "id": "fm", "name": "Micronesia, Federated States of", "sub-region": "Micronesia", "latitude": "6.9166666667", "longitude": "158.25", "code": "fm"}, "mg": {"population": "22585517", "region": "Africa", "id": "mg", "name": "Madagascar", "sub-region": "Eastern Africa", "latitude": "-20", "longitude": "47", "code": "mg"}, "de": {"population": "81305856", "region": "Europe", "id": "de", "name": "Germany", "sub-region": "Western Europe", "latitude": "51", "longitude": "9", "code": "de"}, "bg": {"population": "7037935", "region": "Europe", "id": "bg", "name": "Bulgaria", "sub-region": "Eastern Europe", "latitude": "43", "longitude": "25", "code": "bg"}, "ht": {"population": "9801664", "region": "Americas", "id": "ht", "name": "Haiti", "sub-region": "Caribbean", "latitude": "19", "longitude": "-72.4166666667", "code": "ht"}, "it": {"population": "61261254", "region": "Europe", "id": "it", "name": "Italy", "sub-region": "Southern Europe", "latitude": "42.8333333333", "longitude": "12.8333333333", "code": "it"}, "ax": {"population": "28007", "region": "Europe", "id": "ax", "name": "\u00c5land Islands", "sub-region": "Northern Europe", "latitude": "60.25", "longitude": "20", "code": "ax"}, "bd": {"population": "161083804", "region": "Asia", "id": "bd", "name": "Bangladesh", "sub-region": "Southern Asia", "latitude": "24", "longitude": "90", "code": "bd"}, "mk": {"population": "2082370", "region": "Europe", "id": "mk", "name": "Macedonia, the former Yugoslav Republic of", "sub-region": "Southern Europe", "latitude": "41.8333333333", "longitude": "22", "code": "mk"}, "se": {"population": "9103788", "region": "Europe", "id": "se", "name": "Sweden", "sub-region": "Northern Europe", "latitude": "62", "longitude": "15", "code": "se"}, "tj": {"population": "7768385", "region": "Asia", "id": "tj", "name": "Tajikistan", "sub-region": "Central Asia", "latitude": "39", "longitude": "71", "code": "tj"}, "tr": {"population": "79749461", "region": "Asia", "id": "tr", "name": "Turkey", "sub-region": "Western Asia", "latitude": "39", "longitude": "35", "code": "tr"}, "mf": {"population": "30959", "region": "Americas", "id": "mf", "name": "Saint Martin (French part)", "sub-region": "Caribbean", "latitude": "18.075278", "longitude": "-63.06", "code": "mf"}, "om": {"population": "3090150", "region": "Asia", "id": "om", "name": "Oman", "sub-region": "Western Asia", "latitude": "21", "longitude": "57", "code": "om"}, "na": {"population": "2165828", "region": "Africa", "id": "na", "name": "Namibia", "sub-region": "Southern Africa", "latitude": "-22", "longitude": "17", "code": "na"}, "aq": {"population": "0", "region": "", "id": "aq", "name": "Antarctica", "sub-region": "", "latitude": "-90", "longitude": "0", "code": "aq"}, "gb": {"population": "63047162", "region": "Europe", "id": "gb", "name": "United Kingdom", "sub-region": "Northern Europe", "latitude": "54", "longitude": "-2", "code": "gb"}, "st": {"population": "183176", "region": "Africa", "id": "st", "name": "Sao Tome and Principe", "sub-region": "Middle Africa", "latitude": "1", "longitude": "7", "code": "st"}, "xn": {"population": "301988", "region": "Asia", "id": "xn", "name": "Northern Cyprus", "sub-region": "Western Asia", "latitude": "35.201", "longitude": "33.775", "code": "xn"}, "bm": {"population": "69080", "region": "Americas", "id": "bm", "name": "Bermuda", "sub-region": "Northern America", "latitude": "32.3333333333", "longitude": "-64.75", "code": "bm"}, "gn": {"population": "10884958", "region": "Africa", "id": "gn", "name": "Guinea", "sub-region": "Western Africa", "latitude": "11", "longitude": "-10", "code": "gn"}, "gr": {"population": "10767827", "region": "Europe", "id": "gr", "name": "Greece", "sub-region": "Southern Europe", "latitude": "39", "longitude": "22", "code": "gr"}, "sd": {"population": "34206710", "region": "Africa", "id": "sd", "name": "Sudan", "sub-region": "Northern Africa", "latitude": "15", "longitude": "30", "code": "sd"}, "mc": {"population": "30510", "region": "Europe", "id": "mc", "name": "Monaco", "sub-region": "Western Europe", "latitude": "43.732778", "longitude": "7.419722", "code": "mc"}, "mh": {"population": "68480", "region": "Oceania", "id": "mh", "name": "Marshall Islands", "sub-region": "Micronesia", "latitude": "9", "longitude": "168", "code": "mh"}, "bs": {"population": "316182", "region": "Americas", "id": "bs", "name": "Bahamas", "sub-region": "Caribbean", "latitude": "24.25", "longitude": "-76", "code": "bs"}, "to": {"population": "106146", "region": "Oceania", "id": "to", "name": "Tonga", "sub-region": "Polynesia", "latitude": "-20", "longitude": "-175", "code": "to"}, "sb": {"population": "584578", "region": "Oceania", "id": "sb", "name": "Solomon Islands", "sub-region": "Melanesia", "latitude": "-8", "longitude": "159", "code": "sb"}, "cm": {"population": "20129878", "region": "Africa", "id": "cm", "name": "Cameroon", "sub-region": "Middle Africa", "latitude": "6", "longitude": "12", "code": "cm"}, "ua": {"population": "44854065", "region": "Europe", "id": "ua", "name": "Ukraine", "sub-region": "Eastern Europe", "latitude": "49", "longitude": "32", "code": "ua"}, "kr": {"population": "48860500", "region": "Asia", "id": "kr", "name": "Korea, Republic of", "sub-region": "Eastern Asia", "latitude": "37", "longitude": "127.5", "code": "kr"}, "ph": {"population": "103775002", "region": "Asia", "id": "ph", "name": "Philippines", "sub-region": "South-Eastern Asia", "latitude": "13", "longitude": "122", "code": "ph"}, "hm": {"population": "0", "region": "", "id": "hm", "name": "Heard Island and McDonald Islands", "sub-region": "", "latitude": "-53.1", "longitude": "72.5166666667", "code": "hm"}, "dk": {"population": "5543453", "region": "Europe", "id": "dk", "name": "Denmark", "sub-region": "Northern Europe", "latitude": "56", "longitude": "10", "code": "dk"}, "pl": {"population": "38415284", "region": "Europe", "id": "pl", "name": "Poland", "sub-region": "Eastern Europe", "latitude": "52", "longitude": "20", "code": "pl"}, "nu": {"population": "1269", "region": "Oceania", "id": "nu", "name": "Niue", "sub-region": "Polynesia", "latitude": "-19.0333333333", "longitude": "-169.866666667", "code": "nu"}, "lv": {"population": "2191580", "region": "Europe", "id": "lv", "name": "Latvia", "sub-region": "Northern Europe", "latitude": "57", "longitude": "25", "code": "lv"}, "hk": {"population": "7153519", "region": "Asia", "id": "hk", "name": "Hong Kong", "sub-region": "Eastern Asia", "latitude": "22.25", "longitude": "114.166666667", "code": "hk"}, "id": {"population": "248216193", "region": "Asia", "id": "id", "name": "Indonesia", "sub-region": "South-Eastern Asia", "latitude": "-5", "longitude": "120", "code": "id"}, "bi": {"population": "10557259", "region": "Africa", "id": "bi", "name": "Burundi", "sub-region": "Eastern Africa", "latitude": "-3.5", "longitude": "30", "code": "bi"}, "ws": {"population": "194320", "region": "Oceania", "id": "ws", "name": "Samoa", "sub-region": "Polynesia", "latitude": "-13.5833333333", "longitude": "-172.333333333", "code": "ws"}, "lt": {"population": "3525761", "region": "Europe", "id": "lt", "name": "Lithuania", "sub-region": "Northern Europe", "latitude": "56", "longitude": "24", "code": "lt"}, "vn": {"population": "91519289", "region": "Asia", "id": "vn", "name": "Viet Nam", "sub-region": "South-Eastern Asia", "latitude": "16.1666666667", "longitude": "107.833333333", "code": "vn"}, "py": {"population": "6541591", "region": "Americas", "id": "py", "name": "Paraguay", "sub-region": "South America", "latitude": "-23", "longitude": "-58", "code": "py"}, "cn": {"population": "1343239923", "region": "Asia", "id": "cn", "name": "China", "sub-region": "Eastern Asia", "latitude": "35", "longitude": "105", "code": "cn"}, "pw": {"population": "21032", "region": "Oceania", "id": "pw", "name": "Palau", "sub-region": "Micronesia", "latitude": "7.5", "longitude": "134.5", "code": "pw"}, "ve": {"population": "28047938", "region": "Americas", "id": "ve", "name": "Venezuela, Bolivarian Republic of", "sub-region": "South America", "latitude": "8", "longitude": "-66", "code": "ve"}, "hn": {"population": "8296693", "region": "Americas", "id": "hn", "name": "Honduras", "sub-region": "Central America", "latitude": "15", "longitude": "-86.5", "code": "hn"}, "sa": {"population": "26534504", "region": "Asia", "id": "sa", "name": "Saudi Arabia", "sub-region": "Western Asia", "latitude": "25", "longitude": "45", "code": "sa"}, "pf": {"population": "274512", "region": "Oceania", "id": "pf", "name": "French Polynesia", "sub-region": "Polynesia", "latitude": "-15", "longitude": "-140", "code": "pf"}, "mp": {"population": "44582", "region": "Oceania", "id": "mp", "name": "Northern Mariana Islands", "sub-region": "Micronesia", "latitude": "15.2", "longitude": "145.75", "code": "mp"}, "sm": {"population": "32140", "region": "Europe", "id": "sm", "name": "San Marino", "sub-region": "Southern Europe", "latitude": "43.933333", "longitude": "12.4166666667", "code": "sm"}, "be": {"population": "10438353", "region": "Europe", "id": "be", "name": "Belgium", "sub-region": "Western Europe", "latitude": "50.8333333333", "longitude": "4", "code": "be"}, "ni": {"population": "5727707", "region": "Americas", "id": "ni", "name": "Nicaragua", "sub-region": "Central America", "latitude": "13", "longitude": "-85", "code": "ni"}, "tg": {"population": "6961049", "region": "Africa", "id": "tg", "name": "Togo", "sub-region": "Western Africa", "latitude": "8", "longitude": "1.1666666667", "code": "tg"}, "rw": {"population": "11689696", "region": "Africa", "id": "rw", "name": "Rwanda", "sub-region": "Eastern Africa", "latitude": "-2", "longitude": "30", "code": "rw"}, "er": {"population": "6086495", "region": "Africa", "id": "er", "name": "Eritrea", "sub-region": "Eastern Africa", "latitude": "15", "longitude": "39", "code": "er"}, "tt": {"population": "1226383", "region": "Americas", "id": "tt", "name": "Trinidad and Tobago", "sub-region": "Caribbean", "latitude": "11", "longitude": "-61", "code": "tt"}, "gf": {"population": "217000", "region": "Americas", "id": "gf", "name": "French Guiana", "sub-region": "South America", "latitude": "4", "longitude": "-53", "code": "gf"}, "tc": {"population": "46335", "region": "Americas", "id": "tc", "name": "Turks and Caicos Islands", "sub-region": "Caribbean", "latitude": "21.75", "longitude": "-71.5833333333", "code": "tc"}, "ma": {"population": "32309239", "region": "Africa", "id": "ma", "name": "Morocco", "sub-region": "Northern Africa", "latitude": "32", "longitude": "-5", "code": "ma"}, "cw": {"population": "142180", "region": "Americas", "id": "cw", "name": "Cura\u00e7ao", "sub-region": "Caribbean", "latitude": "12.1666666667", "longitude": "-69", "code": "cw"}, "mm": {"population": "54584650", "region": "Asia", "id": "mm", "name": "Myanmar", "sub-region": "South-Eastern Asia", "latitude": "22", "longitude": "98", "code": "mm"}, "fk": {"population": "3140", "region": "Americas", "id": "fk", "name": "Falkland Islands (Malvinas)", "sub-region": "South America", "latitude": "-51.75", "longitude": "-59", "code": "fk"}, "uy": {"population": "3316328", "region": "Americas", "id": "uy", "name": "Uruguay", "sub-region": "South America", "latitude": "-33", "longitude": "-56", "code": "uy"}, "gt": {"population": "14099032", "region": "Americas", "id": "gt", "name": "Guatemala", "sub-region": "Central America", "latitude": "15.5", "longitude": "-90.25", "code": "gt"}, "cr": {"population": "4636348", "region": "Americas", "id": "cr", "name": "Costa Rica", "sub-region": "Central America", "latitude": "10", "longitude": "-84", "code": "cr"}, "cg": {"population": "4125916", "region": "Africa", "id": "cg", "name": "Congo", "sub-region": "Middle Africa", "latitude": "-1", "longitude": "15", "code": "cg"}, "in": {"population": "1205073612", "region": "Asia", "id": "in", "name": "India", "sub-region": "Southern Asia", "latitude": "20", "longitude": "77", "code": "in"}, "nl": {"population": "16730632", "region": "Europe", "id": "nl", "name": "Netherlands", "sub-region": "Western Europe", "latitude": "52.5", "longitude": "5.75", "code": "nl"}, "mn": {"population": "3179997", "region": "Asia", "id": "mn", "name": "Mongolia", "sub-region": "Eastern Asia", "latitude": "46", "longitude": "105", "code": "mn"}, "je": {"population": "94949", "region": "Europe", "id": "je", "name": "Jersey", "sub-region": "Northern Europe", "latitude": "49.25", "longitude": "-2.1666666667", "code": "je"}, "lr": {"population": "3887886", "region": "Africa", "id": "lr", "name": "Liberia", "sub-region": "Western Africa", "latitude": "6.5", "longitude": "-9.5", "code": "lr"}, "af": {"population": "30419928", "region": "Asia", "id": "af", "name": "Afghanistan", "sub-region": "Southern Asia", "latitude": "33", "longitude": "65", "code": "af"}, "ga": {"population": "1608321", "region": "Africa", "id": "ga", "name": "Gabon", "sub-region": "Middle Africa", "latitude": "-1", "longitude": "11.75", "code": "ga"}, "bj": {"population": "9598787", "region": "Africa", "id": "bj", "name": "Benin", "sub-region": "Western Africa", "latitude": "9.5", "longitude": "2.25", "code": "bj"}, "qa": {"population": "1951591", "region": "Asia", "id": "qa", "name": "Qatar", "sub-region": "Western Asia", "latitude": "25.5", "longitude": "51.25", "code": "qa"}, "km": {"population": "737284", "region": "Africa", "id": "km", "name": "Comoros", "sub-region": "Eastern Africa", "latitude": "-12.1666666667", "longitude": "44.25", "code": "km"}, "ps": {"population": "4199083", "region": "Asia", "id": "ps", "name": "Palestine, State of", "sub-region": "Western Asia", "latitude": "32", "longitude": "35.25", "code": "ps"}, "gq": {"population": "685991", "region": "Africa", "id": "gq", "name": "Equatorial Guinea", "sub-region": "Middle Africa", "latitude": "2", "longitude": "10", "code": "gq"}, "io": {"population": "4000", "region": "", "id": "io", "name": "British Indian Ocean Territory", "sub-region": "", "latitude": "-6", "longitude": "71.5", "code": "io"}, "pa": {"population": "3510045", "region": "Americas", "id": "pa", "name": "Panama", "sub-region": "Central America", "latitude": "9", "longitude": "-80", "code": "pa"}, "ls": {"population": "1930493", "region": "Africa", "id": "ls", "name": "Lesotho", "sub-region": "Southern Africa", "latitude": "-29.5", "longitude": "28.5", "code": "ls"}, "br": {"population": "205716890", "region": "Americas", "id": "br", "name": "Brazil", "sub-region": "South America", "latitude": "-10", "longitude": "-55", "code": "br"}, "gd": {"population": "109011", "region": "Americas", "id": "gd", "name": "Grenada", "sub-region": "Caribbean", "latitude": "12.1166666667", "longitude": "-61.6666666667", "code": "gd"}, "pe": {"population": "29549517", "region": "Americas", "id": "pe", "name": "Peru", "sub-region": "South America", "latitude": "-10", "longitude": "-76", "code": "pe"}, "gw": {"population": "1628603", "region": "Africa", "id": "gw", "name": "Guinea-Bissau", "sub-region": "Western Africa", "latitude": "12", "longitude": "-15", "code": "gw"}, "re": {"population": "827000", "region": "Africa", "id": "re", "name": "R\u00e9union", "sub-region": "Eastern Africa", "latitude": "-21.1", "longitude": "55.6", "code": "re"}, "yt": {"population": "231139", "region": "Africa", "id": "yt", "name": "Mayotte", "sub-region": "Eastern Africa", "latitude": "-12.8333333333", "longitude": "45.1666666667", "code": "yt"}, "nz": {"population": "4327944", "region": "Oceania", "id": "nz", "name": "New Zealand", "sub-region": "Australia and New Zealand", "latitude": "-41", "longitude": "174", "code": "nz"}, "md": {"population": "3656843", "region": "Europe", "id": "md", "name": "Moldova, Republic of", "sub-region": "Eastern Europe", "latitude": "47", "longitude": "29", "code": "md"}, "cc": {"population": "596", "region": "", "id": "cc", "name": "Cocos (Keeling) Islands", "sub-region": "", "latitude": "-12.5", "longitude": "96.8333333333", "code": "cc"}, "fr": {"population": "65630692", "region": "Europe", "id": "fr", "name": "France", "sub-region": "Western Europe", "latitude": "46", "longitude": "2", "code": "fr"}, "tn": {"population": "10732900", "region": "Africa", "id": "tn", "name": "Tunisia", "sub-region": "Northern Africa", "latitude": "34", "longitude": "9", "code": "tn"}, "hr": {"population": "4480043", "region": "Europe", "id": "hr", "name": "Croatia", "sub-region": "Southern Europe", "latitude": "45.1666666667", "longitude": "15.5", "code": "hr"}, "kg": {"population": "5496737", "region": "Asia", "id": "kg", "name": "Kyrgyzstan", "sub-region": "Central Asia", "latitude": "41", "longitude": "75", "code": "kg"}, "eh": {"population": "522928", "region": "Africa", "id": "eh", "name": "Western Sahara", "sub-region": "Northern Africa", "latitude": "24.5", "longitude": "-13", "code": "eh"}, "jp": {"population": "127368088", "region": "Asia", "id": "jp", "name": "Japan", "sub-region": "Eastern Asia", "latitude": "36", "longitude": "138", "code": "jp"}, "il": {"population": "7590758", "region": "Asia", "id": "il", "name": "Israel", "sub-region": "Western Asia", "latitude": "31.5", "longitude": "34.75", "code": "il"}, "bt": {"population": "716896", "region": "Asia", "id": "bt", "name": "Bhutan", "sub-region": "Southern Asia", "latitude": "27.5", "longitude": "90.5", "code": "bt"}, "gy": {"population": "741908", "region": "Americas", "id": "gy", "name": "Guyana", "sub-region": "South America", "latitude": "5", "longitude": "-59", "code": "gy"}, "ms": {"population": "5164", "region": "Americas", "id": "ms", "name": "Montserrat", "sub-region": "Caribbean", "latitude": "16.75", "longitude": "-62.2", "code": "ms"}, "ao": {"population": "18056072", "region": "Africa", "id": "ao", "name": "Angola", "sub-region": "Middle Africa", "latitude": "-12.5", "longitude": "18.5", "code": "ao"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create dicti of EU member states | |
import json | |
import csv | |
ms = [] | |
with open("member_states.csv") as fin: | |
csvd = csv.DictReader(fin) | |
for row in csvd: | |
ms.append(row) | |
with open("countries.json") as fin: | |
cs = json.load(fin) | |
countries = [] | |
attrs1 = ['population','latitude','longitude','name','code'] | |
for m in ms: | |
if m['code'] == 'el': | |
m['code'] = 'gr' | |
if m['code'] == 'uk': | |
m['code'] = 'gb' | |
it = {} | |
for attr in attrs1: | |
it[attr] = cs[m['code']][attr] | |
it['another_name:original_name'] = m['another_name:original_name'] | |
countries.append(it) | |
print(countries) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<!--http://blog.webkid.io/maps-with-leaflet-and-topojson/--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content="EU map: leaflet"> | |
<meta name="keywords" content="openness"> | |
<meta name="author" content="Michal Škop"> | |
<!-- <link type="image/x-icon" href="/images/favicon.ico" rel="shortcut icon">--> | |
<link href="//maxcdn.bootstrapcdn.com/bootswatch/3.3.5/superhero/bootstrap.min.css" rel="stylesheet"> | |
<link href="//netdna.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet"> | |
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script> | |
<!-- <script src="//netdna.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js">--> | |
<title>EU map</title> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css"> | |
</head> | |
<body> | |
<style> | |
#worldmap{ | |
background: white; | |
height: 100%; | |
width: 100%; | |
} | |
#worldmap-container { | |
width: 100%; | |
height: 550px; | |
border: 1px solid #CCC; | |
} | |
</style> | |
<script> | |
countries = {}; | |
</script> | |
<div class="container"> | |
<!-- Page Content --> | |
<!-- map and categories --> | |
<div class="row"> | |
<div class="col-lg-3"></div> | |
<div class="col-lg-6"> | |
<div id="worldmap-container"> | |
<div id="worldmap"></div> | |
</div> | |
</div> | |
</div> | |
<!-- map js --> | |
<script src="//cdn.bootcss.com/chroma-js/1.1.1/chroma.min.js"></script> | |
<script src="//cdn.bootcss.com/topojson/1.6.19/topojson.min.js"></script> | |
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script> | |
<script src="//cdn.bootcss.com/d3/3.5.6/d3.min.js"></script> | |
<script src="map.js"></script> | |
</div> | |
</body> | |
</html> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://blog.webkid.io/maps-with-leaflet-and-topojson/ | |
// Leaflet doesn't know anything about TopoJSON, so we need to extend it in order to be able to add TopoJSON directly as a tilelayer.k | |
// https://gist.github.com/rclark/5779673 | |
L.TopoJSON = L.GeoJSON.extend({ | |
addData: function(jsonData) { | |
if (jsonData.type === "Topology") { | |
for (key in jsonData.objects) { | |
geojson = topojson.feature(jsonData, jsonData.objects[key]); | |
L.GeoJSON.prototype.addData.call(this, geojson); | |
} | |
} | |
else { | |
L.GeoJSON.prototype.addData.call(this, jsonData); | |
} | |
} | |
}); | |
(function(){ | |
'use strict' | |
var map = L.map('worldmap',{maxZoom:10,minZoom:1}), | |
topoLayer = new L.TopoJSON()//, //new TopoJSON layer | |
//$countryName = $('.country-name')/*, | |
//color to the scale and the input range | |
/*colorScale = chroma | |
.scale(['#D5E3FF', '#003171']) | |
.domain([0,1])*/; | |
/*L.tileLayer('http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png', { | |
attribution: 'CC-BY Michal Škop | Map tiles by CartoDB, under CC BY 3.0. Data by OpenStreetMap, under ODbL.' | |
}).addTo(map);*/ | |
map.setView([51.4380436,13.390182], 4); | |
//we load our countries.topo.json file via ajax and add the data to the layer. | |
$.getJSON('member_states.json', function(data) { | |
countries = data; | |
$.getJSON('countries.topo.json').done(addTopoData); | |
}); | |
function addTopoData(topoData){ | |
topoLayer.addData(topoData); | |
topoLayer.addTo(map); | |
topoLayer.eachLayer(handleLayer); | |
} | |
function handleLayer(layer){ | |
var code = layer.feature.properties.code; | |
if (typeof(countries[code]) != 'undefined') { | |
var fillColor = "#003399"; | |
} else { | |
var fillColor = "#525252"; | |
} | |
layer.setStyle({ | |
fillColor : fillColor, | |
fillOpacity: .5, | |
color:'#555', | |
weight:1, | |
opacity:.5 | |
}); | |
layer.on({ | |
mouseover : enterLayer, | |
mouseout: leaveLayer, | |
click: onMapClick | |
}); | |
} | |
function onMapClick(){ | |
var code = this.feature.properties.code; | |
if (typeof(countries[code]) != 'undefined') { | |
window.location = 'explore?cc=' + code | |
} | |
} | |
function enterLayer(){ | |
var countryName = this.feature.properties.code + ": " + this.feature.properties.name; | |
//$countryName.text(countryName).show(); | |
this.bringToFront(); | |
this.setStyle({ | |
weight:2, | |
opacity: 1 | |
}); | |
if (typeof(countries[this.feature.properties.code]) != 'undefined') { | |
this.setStyle({ | |
fillColor : "#FFCC00" | |
}) | |
} | |
} | |
function leaveLayer(){ | |
//$countryName.hide(); | |
this.bringToBack(); | |
this.setStyle({ | |
weight:1, | |
opacity:0.5 | |
}); | |
if (typeof(countries[this.feature.properties.code]) != 'undefined') { | |
this.setStyle({ | |
fillColor : "#003399" | |
}) | |
} | |
} | |
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name | another_name:original_name | another_name:official_name | code | |
---|---|---|---|---|
Belgium | Belgique/België | Kingdom of Belgium | be | |
Bulgaria | България | Republic of Bulgaria | bg | |
Czech Republic | Česká republika | Czech Republic | cz | |
Denmark | Danmark | Kingdom of Denmark | dk | |
Germany | Deutschland | Federal Republic of Germany | de | |
Estonia | Eesti | Republic of Estonia | ee | |
Ireland | Éire/Ireland | Ireland | ie | |
Greece | Ελλάδα | Hellenic Republic | el | |
Spain | España | Kingdom of Spain | es | |
France | France | French Republic | fr | |
Croatia | Hrvatska | Republic of Croatia | hr | |
Italy | Italia | Italian Republic | it | |
Cyprus | Κύπρος | Republic of Cyprus | cy | |
Latvia | Latvija | Republic of Latvia | lv | |
Lithuania | Lietuva | Republic of Lithuania | lt | |
Luxembourg | Luxembourg | Grand Duchy of Luxembourg | lu | |
Hungary | Magyarország | Hungary | hu | |
Malta | Malta | Republic of Malta | mt | |
Netherlands | Nederland | Kingdom of the Netherlands | nl | |
Austria | Österreich | Republic of Austria | at | |
Poland | Polska | Republic of Poland | pl | |
Portugal | Portugal | Portuguese Republic | pt | |
Romania | România | Romania | ro | |
Slovenia | Slovenija | Republic of Slovenia | si | |
Slovakia | Slovensko | Slovak Republic | sk | |
Finland | Suomi/Finland | Republic of Finland | fi | |
Sweden | Sverige | Kingdom of Sweden | se | |
United Kingdom | United Kingdom | United Kingdom of Great Britain and Northern Ireland | uk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"de": { | |
"population": "81305856", | |
"name": "Germany", | |
"code": "de", | |
"longitude": "9", | |
"latitude": "51", | |
"another_name:original_name": "Deutschland" | |
}, | |
"es": { | |
"population": "47042984", | |
"name": "Spain", | |
"code": "es", | |
"longitude": "-4", | |
"latitude": "40", | |
"another_name:original_name": "España" | |
}, | |
"sk": { | |
"population": "5483088", | |
"name": "Slovakia", | |
"code": "sk", | |
"longitude": "19.5", | |
"latitude": "48.6666666667", | |
"another_name:original_name": "Slovensko" | |
}, | |
"hr": { | |
"population": "4480043", | |
"name": "Croatia", | |
"code": "hr", | |
"longitude": "15.5", | |
"latitude": "45.1666666667", | |
"another_name:original_name": "Hrvatska" | |
}, | |
"cz": { | |
"population": "10177300", | |
"name": "Czech Republic", | |
"code": "cz", | |
"longitude": "15.5", | |
"latitude": "49.75", | |
"another_name:original_name": "Česká republika" | |
}, | |
"ro": { | |
"population": "21848504", | |
"name": "Romania", | |
"code": "ro", | |
"longitude": "25", | |
"latitude": "46", | |
"another_name:original_name": "România " | |
}, | |
"bg": { | |
"population": "7037935", | |
"name": "Bulgaria", | |
"code": "bg", | |
"longitude": "25", | |
"latitude": "43", | |
"another_name:original_name": "България" | |
}, | |
"at": { | |
"population": "8219743", | |
"name": "Austria", | |
"code": "at", | |
"longitude": "13.3333333333", | |
"latitude": "47.3333333333", | |
"another_name:original_name": "Österreich" | |
}, | |
"it": { | |
"population": "61261254", | |
"name": "Italy", | |
"code": "it", | |
"longitude": "12.8333333333", | |
"latitude": "42.8333333333", | |
"another_name:original_name": "Italia" | |
}, | |
"cy": { | |
"population": "1138071", | |
"name": "Cyprus", | |
"code": "cy", | |
"longitude": "33", | |
"latitude": "35", | |
"another_name:original_name": "Κύπρος" | |
}, | |
"lu": { | |
"population": "509074", | |
"name": "Luxembourg", | |
"code": "lu", | |
"longitude": "6.1666666667", | |
"latitude": "49.75", | |
"another_name:original_name": "Luxembourg" | |
}, | |
"mt": { | |
"population": "409836", | |
"name": "Malta", | |
"code": "mt", | |
"longitude": "14.5833333333", | |
"latitude": "35.8333333333", | |
"another_name:original_name": "Malta" | |
}, | |
"dk": { | |
"population": "5543453", | |
"name": "Denmark", | |
"code": "dk", | |
"longitude": "10", | |
"latitude": "56", | |
"another_name:original_name": "Danmark" | |
}, | |
"nl": { | |
"population": "16730632", | |
"name": "Netherlands", | |
"code": "nl", | |
"longitude": "5.75", | |
"latitude": "52.5", | |
"another_name:original_name": "Nederland" | |
}, | |
"be": { | |
"population": "10438353", | |
"name": "Belgium", | |
"code": "be", | |
"longitude": "4", | |
"latitude": "50.8333333333", | |
"another_name:original_name": "Belgique/België" | |
}, | |
"ee": { | |
"population": "1274709", | |
"name": "Estonia", | |
"code": "ee", | |
"longitude": "26", | |
"latitude": "59", | |
"another_name:original_name": "Eesti" | |
}, | |
"fr": { | |
"population": "65630692", | |
"name": "France", | |
"code": "fr", | |
"longitude": "2", | |
"latitude": "46", | |
"another_name:original_name": "France" | |
}, | |
"se": { | |
"population": "9103788", | |
"name": "Sweden", | |
"code": "se", | |
"longitude": "15", | |
"latitude": "62", | |
"another_name:original_name": "Sverige" | |
}, | |
"lt": { | |
"population": "3525761", | |
"name": "Lithuania", | |
"code": "lt", | |
"longitude": "24", | |
"latitude": "56", | |
"another_name:original_name": "Lietuva" | |
}, | |
"hu": { | |
"population": "9958453", | |
"name": "Hungary", | |
"code": "hu", | |
"longitude": "20", | |
"latitude": "47", | |
"another_name:original_name": "Magyarország" | |
}, | |
"gb": { | |
"population": "63047162", | |
"name": "United Kingdom", | |
"code": "gb", | |
"longitude": "-2", | |
"latitude": "54", | |
"another_name:original_name": "United Kingdom" | |
}, | |
"lv": { | |
"population": "2191580", | |
"name": "Latvia", | |
"code": "lv", | |
"longitude": "25", | |
"latitude": "57", | |
"another_name:original_name": "Latvija" | |
}, | |
"pl": { | |
"population": "38415284", | |
"name": "Poland", | |
"code": "pl", | |
"longitude": "20", | |
"latitude": "52", | |
"another_name:original_name": "Polska" | |
}, | |
"si": { | |
"population": "1996617", | |
"name": "Slovenia", | |
"code": "si", | |
"longitude": "14.8166666667", | |
"latitude": "46.1166666667", | |
"another_name:original_name": "Slovenija" | |
}, | |
"ie": { | |
"population": "4722028", | |
"name": "Ireland", | |
"code": "ie", | |
"longitude": "-8", | |
"latitude": "53", | |
"another_name:original_name": "Éire/Ireland" | |
}, | |
"gr": { | |
"population": "10767827", | |
"name": "Greece", | |
"code": "gr", | |
"longitude": "22", | |
"latitude": "39", | |
"another_name:original_name": "Ελλάδα" | |
}, | |
"pt": { | |
"population": "10781459", | |
"name": "Portugal", | |
"code": "pt", | |
"longitude": "-8", | |
"latitude": "39.5", | |
"another_name:original_name": "Portugal" | |
}, | |
"fi": { | |
"population": "5262930", | |
"name": "Finland", | |
"code": "fi", | |
"longitude": "26", | |
"latitude": "64", | |
"another_name:original_name": "Suomi/Finland" | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment