block by mbostock 6116436

U.S. Urban Areas

Full Screen

Urban areas from the 2008 U.S. census.

index.html

<!DOCTYPE html>
<meta charset="utf-8">
<style>

</style>
<body>
<script src="//d3js.org/d3.v3.min.js"></script>
<script src="//d3js.org/topojson.v1.min.js"></script>
<script>

var width = 960,
    height = 600;

var path = d3.geo.path()
    .projection(null);

var svg = d3.select("body").append("svg")
    .attr("width", width)
    .attr("height", height);

d3.json("us.json", function(error, us) {
  if (error) throw error;

  svg.append("path")
      .datum(topojson.feature(us, us.objects.uac))
      .attr("d", path);
});

d3.select(self.frameElement).style("height", height + "px");

</script>