Skip to content

Instantly share code, notes, and snippets.

@chriseyre2000
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chriseyre2000/63197f0db6686bce13cf to your computer and use it in GitHub Desktop.
Save chriseyre2000/63197f0db6686bce13cf to your computer and use it in GitHub Desktop.
MAP
{"description":"MAP","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"worldcountries.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"pingpong","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"ajax-caching":true,"thumbnail":"http://i.imgur.com/79UmKHb.png"}
var countriesData = tributary.worldcountries;
var svg = d3.select("svg");
var projection = d3.geo.mercator()
.scale(58)
.translate([409, 282]);
var geopath = d3.geo.path()
.projection(projection);
svg.selectAll("path")
.data(countriesData.features)
.enter()
.append("path")
.attr({
d: function(d) { return geopath(d) },
id: function(d) { return d.properties.name},
stroke: "#686868",
fill: function(d) { if (d.properties.name != "Brazil") return " #75c9cc" }
});
svg.select("#Antarctica").remove();
Display the source blob
Display the rendered blob
Raw
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