No.443 · Maps & Globes
Dot Atlas
A flat world map made of dots, shaded by a value per region; point at a region or arrow through the legend and it lifts out of the map.
The prompt
Written for the variant you picked above: Night
Build a dotted world map for values by region, in Canvas 2D with no map library. Sample a lon/lat grid every 1.6° (equirectangular, 82°N to 56°S so Antarctica is cropped) against a 1° Natural Earth land mask that also says which continent each cell belongs to, and draw a round dot for every land cell. Shade each region on a single-hue sequential ramp (six steps, light to dark on paper, re-stepped — not inverted — for the dark theme) by its value relative to the largest; regions without data stay a neutral grey. Above the map, a mono metric label and a one-sentence headline ("Asia leads with 39% of 12,320 bookings"); below it, a legend of region chips sorted by value, each with its swatch and tabular value, so colour is never the only key. Pointing at the map finds the region under the pointer (checking a little around it so thin coasts are easy to hit): that region's dots grow 25% and the rest drop to 22% opacity, the headline switches to that region's value and share, and a small tooltip follows the pointer. The legend is a roving-tabindex group: arrow keys move between regions and focusing or hovering a chip highlights the same region on the map. Selected variant — Night (night): Apply the night theme. Where the brief above gives no colour values for it, choose a restrained night palette with text at 4.5:1 contrast or better. Keep the geometry, states and motion described above unchanged. This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: Hover a region on the map, or hover or arrow through the legend chips, to highlight it and read its value and share. Motion: None beyond the highlight change; the map redraws only when the highlight or size changes. Accessibility: The canvas is role="img" with every region's value in its label; the legend chips are real buttons with aria-pressed and arrow-key navigation; the headline updates in text. No motion to reduce. Responsive behavior: Keeps the map's aspect ratio and redraws at the new size; the legend wraps. Touch: Tap a legend chip to highlight its region; tapping the map highlights the region under your finger. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.
Notes
- Interaction
- Hover a region on the map, or hover or arrow through the legend chips, to highlight it and read its value and share.
- Motion
- None beyond the highlight change; the map redraws only when the highlight or size changes.
- Accessibility
- The canvas is role="img" with every region's value in its label; the legend chips are real buttons with aria-pressed and arrow-key navigation; the headline updates in text. No motion to reduce.
- Responsive
- Keeps the map's aspect ratio and redraws at the new size; the legend wraps.
- On touch
- Tap a legend chip to highlight its region; tapping the map highlights the region under your finger.