This is the code for Chapter 7, Figure 12 from D3.js in Action showing how to create a globe using the d3.geo.orthographic() projection as well as a modified zoom that changes the rotate of the projection based on mouse behavior.