Skip to main content
100%

Threshold Choropleth

✓ Published0🌍 Public
Mmbostock
Last edited Mar 18, 2019
Created on Aug 9, 2012

A Threshold Choropleth displays US county unemployment rates quantized into color bands. The map uses a threshold scale to map continuous rate values, ranging from two to ten percent, into discrete shades of purple. `d3.scale.threshold()` defines the domain boundaries and corresponding range colors. The visualization renders SVG paths for counties, colored via `style("fill")`, with state borders overlaid. Data is loaded from a TSV file containing county IDs and rates, and geospatial shapes come from a TopoJSON file processed with `topojson.feature` and `d3.geo.path()`.

AI-generated description

This choropleth uses a threshold scale for quantization, mapping arbitrary slices of a continuous domain to discrete values in the range. Unemployment rates ranging from 2 to 10% are quantized into different shades of purple.

var color = d3.scale.threshold()
    .domain([0.02, 0.04, 0.06, 0.08, 0.10])
    .range(["#f2f0f7", "#dadaeb", "#bcbddc", "#9e9ac8", "#756bb1", "#54278f"]);
gpl-3.0 Licensed

Similar vizzes