Section 1(b)-Making Maps Using TOPOJSON
✓ Published1🌍 Public
This example presents a world map visualizing life expectancy across 27 countries, colored with a turquoise-to-red scale (d3.scaleSequential with interpolateTurbo) and showing a tooltip on hover with the country name and average years. It uses the Natural Earth projection (d3.geoNaturalEarth1) and generates geographic paths with d3.geoPath, rendering the sphere and graticule for context. The map loads world boundaries as GeoJSON, maps country names to life-expectancy values via a lookup table, and supports zooming/panning through d3.zoom.
AI-generated descriptionMIT Licensed