Skip to content

Instantly share code, notes, and snippets.

@crstn
Forked from mbostock/.block
Last active August 29, 2015 13:57
Show Gist options
  • Save crstn/9404985 to your computer and use it in GitHub Desktop.
Save crstn/9404985 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
country usd
MNE 212071344
EST -3643199
HUN -6611887
JOR 1289290880
ERI 42736336
SVN -1732240
MKD 116353200
MYS 10559068
SRB 143880736
BIH 342582784
CRO -41275976
PHL 1620401280
<!DOCTYPE html>
<meta charset="utf-8">
<title>Mercator Projection</title>
<style>
path {
fill: #ccc;
stroke: #fff;
}
</style>
<svg width="960" height="500"></svg>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script>
d3.json("readme.json", function(collection) {
d3.select("svg").selectAll("path")
.data(collection.features)
.enter().append("path")
.attr("d", d3.geo.path().projection(d3.geo.mercator()));
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment