Skip to main content
100%

D3 - World Choropleth

✓ Published0🌍 Public
CChandana Srinivas
Last edited Apr 2, 2024
Created on Apr 1, 2024
Forked from HTML Starter

This example displays a world choropleth map of population in 2023, using a Mercator projection and a yellow-to-red sequential color scale to represent each country’s population. The map is rendered as SVG paths, with a tooltip that appears on hover showing the country name and population. The code loads GeoJSON and CSV data via D3’s `d3.queue` and `d3.json`/`d3.csv` APIs, and it builds the choropleth using `d3.geoPath` with a projected path generator. A legend is added using the `d3.legend` library, and the project utilizes D3 v4, `d3-scale-chromatic` for the color interpolation, and `d3-geo-projection` for the map projection.

AI-generated description

Choropleth of World Population

MIT Licensed

Similar vizzes