https://gist.github.com/4544529 (demo) was my first d3 adventure, where I scraped signatures from a White House petition and showed them as a pie chart.
Here, I show them as a US heat map (based on one of Mike Bostock's map demos). You can click on a state, and see how many signatures came from it.
Darker color means more signatures, but since the numbers range from a few dozens to >4500, the scale is logarithmic.
I don't know yet how to use log()
interpolators (I promise to learn), so I just did it quick and dirty with linear()
and masking tape.
forked from thedod's block: Clickable US heat-map of petition signature count
Modified http://d3js.org/d3.v2.min.js?2.9.6 to a secure url
https://d3js.org/d3.v2.min.js?2.9.6