This is an example of structuring D3 code using a constructor function pattern. For more information, see the accompanying blog post “A better way to structure D3 code”.