index.html
<!DOCTYPE html>
<meta charset="utf-8">
<style>
path {
stroke: #fff;
stroke-width: .5;
stroke-dasharray: 1;
fill: #afafaf;
}
</style>
<svg width="960" height="720"></svg>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://d3js.org/topojson.v1.min.js"></script>
<script>
var svg = d3.select("svg"),
width = +svg.attr("width"),
height = +svg.attr("height");
d3.json("nyc.json", function(error, us) {
if (error) throw error;
var path = d3.geoPath()
.projection(d3.geoConicConformal()
.parallels([33, 45])
.rotate([96, -39])
.fitSize([width, height], us));
svg.append("path")
.datum(us)
.attr("d", path);
});
</script>