Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Choropleth Map with Interactive Filtering

Public visualization

Viewing a saved revision (read-only)

f39c2db35cf24ed683c5b3f3ff8c1d6f

Fork of Choropleth Map with Interactive Filtering

0 stars0🌍 Public
Jjay-goone
Last edited Jan 14, 2022
Created on Jan 14, 2022

This fork of a D3 v5 choropleth map displays global economic data from the world-atlas dataset, with countries colored by an ordinal spectral scale. Users can click items in the attached color legend to filter the map, dimming non-matching countries and highlighting selected ones. The code uses `d3.geoPath` with a natural Earth projection and `d3.scaleOrdinal` to map values to colors, while the legend’s click handler toggles the `selectedColorValue` to update opacity and stroke width. Hovering over countries also turns them red, with tooltips showing names and values.

AI-generated description

A choropleth map where you can hover over items in the color legend items to interactively filter!