Skip to main content
100%

Circles on a map with D3.js!

✓ Published0🌍 Public
CCarloWK1202
Last edited Aug 5, 2022
Created on Aug 3, 2022

This example displays global population estimates for 2018 as circles positioned on a natural Earth projection map using D3.js v5. Countries with missing data appear in red, while circles scale in radius according to population via `d3.scaleSqrt`. The visualization includes zoom functionality via `d3.zoom`, a size legend generated with custom tick formatting, and tooltips using SVG `<title>` elements. Geographic boundaries are rendered from TopoJSON data, while population statistics come from a CSV file of UN estimates, with `d3.geoPath` and `d3.geoCentroid` handling map geometry.

AI-generated description
MIT Licensed

Similar vizzes