🌍 Public
Viewing a saved revision (read-only)
b29ceb83dfb249c3b3cc0fcaac64427e
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