D3 and Javascript

2017-09-03

I was inspired by some of the really impressive visualisations here to dive in and learn some javascript and D3! I found this excellent book by Scott Murray to be really informative and useful (although written for a previous version of D3- there's an updated edition of the book, but I don't think it's open access).

Below is a simple graph with points that you can move and drag around. The code borrows very heavily from this stack overflow question/answer, and is also available on my github account here.

Getting it embedded in the Jekyll markdown this site uses was also a bit challenging- but this stack overflow answer was very helpful. I went with the second method they mention- making a <div> tag and creating an SVG element inside that.

There's already lots of things I'd like to apply D3 to- so watch this space!