Beer / Wine Popularity Ratio - US Choropleth
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 descriptionA modular version of this excellent choropleth - will map any CSV statesdata.csv on a linear continuous value, using d3js v4.
Requirements for statesdata.csv:
statecolumn with standard full-length state namesvaluecolumn 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>