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 namesvalue column with any numeric valuesAlso, you can edit the color ramp using the lowColor and highColor variables.
https://d3js.org/d3.v4.min.js