D3 tutorial from http://chimera.labs.oreilly.com/books/1230000000345/