question13
This example renders a simplified version of the Jamaican flag as three vertical SVG rectangles using D3 v4. The code defines an array of objects containing fill colors, x/y positions, and dimensions for the green, yellow, and black stripes. It appends each rectangle to the SVG canvas with `svg.selectAll("rect")`, binding the data and setting attributes like `x`, `y`, `width`, `height`, and `fill` through anonymous functions. The visualization is purely static, with no interaction or transitions, showing a straightforward data-to-shape mapping.