This post describes how to build a very basic 2d density with shading with d3.js. The hexbin chart is a representation of a 2d density, very close from a contour plot but with shading between layers. It is made thanks to the d3-contour plugin. Visit data-to-viz.com for more theoretical info on 2d density charts.
div
that will be modified by d3 later on. It also load the d3-hexbin pluginx
and y
. A 2d density plot basically represents the amount of data point on each part of the grid.contourDensity()
function..geoPath()