Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Map with Selectable Countries

Public visualization

Viewing a saved revision (read-only)

33a8504142224ff8b802500d5ff0a4e3

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