🌍 Public
Viewing a saved revision (read-only)
0ff77d71a33d431bb75fa190a8180054
Dot density map
This dot density map visualizes population distribution across Massachusetts census blocks using one dot to represent two people. The code renders polygons to an offscreen canvas with unique colors per feature, then uses Canvas `getImageData` for point-in-polygon tests to place random dots within each block’s bounds. It draws the final dots on a separate canvas using the Albers projection and `d3.geo.path`, with data from a TopoJSON file (`block.json`). The map uses colors and the D3 v3 library.
AI-generated descriptionCanvas testing