block by emeeks e08bf6e5bc77179be90a

Ch. 7, Fig. 17 - D3.js in Action

Full Screen

This is the code for Chapter 7, Figure 17 from D3.js in Action showing how to load TopoJSON data using topojson.js and how to merge features using topojson.merge(). In this example, every country with a centroid above 0° latitude is merged into a single multipolygon and rendered with a gray fill and thick black border.

index.html

cities.csv