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.