It would be useful to have a "blur" function to approximate kernel density estimation.
This function would accept the output from histogram, conceptually looking something like:
Original discussion in d3/d3-contour#7 (comment)
The implementation could be similar to blurX or blurY in d3-contour.
This article may be relevant: Convolve n Square Pulses to Gaussian.