This is the code for Chapter 5, Figure 12 from D3.js in Action which creates a circle pack diagram using d3.layout.pack() where the leaf nodes have different sizes based on the .value() function of the layout.