Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Map Example

Public visualization

Viewing a saved revision (read-only)

732e6de8bb5e4435bae373a8bb1c63e2

Map Example

0 stars0🌍 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.