Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Histogram

Public visualization

Viewing a saved revision (read-only)

9dafb0653a434473b9dadca8a5b8a69b

Histogram

0 stars1🌍 Public
CCurran Kelleher
Last edited Aug 14, 2024
Created on Aug 14, 2024
Forked from County Choropleth

This histogram displays the distribution of unemployment rates across U.S. counties as of August 2016, using data from the Bureau of Labor Statistics. It shows the frequency of counties falling into different rate intervals, with the tallest bars indicating the most common unemployment levels. The visualization uses D3’s `bin` and `scaleLinear` APIs to group the data into 40 bins and map those bins to screen coordinates. Each county’s rate is loaded from a CSV file and cast to a number before being passed to the histogram component, which renders SVG rectangles for each bin.

AI-generated description

An adaptation of the D3 Choropleth Example that uses vanilla JavaScript. Shows Unemployment rate by U.S. county, August 2016.

Some key differences from the original implementation include:

  • Uses unidirectional data flow and idempotent rendering
  • Supports hot reloading
  • Uses the geo-albers-usa-territories projection, which includes all US territories
  • Colors missing data red.
MIT Licensed