This post follows the previous
basic bubble map with d3.js. It
simply shows how to map the circle size to a numerical value,
and how to map the color to a categorical variable. Visit the
bubblemap and the
bubblechart sections for more
examples. This example works with d3.js v4 and
v6
scaleLinear for bubble size, and a
scaleOrdinal for bubble color. If you're not
familiar with this concept, visit the
dedicated page.