Last active
February 1, 2020 08:29
-
-
Save mbostock/5996232 to your computer and use it in GitHub Desktop.
Revisions
-
mbostock revised this gist
Feb 9, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ license: gpl-3.0 -
mbostock revised this gist
Oct 31, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -12,8 +12,8 @@ </style> <body> <script src="//d3js.org/d3.v3.min.js"></script> <script src="//d3js.org/topojson.v1.min.js"></script> <script> var width = 960, -
mbostock revised this gist
Jun 11, 2015 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -12,8 +12,8 @@ </style> <body> <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/topojson/1.6.19/topojson.min.js"></script> <script> var width = 960, @@ -27,6 +27,8 @@ .attr("height", height); d3.json("ny.json", function(error, ny) { if (error) throw error; svg.append("path") .datum(topojson.mesh(ny)) .attr("d", path); -
mbostock revised this gist
Jul 15, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ 13,837 census block groups; 13,866 polygons. 2.1M TopoJSON, 620K gzipped. Made by customizing the makefile in the [U.S. Atlas project](https://github.com/mbostock/us-atlas): ```bash topojson \ -
mbostock revised this gist
Jul 15, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
-
mbostock revised this gist
Jul 14, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -26,7 +26,7 @@ .attr("width", width) .attr("height", height); d3.json("ny.json", function(error, ny) { svg.append("path") .datum(topojson.mesh(ny)) .attr("d", path); -
mbostock revised this gist
Jul 14, 2013 . 3 changed files with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -26,7 +26,7 @@ .attr("width", width) .attr("height", height); d3.json("ny2.json", function(error, ny) { svg.append("path") .datum(topojson.mesh(ny)) .attr("d", path); LoadingSorry, something went wrong. Reload?Sorry, we cannot display this file.Sorry, this file is invalid so it cannot be displayed. -
mbostock revised this gist
Jul 14, 2013 . 2 changed files with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -28,7 +28,7 @@ d3.json("ny.json", function(error, ny) { svg.append("path") .datum(topojson.mesh(ny)) .attr("d", path); }); -
mbostock created this gist
Jul 14, 2013 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ 13,837 census block groups; 13,866 polygons. 2.1M TopoJSON, 468K gzipped. Made by customizing the makefile in the [U.S. Atlas project](https://github.com/mbostock/us-atlas): ```bash topojson \ -o ny.json \ --projection 'd3.geo.mercator().center([-75.819, 42.795]).scale(6193).translate([480, 350]).precision(0)' \ -q 1e5 \ -s .5 \ -- blockgroups=shp/ny/blockgroups.shp ``` This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,37 @@ <!DOCTYPE html> <meta charset="utf-8"> <style> path { fill: none; stroke: #000; stroke-width: .5px; stroke-linejoin: round; stroke-linecap: round; } </style> <body> <script src="http://d3js.org/d3.v3.min.js"></script> <script src="http://d3js.org/topojson.v1.min.js"></script> <script> var width = 960, height = 700; var path = d3.geo.path() .projection(null); var svg = d3.select("body").append("svg") .attr("width", width) .attr("height", height); d3.json("ny.json", function(error, ny) { svg.append("path") .datum(topojson.feature(ny, ny.objects.blockgroups)) .attr("d", path); }); d3.select(self.frameElement).style("height", height + "px"); </script>