Circles on a Map
This visualization displays global population by country as proportional circles positioned at each country’s centroid on a natural Earth projection. The circle area encodes 2020 population data from a CSV file, with countries lacking data shown in gray. Users can pan and zoom via d3.zoom, and hovering over a country reveals its name and population in a tooltip. The map uses d3.geoPath for geographic outlines, d3.geoCentroid for circle placement, and d3.scaleSqrt for sizing, with a custom size legend and color legend rendered in SVG.
AI-generated descriptionVisualizing population by country using circles on a map! The area of each circle corresponds to the population of the country it represents. You can also pan & zoom, and hover over each country for more information.