A fork of the code from @ejb 's block for his blog post “A better way to structure D3 code”.
Code for the histogram itself was heavily borrowed from this bl.ock by Mike Bostock.
Takes data in the form of a vector of numerical values.
Also see my second visualization using @ejb's style: the dotplot.
This is part of my larger project of making a d3/r library for dynamic and interactive basic statistical plots.
https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js