Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Map with Selectable Countries

Public visualization

Map with Selectable Countries

0 stars0๐ŸŒ Public
Jjlspangl
Last edited Oct 20, 2021
Created on Oct 20, 2021

This example shows a choropleth map where clicking a country highlights it and dims all others, with a color legend on the side. It uses the d3.geoPath and d3.geoNaturalEarth1 projections to render the world map, while d3.scaleOrdinal and d3.schemeSpectral define the color encoding. Country data comes from world-atlas TSV and TopoJSON files, and interactions trigger re-rendering with updated opacity and stroke styles. The map supports zooming via d3.zoom.

AI-generated description

A choropleth map with selectable countries

Comments

Sign in to join the discussion.

MIT Licensed