This is the code for Chapter 9, Figure 10 from D3.js in Action that continues to develop a data dashboard, now using d3.svg.brush() to allow users to filter data by time.
https://d3js.org/colorbrewer.v1.min.js
https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js