W3 exercise: replicate D3 code in P5.js