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:
statecolumn with standard full-length state namesvaluecolumn with any numeric values
Also, you can edit the color ramp using the lowColor and highColor variables.