Fork of Choropleth Map with Interactive Filtering
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.