This is the code for Chapter 11, Figure 2 from D3.js in Action that draws 2000 randomly generated geodata features (simple triangles) and renders them with SVG.