Inspired by Derek Watkins's Faux-3D Arcs and Mike Bostock's World Tour
Last active
July 16, 2018 11:31
-
-
Save armollica/88ef1c807c4bb4cff6f7e033e25172ee to your computer and use it in GitHub Desktop.
World Tour along Flying Arcs
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
height: 600 |
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
{"type":"FeatureCollection","features":[ | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[12.453386544971766,41.903282179960115]},"properties":{"name":"Vatican City","countryName":"Vatican (Holy Sea)"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[12.441770157800141,43.936095834768004]},"properties":{"name":"San Marino","countryName":"San Marino"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[9.516669472907267,47.13372377429357]},"properties":{"name":"Vaduz","countryName":"Liechtenstein"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[6.130002806227083,49.611660379121076]},"properties":{"name":"Luxembourg","countryName":"Luxembourg"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[158.1499743237623,6.916643696007725]},"properties":{"name":"Palikir","countryName":"Federated States of Micronesia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[171.38000017574655,7.103004311216239]},"properties":{"name":"Majuro","countryName":"Marshall Islands"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[179.21664709402887,-8.516651999041073]},"properties":{"name":"Funafuti","countryName":"Tuvalu"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[134.62654846699218,7.487396172977981]},"properties":{"name":"Melekeok","countryName":"Palau"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[7.406913173465057,43.73964568785249]},"properties":{"name":"Monaco","countryName":"Monaco"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[173.01757082854942,1.338187505624603]},"properties":{"name":"Tarawa","countryName":"Kiribati"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[43.240244098693324,-11.70415769566847]},"properties":{"name":"Moroni","countryName":"Comoros"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[1.5164859605055199,42.5000014435459]},"properties":{"name":"Andorra","countryName":"Andorra"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-61.51703088544974,10.651997089577264]},"properties":{"name":"Port-of-Spain","countryName":"Trinidad and Tobago"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[30.058585919064114,-1.9516442100632503]},"properties":{"name":"Kigali","countryName":"Rwanda"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[31.133334512056365,-26.316650778409212]},"properties":{"name":"Mbabane","countryName":"Swaziland"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[31.580025592787308,4.829975198277964]},"properties":{"name":"Juba","countryName":"South Sudan"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[14.51496903347413,46.0552883087945]},"properties":{"name":"Ljubljana","countryName":"Slovenia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[17.11698075223461,48.15001832996171]},"properties":{"name":"Bratislava","countryName":"Slovakia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[51.532967894299304,25.286556008906587]},"properties":{"name":"Doha","countryName":"Qatar"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[19.266306924118226,42.465972512881706]},"properties":{"name":"Podgorica","countryName":"Montenegro"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[7.466975462482424,46.91668275866772]},"properties":{"name":"Bern","countryName":"Switzerland"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[21.165984251599866,42.666709614119384]},"properties":{"name":"Pristina","countryName":"Kosovo"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-61.387012981803366,15.301015644283325]},"properties":{"name":"Roseau","countryName":"Dominica"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[43.148001667052256,11.595014464255485]},"properties":{"name":"Djibouti","countryName":"Djibouti"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-16.591701489212596,13.45387646031594]},"properties":{"name":"Banjul","countryName":"The Gambia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[21.4334614651425,42.00000612290586]},"properties":{"name":"Skopje","countryName":"Macedonia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-59.61652673505159,13.10200258275114]},"properties":{"name":"Bridgetown","countryName":"Barbados"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[29.360006061528395,-3.376087220374643]},"properties":{"name":"Bujumbura","countryName":"Burundi"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-61.212062420279324,13.14827882786841]},"properties":{"name":"Kingstown","countryName":"Saint Vincent and the Grenadines"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-61.00000818036955,14.00197348933034]},"properties":{"name":"Castries","countryName":"Saint Lucia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-62.71700931969934,17.302030455489387]},"properties":{"name":"Basseterre","countryName":"Saint Kitts and Nevis"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[57.49999385460973,-20.166638571353246]},"properties":{"name":"Port Louis","countryName":"Mauritius"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-61.74164322607476,12.052633401720414]},"properties":{"name":"Saint George's","countryName":"Grenada"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[50.58305171591019,26.236136290485945]},"properties":{"name":"Manama","countryName":"Bahrain"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-61.85003381513866,17.118036518314113]},"properties":{"name":"Saint John's","countryName":"Antigua and Barbuda"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-56.17299814703597,-34.856095707590725]},"properties":{"name":"Montevideo","countryName":"Uruguay"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[1.22081126074562,6.133882930268385]},"properties":{"name":"Lome","countryName":"Togo"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[10.179678099212026,36.80277813623144]},"properties":{"name":"Tunis","countryName":"Tunisia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[54.36659338259199,24.466683572379907]},"properties":{"name":"Abu Dhabi","countryName":"United Arab Emirates"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[58.38329911177465,37.949994933110986]},"properties":{"name":"Ashgabat","countryName":"Turkmenistan"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[28.28138173611427,-15.414698409335926]},"properties":{"name":"Lusaka","countryName":"Zambia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[31.042763572062825,-17.815843835777798]},"properties":{"name":"Harare","countryName":"Zimbabwe"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[125.57945593170507,-8.559388408546454]},"properties":{"name":"Dili","countryName":"East Timor"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[168.31664058356864,-17.733350404025828]},"properties":{"name":"Port Vila","countryName":"Vanuatu"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-87.2194751979415,14.103990759076396]},"properties":{"name":"Tegucigalpa","countryName":"Honduras"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-58.167028647480606,6.8019736927520285]},"properties":{"name":"Georgetown","countryName":"Guyana"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-21.950014487179544,64.15002361973922]},"properties":{"name":"Reykjavík","countryName":"Iceland"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-72.33798044690553,18.54297045473237]},"properties":{"name":"Port-au-Prince","countryName":"Haiti"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[32.581377667121046,0.318604813383331]},"properties":{"name":"Kampala","countryName":"Uganda"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-55.16703088542437,5.835030129922586]},"properties":{"name":"Paramaribo","countryName":"Suriname"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[2.114710186530374,13.51865181050647]},"properties":{"name":"Niamey","countryName":"Niger"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[68.77387935270173,38.56003521631658]},"properties":{"name":"Dushanbe","countryName":"Tajikistan"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-57.643451027901335,-25.294457117057675]},"properties":{"name":"Asuncion","countryName":"Paraguay"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-86.27043751890119,12.154962438756115]},"properties":{"name":"Managua","countryName":"Nicaragua"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-13.236161599012746,8.471957271098177]},"properties":{"name":"Freetown","countryName":"Sierra Leone"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[73.16468862105955,33.70194180895959]},"properties":{"name":"Islamabad","countryName":"Pakistan"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[85.31469635222788,27.718637772477223]},"properties":{"name":"Kathmandu","countryName":"Nepal"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[26.22991288117737,-29.119993877378704]},"properties":{"name":"Bloemfontein","countryName":"South Africa"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[28.22748321723384,-25.704974695184433]},"properties":{"name":"Pretoria","countryName":"South Africa"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[147.19250362059358,-9.464707825867777]},"properties":{"name":"Port Moresby","countryName":"Papua New Guinea"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[159.94976573360566,-9.437994295089595]},"properties":{"name":"Honiara","countryName":"Solomon Islands"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-79.53498301041077,8.969963049094872]},"properties":{"name":"Panama City","countryName":"Panama"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-6.83640815612614,34.02530731107282]},"properties":{"name":"Rabat","countryName":"Morocco"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[28.85771113965143,47.005023619670624]},"properties":{"name":"Chisinau","countryName":"Moldova"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[32.58721710397009,-25.953331628778983]},"properties":{"name":"Maputo","countryName":"Mozambique"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[45.36473175245874,2.068627192947531]},"properties":{"name":"Mogadishu","countryName":"Somalia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[58.593312132608844,23.613324807728134]},"properties":{"name":"Muscat","countryName":"Oman"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[79.85775060925641,6.931965758182116]},"properties":{"name":"Colombo","countryName":"Sri Lanka"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[106.91466990374653,47.91861925856074]},"properties":{"name":"Ulaanbaatar","countryName":"Mongolia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[174.78327429127694,-41.29997393927641]},"properties":{"name":"Wellington","countryName":"New Zealand"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[17.08354610054181,-22.570006084383806]},"properties":{"name":"Windhoek","countryName":"Namibia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[7.53138214293233,9.085279007754195]},"properties":{"name":"Abuja","countryName":"Nigeria"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-15.598360841320755,11.865023822980561]},"properties":{"name":"Bissau","countryName":"Guinea Bissau"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[35.93135406687412,31.951971105827454]},"properties":{"name":"Amman","countryName":"Jordan"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[25.3166352932829,54.68336631175862]},"properties":{"name":"Vilnius","countryName":"Lithuania"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[24.099965371403187,56.95002382316096]},"properties":{"name":"Riga","countryName":"Latvia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[74.58325836390367,42.875025305090105]},"properties":{"name":"Bishkek","countryName":"Kyrgyzstan"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[27.483273069984477,-29.316674378681626]},"properties":{"name":"Maseru","countryName":"Lesotho"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[47.51467804152986,-18.914691492032148]},"properties":{"name":"Antananarivo","countryName":"Madagascar"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-78.5019969671124,-0.2130423220355624]},"properties":{"name":"Quito","countryName":"Ecuador"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-84.08599721127536,9.936958288356607]},"properties":{"name":"San Jose","countryName":"Costa Rica"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-89.2049870794599,13.711947505494038]},"properties":{"name":"San Salvador","countryName":"El Salvador"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-76.7674337136691,17.977076623830897]},"properties":{"name":"Kingston","countryName":"Jamaica"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[15.047202455462298,12.115042394810644]},"properties":{"name":"Ndjamena","countryName":"Chad"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[8.783277545821136,3.750015278026183]},"properties":{"name":"Malabo","countryName":"Equatorial Guinea"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[38.933323525759306,15.333339252681924]},"properties":{"name":"Asmara","countryName":"Eritrea"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[15.999994668245677,45.80000673327254]},"properties":{"name":"Zagreb","countryName":"Croatia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[24.72804072947855,59.43387737948592]},"properties":{"name":"Tallinn","countryName":"Estonia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[33.78330195998353,-13.983295065469179]},"properties":{"name":"Lilongwe","countryName":"Malawi"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-90.52891143656154,14.623080521448173]},"properties":{"name":"Guatemala","countryName":"Guatemala"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[9.457965045823698,0.3853886097185182]},"properties":{"name":"Libreville","countryName":"Gabon"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[178.44170731537986,-18.133015931371233]},"properties":{"name":"Suva","countryName":"Fiji"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-15.975340414890013,18.086427021247516]},"properties":{"name":"Nouakchott","countryName":"Mauritania"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-8.001984963249697,12.65196052632325]},"properties":{"name":"Bamako","countryName":"Mali"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[35.507762351377664,33.8739209756269]},"properties":{"name":"Beirut","countryName":"Lebanon"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[44.788849590997984,41.72695584707759]},"properties":{"name":"Tbilisi","countryName":"Georgia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[71.427774209483,51.18112530425759]},"properties":{"name":"Astana","countryName":"Kazakhstan"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[102.59998002015476,17.96669272762739]},"properties":{"name":"Vientiane","countryName":"Laos"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[15.282743633848668,-4.257239913197509]},"properties":{"name":"Brazzaville","countryName":"Congo (Brazzaville)"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-13.682180886123945,9.53346870502179]},"properties":{"name":"Conakry","countryName":"Guinea"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-5.275502564912301,6.8183809600046175]},"properties":{"name":"Yamoussoukro","countryName":"Ivory Coast"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-75.70196115980951,45.41864265536043]},"properties":{"name":"Ottawa","countryName":"Canada"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[20.466044822020535,44.82059130444674]},"properties":{"name":"Belgrade","countryName":"Serbia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[114.93328405666227,4.883331114619239]},"properties":{"name":"Bandar Seri Begawan","countryName":"Brunei"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-65.25951562667564,-19.04097084673947]},"properties":{"name":"Sucre","countryName":"Bolivia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-88.76707299981655,17.252033507246892]},"properties":{"name":"Belmopan","countryName":"Belize"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[18.558288125287277,4.366644306349087]},"properties":{"name":"Bangui","countryName":"Central African Republic"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[11.514704896854425,3.868646520754112]},"properties":{"name":"Yaounde","countryName":"Cameroon"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[19.81888301461521,41.327540709491586]},"properties":{"name":"Tirana","countryName":"Albania"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[44.51160553175208,40.18309659414189]},"properties":{"name":"Yerevan","countryName":"Armenia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[49.860271303257775,40.39721789134302]},"properties":{"name":"Baku","countryName":"Azerbaijan"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[104.91468862118643,11.55197598855841]},"properties":{"name":"Phnom Penh","countryName":"Cambodia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-68.15193104910219,-16.49602775504337]},"properties":{"name":"La Paz","countryName":"Bolivia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[2.518044740568598,6.401954422782467]},"properties":{"name":"Cotonou","countryName":"Benin"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[23.314708152110086,42.68529528393054]},"properties":{"name":"Sofia","countryName":"Bulgaria"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[27.56468129665825,53.901923295043105]},"properties":{"name":"Minsk","countryName":"Belarus"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[89.63901403703,27.472985859175765]},"properties":{"name":"Thimphu","countryName":"Bhutan"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[25.91194779328538,-24.646313457438907]},"properties":{"name":"Gaborone","countryName":"Botswana"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[149.1290262442992,-35.283028545372076]},"properties":{"name":"Canberra","countryName":"Australia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-1.5266696149164432,12.372261836543373]},"properties":{"name":"Ouagadougou","countryName":"Burkina Faso"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[18.383001666953305,43.850022398954934]},"properties":{"name":"Sarajevo","countryName":"Bosnia and Herzegovina"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[96.11667267063035,19.76850288475015]},"properties":{"name":"Naypyidaw","countryName":"Myanmar"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-175.22056447761656,-21.13851235669864]},"properties":{"name":"Nukualofa","countryName":"Tonga"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[44.06531001666542,9.56002239881775]},"properties":{"name":"Hargeysa","countryName":"Somaliland"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[55.44998978559113,-4.6166316539734]},"properties":{"name":"Victoria","countryName":"Seychelles"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[6.733325153234773,0.3334021188329075]},"properties":{"name":"Sao Tome","countryName":"Sao Tome and Principe"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-171.73864160860316,-13.841545042448445]},"properties":{"name":"Apia","countryName":"Samoa"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[14.514710651312782,35.89973248193087]},"properties":{"name":"Valletta","countryName":"Malta"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[73.499947467955,4.1667081898118]},"properties":{"name":"Male","countryName":"Maldives"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[35.20662593459866,31.778407815573303]},"properties":{"name":"Jerusalem","countryName":"Israel"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-23.51668888497221,14.916698017328656]},"properties":{"name":"Praia","countryName":"Cape Verde"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-77.35004378427612,25.08339011535122]},"properties":{"name":"Nassau","countryName":"The Bahamas"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[33.36663488641415,35.166676451654496]},"properties":{"name":"Nicosia","countryName":"Cyprus"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[105.8480683412422,21.035273107737055]},"properties":{"name":"Hanoi","countryName":"Vietnam"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[32.862445782356644,39.929184444075474]},"properties":{"name":"Ankara","countryName":"Turkey"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[19.081374818759684,47.50195218499135]},"properties":{"name":"Budapest","countryName":"Hungary"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[44.20464752393843,15.356679154263645]},"properties":{"name":"Sanaa","countryName":"Yemen"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[26.0980007953504,44.43531766349457]},"properties":{"name":"Bucharest","countryName":"Romania"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[36.29805003041707,33.50197985420613]},"properties":{"name":"Damascus","countryName":"Syria"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-9.14681216410213,38.72466873648784]},"properties":{"name":"Lisbon","countryName":"Portugal"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[32.532233380011576,15.590024084277673]},"properties":{"name":"Khartoum","countryName":"Sudan"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[10.748033347372314,59.91863614500187]},"properties":{"name":"Oslo","countryName":"Norway"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[20.998053692465305,52.25194648839556]},"properties":{"name":"Warsaw","countryName":"Poland"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[125.75274485499392,39.02138455800434]},"properties":{"name":"Pyongyang","countryName":"North Korea"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[39.26639597769457,-6.798066736124383]},"properties":{"name":"Dar es Salaam","countryName":"Tanzania"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-6.250851540391068,53.335006994584944]},"properties":{"name":"Dublin","countryName":"Ireland"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-10.799660436775923,6.314581647160139]},"properties":{"name":"Monrovia","countryName":"Liberia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[101.69803741674644,3.168611730712371]},"properties":{"name":"Kuala Lumpur","countryName":"Malaysia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-82.3661280299533,23.1339046995422]},"properties":{"name":"Havana","countryName":"Cuba"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[14.464033917048539,50.08528287347832]},"properties":{"name":"Prague","countryName":"Czech Republic"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[47.97635528762527,29.371663488629565]},"properties":{"name":"Kuwait","countryName":"Kuwait"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-69.90203094331503,18.472018713195382]},"properties":{"name":"Santo Domingo","countryName":"Dominican Republic"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-0.21866159896069348,5.551980464445933]},"properties":{"name":"Accra","countryName":"Ghana"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[13.180011758078194,32.89250001935369]},"properties":{"name":"Tripoli","countryName":"Libya"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[24.93218048284558,60.17750923256807]},"properties":{"name":"Helsinki","countryName":"Finland"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[12.561539888703294,55.68051004902594]},"properties":{"name":"København","countryName":"Denmark"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-4.041994118507091,5.321942826098564]},"properties":{"name":"Abidjan","countryName":"Ivory Coast"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-47.91799814700306,-15.781394372878992]},"properties":{"name":"Brasilia","countryName":"Brazil"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[4.33137074969045,50.83526293533032]},"properties":{"name":"Brussels","countryName":"Belgium"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[90.40663360810754,23.725005570312817]},"properties":{"name":"Dhaka","countryName":"Bangladesh"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[13.23248118266855,-8.836340255012658]},"properties":{"name":"Luanda","countryName":"Angola"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[3.048606670909237,36.765010656628135]},"properties":{"name":"Algiers","countryName":"Algeria"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[96.16473175266185,16.785299963188777]},"properties":{"name":"Rangoon","countryName":"Myanmar"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-66.91898305105042,10.502944413033333]},"properties":{"name":"Caracas","countryName":"Venezuela"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[30.514682110472165,50.43531318760722]},"properties":{"name":"Kiev","countryName":"Ukraine"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[69.29298696088779,41.31364774160721]},"properties":{"name":"Tashkent","countryName":"Uzbekistan"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-3.6852975446125242,40.40197212311381]},"properties":{"name":"Madrid","countryName":"Spain"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[18.095388874180912,59.35270581286585]},"properties":{"name":"Stockholm","countryName":"Sweden"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[100.51469879369489,13.751945064087977]},"properties":{"name":"Bangkok","countryName":"Thailand"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-77.05200795343472,-12.04606681752557]},"properties":{"name":"Lima","countryName":"Peru"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-17.47507598705056,14.717777583623274]},"properties":{"name":"Dakar","countryName":"Senegal"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[28.028063865019476,-26.16809888138414]},"properties":{"name":"Johannesburg","countryName":"South Africa"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[4.914694317400972,52.35191454666443]},"properties":{"name":"Amsterdam","countryName":"Netherlands"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[126.99778513820195,37.56829495838895]},"properties":{"name":"Seoul","countryName":"South Korea"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[120.9802713035424,14.606104813440538]},"properties":{"name":"Manila","countryName":"Philippines"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[13.399602764700546,52.523764522251156]},"properties":{"name":"Berlin","countryName":"Germany"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[15.313026023171744,-4.327778243275986]},"properties":{"name":"Kinshasa","countryName":"Congo (Kinshasa)"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[77.19998002005303,28.600023009245433]},"properties":{"name":"New Delhi","countryName":"India"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[23.731375225679358,37.98527209055226]},"properties":{"name":"Athens","countryName":"Greece"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[44.391922914564134,33.34059435615865]},"properties":{"name":"Baghdad","countryName":"Iraq"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[38.69805857534868,9.035256221295754]},"properties":{"name":"Addis Ababa","countryName":"Ethiopia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[51.42239817500899,35.673888627001304]},"properties":{"name":"Tehran","countryName":"Iran"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-58.399477232331435,-34.600555749907414]},"properties":{"name":"Buenos Aires","countryName":"Argentina"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[69.18131419070505,34.51863614490031]},"properties":{"name":"Kabul","countryName":"Afghanistan"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[16.364693096743736,48.20196113681686]},"properties":{"name":"Vienna","countryName":"Austria"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[121.568333333333,25.0358333333333]},"properties":{"name":"Taipei","countryName":"Taiwan"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-77.01136443943716,38.901495235087054]},"properties":{"name":"Washington, D.C.","countryName":"United States of America"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-0.11866770247593195,51.5019405883275]},"properties":{"name":"London","countryName":"United Kingdom"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[46.770795798688255,24.642779007816443]},"properties":{"name":"Riyadh","countryName":"Saudi Arabia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[18.43304229922603,-33.91806510862875]},"properties":{"name":"Cape Town","countryName":"South Africa"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[37.6135769672714,55.75410998124818]},"properties":{"name":"Moscow","countryName":"Russia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-99.1329340602939,19.444388301415472]},"properties":{"name":"Mexico City","countryName":"Mexico"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[12.481312562873995,41.89790148509894]},"properties":{"name":"Rome","countryName":"Italy"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[116.38633982565943,39.93083808990906]},"properties":{"name":"Beijing","countryName":"China"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[36.81471100047145,-1.2814008832377795]},"properties":{"name":"Nairobi","countryName":"Kenya"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[106.82749176247012,-6.172471846798885]},"properties":{"name":"Jakarta","countryName":"Indonesia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-74.08528981377441,4.598369421147822]},"properties":{"name":"Bogota","countryName":"Colombia"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[31.248022361126118,30.051906205103705]},"properties":{"name":"Cairo","countryName":"Egypt"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[139.74946157054467,35.686962764371174]},"properties":{"name":"Tokyo","countryName":"Japan"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[2.33138946713035,48.86863878981461]},"properties":{"name":"Paris","countryName":"France"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[-70.66898671317483,-33.448067956934096]},"properties":{"name":"Santiago","countryName":"Chile"}}, | |
{"type":"Feature","geometry":{"type":"Point","coordinates":[103.85387481909902,1.2949793251059418]},"properties":{"name":"Singapore","countryName":"Singapore"}} | |
]} |
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
<html> | |
<head> | |
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet"> | |
</head> | |
<body> | |
<script src="https://d3js.org/d3.v4.min.js"></script> | |
<script src="https://d3js.org/topojson.v2.min.js"></script> | |
<script> | |
var oceanColor = '#f9f9f9', | |
landColor = '#ddd', | |
flyingArcColor = 'tomato', | |
flyingArcShadowColor = '#333', | |
flyingArcShadowStrokeColor = '#ccc', | |
cityMarkerColor = '#999', | |
cityLabelColor = '#666', | |
cityLabelShadowColor = '#eee'; | |
var flyingArcWidth = 2, | |
flyingArcShadowWidth = 0.5, | |
flyingArcShadowOpacity = 0.5, | |
flyingArcShadowBlur = 5, | |
cityMarkerRadius = 2, | |
cityLabelFont = '16px "Montserrat", sans-serif', | |
cityLabelTextAlign = 'center', | |
cityLabelOffset = [0, -7], | |
cityLabelShadowBlur = 5, | |
loftedness = 1.3, | |
transitionDuration = 4000, | |
transitionEase = d3.easeQuad; | |
// TODO: These probably shouldn't be global | |
var link, | |
focalPoint, | |
flyingArcLength; | |
var width = 960, | |
height = 600; | |
var canvas = d3.select('body').append('canvas') | |
.attr('width', width) | |
.attr('height', height); | |
var context = canvas.node().getContext('2d'); | |
context.font = cityLabelFont; | |
context.textAlign = cityLabelTextAlign; | |
var projection = d3.geoOrthographic() | |
.scale((height - 10) / 2) | |
.translate([width / 2, height / 2]) | |
.precision(0.1); | |
var loftedProjection = d3.geoOrthographic() | |
.scale(((height - 10) / 2) * loftedness) | |
.translate([width / 2, height / 2]) | |
.precision(0.1); | |
var path = d3.geoPath() | |
.projection(projection) | |
.context(context); | |
var swoosh = d3.line() | |
.curve(d3.curveNatural) | |
.defined(function(d) { return projection.invert(d); }) | |
.context(context); | |
var links = [], | |
linksMap = d3.map(); | |
var draw = function() {} | |
d3.queue() | |
.defer(d3.json, 'https://unpkg.com/world-atlas@1/world/110m.json') | |
.defer(d3.json, 'capitals.json') | |
.await(ready); | |
function ready(error, world, capitals) { | |
if (error) throw error; | |
var sphere = {type: "Sphere"}, | |
land = topojson.feature(world, world.objects.land); | |
// Add unique ID for each capital city | |
capitals.features.forEach(function(d, i) { d.id = i; }); | |
// Spawn links between capital city locations | |
capitals.features.forEach(function(a) { | |
capitals.features.forEach(function(b) { | |
// Don't want a city to link to itself | |
if (a !== b) { | |
var source = a.geometry.coordinates, | |
target = b.geometry.coordinates; | |
// Build GeoJSON feature from this link | |
var feature = { | |
type: 'Feature', | |
geometry: { | |
type: "LineString", | |
coordinates: [source, target] | |
}, | |
properties: { | |
sourceName: a.properties.name, | |
targetName: b.properties.name, | |
sourceId: a.id, | |
targetId: b.id | |
} | |
}; | |
// Two restrictions: | |
// 1) Don't link cities that are too close together | |
// 2) Don't link cities that are too far apart | |
// TODO: Figure out clipping and remove restriction (2) | |
var length = d3.geoLength(feature), | |
minLength = Math.PI / 6, | |
maxLength = Math.PI / 2; | |
if (length > minLength && length < maxLength) { | |
links.push({ | |
sourceId: a.id, | |
targetId: b.id, | |
source: source, | |
target: target, | |
feature: feature | |
}); | |
} | |
} | |
}); | |
}); | |
linksMap = d3.nest() | |
.key(function(d) { return d.sourceId; }) | |
.map(links); | |
draw = function(t) { | |
context.clearRect(0, 0, width, height); | |
// Rotate globe to focus on the flying arc | |
focusGlobeOnPoint(focalPoint(t)); | |
// Oceans | |
context.beginPath(); | |
path(sphere); | |
context.fillStyle = oceanColor; | |
context.fill(); | |
// Land | |
context.beginPath(); | |
path(land); | |
context.fillStyle = landColor; | |
context.fill(); | |
// Flying arc | |
context.beginPath(); | |
swoosh(flyingArc(link)); | |
context.setLineDash([t * flyingArcLength * 1.7, 1e6]); | |
context.lineWidth = flyingArcWidth; | |
context.strokeStyle = flyingArcColor; | |
context.stroke(); | |
// Flying arc's shadow | |
context.beginPath(); | |
path(link.feature); | |
context.setLineDash([t * flyingArcLength * 1.6, 1e6]); | |
context.globalAlpha = flyingArcShadowOpacity; | |
context.shadowColor = flyingArcShadowColor; | |
context.shadowBlur = flyingArcShadowBlur; | |
context.lineWidth = flyingArcShadowWidth; | |
context.strokeStyle = flyingArcShadowStrokeColor; | |
context.stroke(); | |
context.shadowBlur = 0; | |
context.globalAlpha = 1; | |
// Source city marker | |
var p = projection(link.source), | |
x = p[0], | |
y = p[1]; | |
context.beginPath(); | |
context.arc(x, y, cityMarkerRadius, 0, 2 * Math.PI); | |
context.fillStyle = cityMarkerColor; | |
context.fill(); | |
// Source city label | |
var x = x + cityLabelOffset[0], | |
y = y + cityLabelOffset[1]; | |
context.shadowBlur = cityLabelShadowBlur; | |
context.shadowColor = cityLabelShadowColor; | |
context.fillStyle = cityLabelColor; | |
context.fillText(link.feature.properties.sourceName, x, y); | |
context.shadowBlur = 0; | |
// Target city marker | |
var p = projection(link.target), | |
x = p[0], | |
y = p[1]; | |
context.beginPath(); | |
context.arc(x, y, cityMarkerRadius, 0, 2 * Math.PI); | |
context.fillStyle = cityMarkerColor; | |
context.fill(); | |
// Target city label | |
var x = x + cityLabelOffset[0], | |
y = y + cityLabelOffset[1]; | |
context.shadowBlur = cityLabelShadowBlur; | |
context.shadowColor = cityLabelShadowColor; | |
context.fillStyle = cityLabelColor; | |
context.fillText(link.feature.properties.targetName, x, y); | |
context.shadowBlur = 0; | |
}; | |
link = pluckRandom(links); | |
function shuffle() { | |
focalPoint = d3.geoInterpolate(link.source, link.target); | |
flyingArcLength = lineLength(flyingArc(link)); | |
var timer = d3.timer(tick); | |
function tick(elapsed) { | |
var t0 = elapsed / transitionDuration, | |
t = transitionEase(t0); | |
draw(t); | |
if (t0 >= 1) { | |
timer.stop(); | |
// The current target becomes the next source. Pick the next | |
// target at random. | |
var targetLinks = linksMap.get(link.targetId); | |
link = pluckRandom(targetLinks); | |
shuffle(); | |
}; | |
} | |
} | |
shuffle(); | |
} | |
function flyingArc(link) { | |
var source = link.source, | |
target = link.target, | |
middle = locationAlongArc(source, target, 0.5); | |
return [ | |
projection(source), | |
loftedProjection(middle), | |
projection(target) | |
]; | |
} | |
function locationAlongArc(start, end, theta) { | |
return d3.geoInterpolate(start, end)(theta); | |
} | |
function focusGlobeOnPoint(point) { | |
var x = point[0], | |
y = point[1], | |
cx = x, | |
cy = y - 25, | |
rotation = [-cx, -cy]; | |
projection.rotate(rotation); | |
loftedProjection.rotate(rotation); | |
} | |
function lineLength(points) { | |
var d = 0; | |
for (var i = 0; i < points.length - 1; i++) { | |
var x0 = points[0][0], | |
y0 = points[0][1], | |
x1 = points[1][0], | |
y1 = points[1][1], | |
dx = x1 - x0, | |
dy = y1 - y0; | |
d += Math.sqrt(dx * dx + dy * dy); | |
} | |
return d; | |
} | |
function randomInt(n) { | |
return Math.floor(Math.random() * n); | |
} | |
function pluckRandom(array) { | |
var n = array.length - 1, | |
i = randomInt(n); | |
return array[i]; | |
} | |
</script> | |
</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
all: capitals.json | |
zip/ne_110m_populated_places_simple.zip: | |
mkdir -p $(dir $@) | |
curl -L -o [email protected] 'http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/ne_110m_populated_places_simple.zip' | |
mv [email protected] $@ | |
shp/ne_110m_populated_places_simple.shp: zip/ne_110m_populated_places_simple.zip | |
mkdir -p $(dir $@) | |
unzip -d $(dir $@) $< | |
touch $@ | |
capitals.json: shp/ne_110m_populated_places_simple.shp | |
mapshaper \ | |
-i $< \ | |
-filter 'featurecla === "Admin-0 capital"' \ | |
-each 'countryName = adm0name' \ | |
-filter-fields name,countryName \ | |
-o $@ format=geojson force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment