Pre-built TopoJSON from the U.S. Census Bureau.
Shell
Latest commit 5238a98 Nov 14, 2016 @mbostock mbostock Update dependencies.
Permalink
Failed to load latest commit information.
img Update README. Nov 3, 2016
.gitignore Remove unused entries. Nov 13, 2016
.npmignore Update to TopoJSON 2.0. Nov 2, 2016
LICENSE.md Update to TopoJSON 2.0. Nov 2, 2016
README.md Update README. Nov 3, 2016
package.json Update dependencies. Nov 14, 2016
prepublish Restore aggressive deletion. Nov 13, 2016

README.md

U.S. Atlas TopoJSON

This repository provides a convenient mechanism for generating TopoJSON files from the Census Bureau’s cartographic boundary shapefiles, 2015 edition.

Usage

In a browser (using d3-geo and Canvas), bl.ocks.org/3783604:

<!DOCTYPE html>
<canvas width="960" height="600"></canvas>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://d3js.org/topojson.v2.min.js"></script>
<script>

var context = d3.select("canvas").node().getContext("2d"),
    path = d3.geoPath().context(context);

d3.json("https://d3js.org/us-10m.v1.json", function(error, us) {
  if (error) throw error;

  context.beginPath();
  path(topojson.mesh(us));
  context.stroke();
});

</script>

In Node (using d3-geo and node-canvas), bl.ocks.org/885fffe88d72b2a25c090e0bbbef382f:

var fs = require("fs"),
    d3 = require("d3-geo"),
    topojson = require("topojson-client"),
    Canvas = require("canvas"),
    us = require("./node_modules/us-atlas/us/10m.json");

var canvas = new Canvas(960, 600),
    context = canvas.getContext("2d"),
    path = d3.geoPath().context(context);

context.beginPath();
path(topojson.mesh(us));
context.stroke();

canvas.pngStream().pipe(fs.createWriteStream("preview.png"));

File Reference

# us/10m.json <>

A TopoJSON topology containing three geometry collections: counties, states, and nation. The geometry is quantized, projected using d3.geoAlbersUsa to fit a 960×600 viewport, and simplified. This topology is derived from the Census Bureau’s cartographic county boundaries, 2015 edition. The state boundaries are computed by merging counties, and the nation boundary is computed by merging states, ensuring a consistent topology.

# us.objects.counties

# us.objects.states

# us.objects.nation