Creating a flat map of the world

The albersUsa projection is one of many D3.js supplied projection objects. You can see the full list of these projections at

We don't have space to demonstrate all of these in this book, but a few are worth the effort to demonstrate a couple of TopoJSON concepts. Specifically, we will demonstrate the rendering of a map of the countries of the world, sourced from TopoJSON, and projected onto both flat and spherical surfaces.

For data in these examples, will use the world-110m.json data file provided with the TopoJSON data library source code available at ...

Get D3.js By Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.