d3Tutorial from http://alignedleft.com/tutorials/d3/