D3 Workshop: Part 2 - SVGs and d3 Transitions
This interactive D3.js v4 tutorial demonstrates SVG shape manipulation and transition techniques. Users click a button to run JavaScript that appends rectangles to an SVG canvas and randomly repositions them, illustrating dynamic attribute updates. The example includes a static composition of blue, red, and yellow shapes, followed by a scripted exercise checklist covering creating, deleting, and animating SVG elements. It uses d3.select, .append, .attr, and random positioning to transition rectangle colors and locations within a 400x300 pixel viewport. The educational interface guides learners through progressively complex d3 operations for building data-driven graphics.