-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.mp4 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
all: | ||
|
||
webserver: | ||
hs | ||
# python -m http.server |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,164 @@ | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/topojson/1.6.9/topojson.min.js"></script> | ||
<script src="./datamaps/dist/datamaps.world.min.js"></script> | ||
<div id="container" style="position: relative; width: 1000px; height: 1000px;"></div> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script src="https://d3js.org/d3.v4.min.js"></script> | ||
<script src="https://unpkg.com/topojson-client@3"></script> | ||
</head> | ||
<body> | ||
<svg width="640" height="640"></svg> | ||
</body> | ||
</html> | ||
|
||
<style> | ||
.stroke { | ||
fill: none; | ||
stroke: #000; | ||
stroke-width: 0; | ||
} | ||
|
||
.fill { | ||
fill: #1795d1; | ||
} | ||
|
||
.graticule { | ||
fill: none; | ||
stroke: #888; | ||
stroke-width: 1px; | ||
stroke-opacity: 0.5; | ||
} | ||
|
||
.land { | ||
fill: #fff ; | ||
} | ||
|
||
.boundary { | ||
fill: none; | ||
stroke: #fff; | ||
stroke-width: 0; | ||
} | ||
|
||
.route { | ||
fill: none; | ||
stroke: #000; | ||
stroke-width: 5px; | ||
} | ||
|
||
.point { | ||
fill: none; | ||
stroke: #000; | ||
stroke-width: 10px; | ||
} | ||
</style> | ||
|
||
<script> | ||
var map = new Datamap({ | ||
element: document.getElementById('container') | ||
}); | ||
</script> | ||
|
||
function getLineString(i) { | ||
return { | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"geometry": { | ||
"type": "LineString", | ||
"coordinates": i | ||
} | ||
} | ||
] | ||
}; | ||
} | ||
|
||
function getMultiPoint(i) { | ||
return { | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"geometry": { | ||
"type": "MultiPoint", | ||
"coordinates": i | ||
} | ||
} | ||
] | ||
}; | ||
} | ||
|
||
var svg = d3.select("svg"), | ||
width = +svg.attr("width"), | ||
height = +svg.attr("height"); | ||
|
||
var projection = d3.geoAzimuthalEquidistant() | ||
.scale(100) | ||
.translate([width / 2, height / 2]) | ||
.rotate([0,-90]) | ||
.clipAngle(180 - 1e-3) | ||
.precision(0.1); | ||
|
||
var path = d3.geoPath() | ||
.projection(projection); | ||
|
||
svg.append("defs").append("path") | ||
.datum({type: "Sphere"}) | ||
.attr("id", "sphere") | ||
.attr("d", path); | ||
|
||
svg.append("use") | ||
.attr("class", "stroke") | ||
.attr("xlink:href", "#sphere"); | ||
|
||
svg.append("use") | ||
.attr("class", "fill") | ||
.attr("xlink:href", "#sphere"); | ||
|
||
svg.append("path") | ||
.datum(function() { | ||
return d3.geoGraticule() | ||
.stepMinor([30,30]) | ||
.extentMinor([[-180,-90], [180,90]]) | ||
(); | ||
}) | ||
.attr("class", "graticule") | ||
.attr("d", path); | ||
|
||
function addRoute(r) { | ||
svg.insert("path", ".route") | ||
.datum(getLineString(r)) | ||
.attr("class", "route") | ||
.attr("d", path); | ||
|
||
svg.insert("path", ".point") | ||
.datum(getMultiPoint(r)) | ||
.attr("class", "point") | ||
.attr("d", path); | ||
} | ||
|
||
d3.json("common/50m.json", function(error, world) { | ||
if (error) throw error; | ||
|
||
svg.insert("path", ".graticule") | ||
.datum(topojson.feature(world, world.objects.land)) | ||
.attr("class", "land") | ||
.attr("d", path); | ||
|
||
svg.insert("path", ".graticule") | ||
.datum(topojson.mesh(world, world.objects.countries, function(a, b) { return a !== b; })) | ||
.attr("class", "boundary") | ||
.attr("d", path); | ||
}); | ||
|
||
d3.json("common/locations.json", function(error, l) { | ||
if (error) throw error; | ||
addRoute([l.adelaide, l.santiago]); | ||
addRoute([l.northpole, l.london]); | ||
addRoute([l.jakarta, l.mecca]); | ||
addRoute([l.losangeles, l.sydney]); | ||
addRoute([l.tokyo, l.jayapura]); | ||
addRoute([l.capetown, l.buenosaires]); | ||
addRoute([l.newdelhi, l.anchorage]); | ||
addRoute([l.auckland, l.bogota]); | ||
addRoute([l.lagos, l.recife]); | ||
addRoute([l.perth, l.johannesburg]); | ||
addRoute([l.newyork, l.casablanca]); | ||
}); | ||
|
||
|
||
</script> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/topojson/1.6.9/topojson.min.js"></script> | ||
<script src="./datamaps/dist/datamaps.world.min.js"></script> | ||
<div id="container" style="position: relative; width: 1000px; height: 1000px;"></div> | ||
<script> | ||
var map = new Datamap({ | ||
element: document.getElementById('container'), | ||
fills: { | ||
defaultFill: '#dddddd' | ||
}, | ||
setProjection: function (element) { | ||
var projection = d3.geo.mercator() | ||
.center([78.9629, 23.5937]) // always in [East Latitude, North Longitude] | ||
.scale(1000); | ||
var path = d3.geo.path().projection(projection); | ||
return { path: path, projection: projection }; | ||
} | ||
}); | ||
</script> |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"scalerank":1,"featurecla":"mountain","name":"Mt. Everest","elevation":8848,"comment":"Worlds highest point","name_alt":null,"lat_y":27.980475165,"long_x":86.880625847,"nation1":null,"nation2":null,"note":null,"region":"Asia","subregion":null,"min_zoom":4},"bbox":[86.880596,27.980481,86.880596,27.980481],"geometry":{"type":"Point","coordinates":[86.880596,27.980481]}},{"type":"Feature","properties":{"scalerank":2,"featurecla":"mountain","name":"Mt. Kilimanjaro","elevation":5895,"comment":"Highest point in Africa","name_alt":null,"lat_y":-3.075738214,"long_x":37.353282097,"nation1":null,"nation2":null,"note":null,"region":"Africa","subregion":null,"min_zoom":5},"bbox":[37.353252,-3.075715,37.353252,-3.075715],"geometry":{"type":"Point","coordinates":[37.353252,-3.075715]}},{"type":"Feature","properties":{"scalerank":2,"featurecla":"mountain","name":"Vinson Massif","elevation":4892,"comment":null,"name_alt":null,"lat_y":-78.529351495,"long_x":-85.633717414,"nation1":null,"nation2":null,"note":null,"region":"Antarctica","subregion":null,"min_zoom":5},"bbox":[-85.633729,-78.529362,-85.633729,-78.529362],"geometry":{"type":"Point","coordinates":[-85.633729,-78.529362]}},{"type":"Feature","properties":{"scalerank":2,"featurecla":"depression","name":"Turpan Depression","elevation":-154,"comment":null,"name_alt":null,"lat_y":42.768683173,"long_x":89.340098504,"nation1":null,"nation2":null,"note":null,"region":"Asia","subregion":null,"min_zoom":5},"bbox":[89.34012,42.768685,89.34012,42.768685],"geometry":{"type":"Point","coordinates":[89.34012,42.768685]}},{"type":"Feature","properties":{"scalerank":2,"featurecla":"depression","name":null,"elevation":-416,"comment":"Worlds lowest point","name_alt":null,"lat_y":31.515387274,"long_x":35.474742058,"nation1":null,"nation2":null,"note":null,"region":"Asia","subregion":null,"min_zoom":5},"bbox":[35.47472,31.51539,35.47472,31.51539],"geometry":{"type":"Point","coordinates":[35.47472,31.51539]}},{"type":"Feature","properties":{"scalerank":2,"featurecla":"pass","name":"Khyber Pass","elevation":1070,"comment":null,"name_alt":null,"lat_y":34.098395087,"long_x":71.097788933,"nation1":null,"nation2":null,"note":null,"region":"Asia","subregion":null,"min_zoom":5},"bbox":[71.09783,34.098391,71.09783,34.098391],"geometry":{"type":"Point","coordinates":[71.09783,34.098391]}},{"type":"Feature","properties":{"scalerank":2,"featurecla":"mountain","name":"K2","elevation":8611,"comment":null,"name_alt":null,"lat_y":35.882391669,"long_x":76.513194207,"nation1":null,"nation2":null,"note":null,"region":"Asia","subregion":null,"min_zoom":5},"bbox":[76.513209,35.882406,76.513209,35.882406],"geometry":{"type":"Point","coordinates":[76.513209,35.882406]}},{"type":"Feature","properties":{"scalerank":2,"featurecla":"mountain","name":"Muztag Feng","elevation":6973,"comment":null,"name_alt":"Ulugh Muztag","lat_y":36.416510321,"long_x":87.413218621,"nation1":null,"nation2":null,"note":null,"region":"Asia","subregion":null,"min_zoom":5},"bbox":[87.413199,36.416504,87.413199,36.416504],"geometry":{"type":"Point","coordinates":[87.413199,36.416504]}},{"type":"Feature","properties":{"scalerank":2,"featurecla":"mountain","name":"Kailash","elevation":6638,"comment":null,"name_alt":null,"lat_y":31.06659577,"long_x":81.312510613,"nation1":null,"nation2":null,"note":null,"region":"Asia","subregion":null,"min_zoom":5},"bbox":[81.312536,31.066599,81.312536,31.066599],"geometry":{"type":"Point","coordinates":[81.312536,31.066599]}},{"type":"Feature","properties":{"scalerank":2,"featurecla":"depression","name":null,"elevation":-28,"comment":"Lowest point in Europe","name_alt":null,"lat_y":44.257574774,"long_x":49.009532097,"nation1":null,"nation2":null,"note":null,"region":"Europe","subregion":null,"min_zoom":5},"bbox":[49.009534,44.257559,49.009534,44.257559],"geometry":{"type":"Point","coordinates":[49.009534,44.257559]}},{"type":"Feature","properties":{"scalerank":2,"featurecla":"mountain","name":"Gora Elbrus","elevation":5642,"comment":"Highest point in Europe","name_alt":"Mount Elbrus","lat_y":43.355169989,"long_x":42.439219597,"nation1":null,"nation2":null,"note":null,"region":"Europe","subregion":null,"min_zoom":5},"bbox":[42.439198,43.355171,42.439198,43.355171],"geometry":{"type":"Point","coordinates":[42.439198,43.355171]}},{"type":"Feature","properties":{"scalerank":2,"featurecla":"depression","name":"Death Valley","elevation":-86,"comment":"Lowest point in N. America","name_alt":null,"lat_y":36.24225495,"long_x":-116.828236457,"nation1":null,"nation2":null,"note":null,"region":"North America","subregion":null,"min_zoom":5},"bbox":[-116.828226,36.242255,-116.828226,36.242255],"geometry":{"type":"Point","coordinates":[-116.828226,36.242255]}},{"type":"Feature","properties":{"scalerank":2,"featurecla":"mountain","name":"Denali","elevation":6194,"comment":"Highest point in N. America","name_alt":"Mt. McKinley","lat_y":63.069403387,"long_x":-151.007313606,"nation1":null,"nation2":null,"note":null,"region":"North America","subregion":null,"min_zoom":5},"bbox":[-151.007296,63.069411,-151.007296,63.069411],"geometry":{"type":"Point","coordinates":[-151.007296,63.069411]}},{"type":"Feature","properties":{"scalerank":2,"featurecla":"mountain","name":"Mt. Whitney","elevation":4421,"comment":null,"name_alt":null,"lat_y":36.582709052,"long_x":-118.292225715,"nation1":null,"nation2":null,"note":null,"region":"North America","subregion":null,"min_zoom":5},"bbox":[-118.292218,36.582715,-118.292218,36.582715],"geometry":{"type":"Point","coordinates":[-118.292218,36.582715]}},{"type":"Feature","properties":{"scalerank":2,"featurecla":"depression","name":null,"elevation":-16,"comment":"Lowest point in Australia","name_alt":null,"lat_y":-28.448663019,"long_x":137.284434441,"nation1":null,"nation2":null,"note":null,"region":"Oceania","subregion":"Australia","min_zoom":5},"bbox":[137.284438,-28.448653,137.284438,-28.448653],"geometry":{"type":"Point","coordinates":[137.284438,-28.448653]}},{"type":"Feature","properties":{"scalerank":2,"featurecla":"mountain","name":"Mt. Kosciuszko","elevation":2228,"comment":"Highest point in Australia","name_alt":null,"lat_y":-36.455865167,"long_x":148.263194207,"nation1":null,"nation2":null,"note":null,"region":"Oceania","subregion":"Australia","min_zoom":5},"bbox":[148.263192,-36.45588,148.263192,-36.45588],"geometry":{"type":"Point","coordinates":[148.263192,-36.45588]}},{"type":"Feature","properties":{"scalerank":2,"featurecla":"mountain","name":"Cerro Aconcagua","elevation":6959,"comment":"Highest point in S. America","name_alt":null,"lat_y":-32.655694269,"long_x":-70.015797493,"nation1":null,"nation2":null,"note":null,"region":"South America","subregion":null,"min_zoom":5},"bbox":[-70.015801,-32.655679,-70.015801,-32.655679],"geometry":{"type":"Point","coordinates":[-70.015801,-32.655679]}},{"type":"Feature","properties":{"scalerank":2,"featurecla":"depression","name":null,"elevation":-40,"comment":"Lowest point in S. America","name_alt":null,"lat_y":-42.623955988,"long_x":-63.968800422,"nation1":null,"nation2":null,"note":null,"region":"South America","subregion":null,"min_zoom":5},"bbox":[-63.968778,-42.623997,-63.968778,-42.623997],"geometry":{"type":"Point","coordinates":[-63.968778,-42.623997]}},{"type":"Feature","properties":{"scalerank":2,"featurecla":"mountain","name":"Cero Raya","elevation":2070,"comment":null,"name_alt":null,"lat_y":5.451666571,"long_x":-66.375599739,"nation1":null,"nation2":null,"note":null,"region":"South America","subregion":null,"min_zoom":5},"bbox":[-66.375591,5.451674,-66.375591,5.451674],"geometry":{"type":"Point","coordinates":[-66.375591,5.451674]}}],"bbox":[-151.007295564175,-78.5293624922791,148.263191525115,63.0694112446755]} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"scalerank":2,"featurecla":"waterfall","name":"Niagara Falls","comment":null,"name_alt":null,"lat_y":43.087653,"long_x":-79.044073,"region":"North America","subregion":null,"min_zoom":5},"bbox":[-79.044118,43.087714,-79.044118,43.087714],"geometry":{"type":"Point","coordinates":[-79.044118,43.087714]}},{"type":"Feature","properties":{"scalerank":2,"featurecla":"waterfall","name":"Salto Angel","comment":null,"name_alt":"Angel Falls","lat_y":5.686836,"long_x":-62.061848,"region":"South America","subregion":null,"min_zoom":5},"bbox":[-62.061818,5.686896,-62.061818,5.686896],"geometry":{"type":"Point","coordinates":[-62.061818,5.686896]}},{"type":"Feature","properties":{"scalerank":2,"featurecla":"waterfall","name":"Iguazu Falls","comment":null,"name_alt":null,"lat_y":-25.568265,"long_x":-54.582842,"region":"South America","subregion":null,"min_zoom":5},"bbox":[-54.582997,-25.568292,-54.582997,-25.568292],"geometry":{"type":"Point","coordinates":[-54.582997,-25.568292]}}],"bbox":[-79.0441178050725,-25.5682919250059,-54.5829971996038,43.0877139343691]} |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"featurecla":"WGS84 bounding box","scalerank":0},"bbox":[-180,-90,180,90],"geometry":{"type":"Polygon","coordinates":[[[180,-90],[176.043956,-90],[172.087912,-90],[168.131868,-90],[164.175824,-90],[160.21978,-90],[156.263736,-90],[152.307692,-90],[148.351648,-90],[144.395604,-90],[140.43956,-90],[136.483516,-90],[132.527473,-90],[128.571429,-90],[124.615385,-90],[120.659341,-90],[116.703297,-90],[112.747253,-90],[108.791209,-90],[104.835165,-90],[100.879121,-90],[96.923077,-90],[92.967033,-90],[89.010989,-90],[85.054945,-90],[81.098901,-90],[77.142857,-90],[73.186813,-90],[69.230769,-90],[65.274725,-90],[61.318681,-90],[57.362637,-90],[53.406593,-90],[49.450549,-90],[45.494505,-90],[41.538462,-90],[37.582418,-90],[33.626374,-90],[29.67033,-90],[25.714286,-90],[21.758242,-90],[17.802198,-90],[13.846154,-90],[9.89011,-90],[5.934066,-90],[1.978022,-90],[-1.978022,-90],[-5.934066,-90],[-9.89011,-90],[-13.846154,-90],[-17.802198,-90],[-21.758242,-90],[-25.714286,-90],[-29.67033,-90],[-33.626374,-90],[-37.582418,-90],[-41.538462,-90],[-45.494505,-90],[-49.450549,-90],[-53.406593,-90],[-57.362637,-90],[-61.318681,-90],[-65.274725,-90],[-69.230769,-90],[-73.186813,-90],[-77.142857,-90],[-81.098901,-90],[-85.054945,-90],[-89.010989,-90],[-92.967033,-90],[-96.923077,-90],[-100.879121,-90],[-104.835165,-90],[-108.791209,-90],[-112.747253,-90],[-116.703297,-90],[-120.659341,-90],[-124.615385,-90],[-128.571429,-90],[-132.527473,-90],[-136.483516,-90],[-140.43956,-90],[-144.395604,-90],[-148.351648,-90],[-152.307692,-90],[-156.263736,-90],[-160.21978,-90],[-164.175824,-90],[-168.131868,-90],[-172.087912,-90],[-176.043956,-90],[-180,-90],[-180,-86.086957],[-180,-82.173913],[-180,-78.26087],[-180,-74.347826],[-180,-70.434783],[-180,-66.521739],[-180,-62.608696],[-180,-58.695652],[-180,-54.782609],[-180,-50.869565],[-180,-46.956522],[-180,-43.043478],[-180,-39.130435],[-180,-35.217391],[-180,-31.304348],[-180,-27.391304],[-180,-23.478261],[-180,-19.565217],[-180,-15.652174],[-180,-11.73913],[-180,-7.826087],[-180,-3.913043],[-180,0],[-180,3.913043],[-180,7.826087],[-180,11.73913],[-180,15.652174],[-180,19.565217],[-180,23.478261],[-180,27.391304],[-180,31.304348],[-180,35.217391],[-180,39.130435],[-180,43.043478],[-180,46.956522],[-180,50.869565],[-180,54.782609],[-180,58.695652],[-180,62.608696],[-180,66.521739],[-180,70.434783],[-180,74.347826],[-180,78.26087],[-180,82.173913],[-180,86.086957],[-180,90],[-176.043956,90],[-172.087912,90],[-168.131868,90],[-164.175824,90],[-160.21978,90],[-156.263736,90],[-152.307692,90],[-148.351648,90],[-144.395604,90],[-140.43956,90],[-136.483516,90],[-132.527473,90],[-128.571429,90],[-124.615385,90],[-120.659341,90],[-116.703297,90],[-112.747253,90],[-108.791209,90],[-104.835165,90],[-100.879121,90],[-96.923077,90],[-92.967033,90],[-89.010989,90],[-85.054945,90],[-81.098901,90],[-77.142857,90],[-73.186813,90],[-69.230769,90],[-65.274725,90],[-61.318681,90],[-57.362637,90],[-53.406593,90],[-49.450549,90],[-45.494505,90],[-41.538462,90],[-37.582418,90],[-33.626374,90],[-29.67033,90],[-25.714286,90],[-21.758242,90],[-17.802198,90],[-13.846154,90],[-9.89011,90],[-5.934066,90],[-1.978022,90],[1.978022,90],[5.934066,90],[9.89011,90],[13.846154,90],[17.802198,90],[21.758242,90],[25.714286,90],[29.67033,90],[33.626374,90],[37.582418,90],[41.538462,90],[45.494505,90],[49.450549,90],[53.406593,90],[57.362637,90],[61.318681,90],[65.274725,90],[69.230769,90],[73.186813,90],[77.142857,90],[81.098901,90],[85.054945,90],[89.010989,90],[92.967033,90],[96.923077,90],[100.879121,90],[104.835165,90],[108.791209,90],[112.747253,90],[116.703297,90],[120.659341,90],[124.615385,90],[128.571429,90],[132.527473,90],[136.483516,90],[140.43956,90],[144.395604,90],[148.351648,90],[152.307692,90],[156.263736,90],[160.21978,90],[164.175824,90],[168.131868,90],[172.087912,90],[176.043956,90],[180,90],[180,86.086957],[180,82.173913],[180,78.26087],[180,74.347826],[180,70.434783],[180,66.521739],[180,62.608696],[180,58.695652],[180,54.782609],[180,50.869565],[180,46.956522],[180,43.043478],[180,39.130435],[180,35.217391],[180,31.304348],[180,27.391304],[180,23.478261],[180,19.565217],[180,15.652174],[180,11.73913],[180,7.826087],[180,3.913043],[180,0],[180,-3.913043],[180,-7.826087],[180,-11.73913],[180,-15.652174],[180,-19.565217],[180,-23.478261],[180,-27.391304],[180,-31.304348],[180,-35.217391],[180,-39.130435],[180,-43.043478],[180,-46.956522],[180,-50.869565],[180,-54.782609],[180,-58.695652],[180,-62.608696],[180,-66.521739],[180,-70.434783],[180,-74.347826],[180,-78.26087],[180,-82.173913],[180,-86.086957],[180,-90]]]}}],"bbox":[-180,-90,180,90]} |