{
const squareSize = 30;
const data = d3.range(1, 201);
const numCols = Math.ceil(Math.min(600, width) / squareSize)
const numRows = Math.floor(data.length / numCols)
const svg = d3.select(DOM.svg(numCols * squareSize, numRows * squareSize));
const padding = 3;
const color = d3
.scaleLinear()
.domain([0, d3.max(data)])
.range(["white", "red"]);
svg
.append("g")
.attr("transform", "translate(2,2)")
.selectAll("rect")
.data(data)
.join("rect")
.attr("width", squareSize - padding)
.attr("height", squareSize - padding)
.attr("x", (d, i) => (i % numCols) * (squareSize))
.attr("y", (d, i) => Math.floor(i / numCols) * (squareSize))
.attr("style", "stroke:black; fill: #ddd")
return svg.node();
}