[ Launch: Europe from the East, Harrison ] 6072311 by fasiha
[ Launch: satellite, venezuela by Harrison ] 5654960 by fasiha
[ Launch: satellite ] 5654945 by fasiha
[ Launch: satellite ] 5654942 by fasiha
[ Launch: satellite ] 5105295 by enjalot
[ Launch: satellite ] 4700685 by enjalot
/_.md
Created
July 24, 2013 16:49
Europe from the East, Harrison
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
{"description":"Europe from the East, Harrison","endpoint":"","display":"svg","public":true,"require":[{"name":"projection","url":"http://d3js.org/d3.geo.projection.v0.min.js"},{"name":"topojson","url":"http://d3js.org/topojson.v0.min.js"}],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"world110.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"style.css":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"us.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"thumbnail":"http://i.imgur.com/hZFispE.png"} |
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://www.nytimes.com/interactive/2013/03/01/world/americas/border-graphic.html | |
var svg = d3.select("svg"); | |
var width = tributary.sw; | |
var height = tributary.sh; | |
var world = tributary.world110; | |
var countries = topojson.object(world, world.objects.countries) | |
var us = tributary.us; | |
//var states = topojson.object(us, us.objects.land); | |
var globe = {type: "Sphere"}; | |
var d = 1.82; | |
var projection = d3.geo.satellite() | |
.distance(d) | |
.scale(668) | |
.rotate([-58.3, -56.9, -82])//-long,-lat,rot clockwise from north | |
.center([0, 0]) | |
.translate([390,630]) | |
.tilt(-12) | |
.clipAngle(Math.acos(1 / d) * 180 / Math.PI - 1e-6); | |
//var projection = d3.geo.mercator() | |
//.scale(650) | |
// The reference 74ºW, 41ºN is at 181px, 710px. | |
//var offset = projection.translate([-181, -710])([-74, 41]); | |
//projection.translate([-offset[0], -offset[1]]); | |
//alert(([0.0,0.0])) | |
var graticule = d3.geo.graticule() | |
.extent([[-40, 40], [40 + 1e-6, 70 + 1e-6]])//[long,lat] | |
.step([10, 10]); | |
var path = d3.geo.path() | |
.projection(projection); | |
svg.append("path") | |
.datum(graticule) | |
.attr("class", "graticule") | |
.attr("d", path); | |
svg.append("path") | |
.datum(countries) | |
.attr("class", "land") | |
.attr("d", path); |
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
.graticule { | |
fill: none; | |
stroke: red; | |
} | |
.land { | |
fill: #787985; | |
fill-opacity: .8; | |
stroke: #000; | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment