A sequential colormap encodes increasing or decreasing magnitude with an ordered progression of colors. It suits quantitative or ordinal data when colors should communicate low-to-high values. section 13.2.3 section 3.1.2
Build a sequential color scale by:
- Choosing a continuous domain for the values being visualized. section 13.2.3
- Passing an interpolator such as d3.interpolateYlGnBu to d3.scaleSequential(), rather than setting a separate range. section 13.2.3
- Capping the upper domain when an extreme value would make most observations visually indistinguishable. section 13.2.3
- Providing a separate neutral color for missing or zero-valued regions when appropriate. section 13.2.3
Coloring a choropleth map
A Nobel-laureate map uses d3.interpolateYlGnBu: countries with fewer laureates appear yellow, intermediate values turquoise, and larger values dark blue. The scale uses .domain([1, 100]); each country receives countryColorScale(d.properties.laureates.length), while countries with no laureates receive #f8fcff. section 13.2.3
