Viewing a saved revision (read-only)
791238c3f1734ff8ad397646d3b4b7a2
Fork of D3 Starter
This example visualizes world population data from a 2024 Kaggle dataset using a choropleth map. The map displays each country’s population with a blue color scale, from light (low) to dark (high), based on the `Population 2024` column, while countries without data appear gray. The visualization is built with D3 v7 and TopoJSON, using `d3.geoNaturalEarth1` for the projection and `d3.geoPath` to render geographic features. It loads world map geometry from the world-atlas package and the CSV dataset, then employs `d3.scaleSequential` with `d3.interpolateBlues` to map population values to fill colors. Interactive tooltips display exact population figures on mouseover, and a graticule and legend provide spatial and color context.
AI-generated description