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. This example works
with d3.js v4
and v6
div
that will be modified by d3 later on. It
also load the
d3-hexbin plugin
x
and y
.
A 2d density plot basically represents the amount of data
point on each part of the grid.
contourDensity()
function.
.geoPath()