A6 Diverging Color Bar Chart
This diverging bar chart visualizes changes in violent crime rates across U.S. states between 2000 and 2019, using a red-blue color scale to distinguish increases from decreases. The chart shows both positive and negative changes diverging from a central zero axis, with state labels positioned on the appropriate side of each bar. Built with D3 v7, it uses `d3.scaleDiverging` and `d3.scaleThreshold` for color mapping, while `d3.legendColor` renders the threshold legend. Data comes from the CORGIS dataset, and hovering reveals precise values. The visualization employs an SVG container with a centered y-axis and responsive sizing based on window dimensions.
AI-generated descriptionVisualization of crime rate differences by state from the CORGIS dataset made with D3. Color legend and threshold code from Susie Lu.
Hover over bars to see precise values. Fullscreen to see legend.