Skip to main content
100%

Fork of Choropleth Map with Interactive Filtering

✓ Published0🌍 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!

MIT Licensed

Similar vizzes