Skip to main content
100%

Beer / Wine Popularity Ratio - US Choropleth

✓ Published0🌍 Public
LLichtphyz
Last edited Aug 1, 2017
Created on Aug 1, 2017

This choropleth maps the ratio of beer to wine popularity across U.S. states, coloring each state on a continuous red-to-yellow scale from the loaded CSV data. Built with D3 v4, it uses `d3.geoAlbersUsa()` for projection and `d3.geoPath()` to render state boundaries from a GeoJSON file, while a linear color scale drives the fill. A gradient legend with an axis is appended to display the data range.

AI-generated description

A modular version of this excellent choropleth - will map any CSV statesdata.csv on a linear continuous value, using d3js v4.

Requirements for statesdata.csv:

  • state column with standard full-length state names
  • value column with any numeric values

Also, you can edit the color ramp using the lowColor and highColor variables.

forked from <a href='http://bl.ocks.org/wboykinm/'>wboykinm</a>'s block: <a href='http://bl.ocks.org/wboykinm/dbbe50d1023f90d4e241712395c27fb3'>Modular US State Choropleth</a>

mit Licensed

Similar vizzes