Skip to main content
100%

Choropleth

✓ Published0🌍 Public
Mmbostock
Last edited Oct 5, 2018
Created on Nov 12, 2012

A choropleth map of U.S. county unemployment rates for August 2016, drawn as SVG paths using `d3.geoPath`, colors each county with a `d3.scaleThreshold` and the `d3.schemeBlues` color scheme. A legend displays the color scale via a linear axis. The map uses TopoJSON from the U.S. Census Bureau and unemployment data from the Bureau of Labor Statistics, loaded with `d3.queue` and `d3.tsv`. State boundaries are overlaid as a white mesh using `topojson.mesh`.

AI-generated description

Source: Bureau of Labor Statistics, Census Bureau

This choropleth shows unemployment rates as of August, 2016 with a threshold scale. I employed a mix of command-line tools to transform the fixed-width text file into a CSV, including dsv2dsv:

cat <(echo "id,rate") \
  <(tail -n +7 laucntycur14.txt \
    | grep 'Aug-16' \
    | cut -b 21-22,28-30,129-133 \
    | tr -s ' ' \
    | dsv2dsv -r ' ') \
  | csv2tsv \
  > unemployment.tsv
gpl-3.0 Licensed

Similar vizzes