1 min read

Playing with D3

I wanted to try out using D3 in an R Markdown document, to see how it works. Using r2d3, it works really well!

Me and Mandy Norrbo were messing around trying to make some purely fun stuff in D3, which you don’t really see too much. And this is what I made. I would usually go for p5.js to make stuff like this, but it was a nice challenge to do it in D3 instead.

The Cucumber

Chop the cucumber! (hover your mouse over the circles)

Animated cucumber

Watch the cucumber chop itself! (Alert: this is not a GIF, the slices are jumping to random places each time)

The Worm

The worm will jump out the way of your mouse

Flowing pink sun

A pink blob will follow your mouse!

See the code on GitHub.