Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Choropleth Map Interactivty selection

Public visualization

Viewing a saved revision (read-only)

77c5ea9466e8457cad955c561024490e

Choropleth Map Interactivty selection

0 stars0🌍 Public
MMinh Nguyen
Last edited Apr 19, 2020
Created on Apr 19, 2020

This example shows an interactive choropleth map where clicking a legend category highlights matching countries and dims all others. Built with D3 v5 using `d3.geoMercator` and `d3.geoPath` for SVG rendering, it also applies `d3.zoom` for panning. The legend uses `d3.scaleOrdinal` with `schemeSpectral`, and click events toggle the selected category. Data comes from the World Atlas TopoJSON and TSV files, loaded via `Promise.all`.

AI-generated description