Skip to main content
100%

Map Example

✓ Published0🌍 Public
LLouisa Penrice
Last edited May 1, 2024
Created on May 1, 2024

This example visualizes global life expectancy by coloring countries on a Mercator-projected world map, with a white-to-blue linear color scale mapping values. Hovering a country fades others to 50% opacity, highlights the selected one, and outlines it with a black stroke. Built with React and SVG, it uses d3.geoPath with a geoMercator projection to draw GeoJSON features, d3.queue to load data, and d3.csv to parse the 2023 world dataset. Data includes a d3.map storing life expectancy per country, with colors applied via a scaleLinear domain from the data’s extent.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes