🌍 Public
Viewing a saved revision (read-only)
58a96bb43b78450993035a637783806c
Map with Selectable Countries
This interactive map displays countries color-coded by economy type using D3’s `geoNaturalEarth1` projection and `geoPath`. Clicking a country highlights it while dimming others, and clicking again deselects it; a `scaleOrdinal` legend with `schemeSpectral` colors supports filtering. The visualization uses topojson data from world-atlas and applies a zoom transform via d3.zoom. Selection state is managed by an internal `selectedCountryId` variable, updated through click handlers on country paths and legend ticks.
AI-generated description