Modular US State Choropleth
A modular US State Choropleth maps state-level CSV data onto a continuous linear color scale, rendering each state as an SVG path using D3 v4's geoAlbersUsa projection. The example loads beerwine2.csv, which contains a normalized `value` for each state, and merges it with GeoJSON state geometries to color-code the map. Users can customize the color ramp by modifying the `lowColor` and `highColor` variables. A vertical gradient legend with an axis is included to show the value-to-color mapping. This block is a refactored version of an existing choropleth and requires a `statesdata.csv` with `state` (full name) and `value` (numeric) columns.
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>