Viewing a saved revision (read-only)
4d9443d7f0f14442b3b3fb78c0b79b04
Choropleth Map with Interactive Filtering
This choropleth map colors world countries by their economy category, using an ordinal color scale based on the Spectral scheme. Hovering over a country highlights it in red, while clicking a color legend item filters the map to show only countries in that category, dimming all others. Built with D3 v5, it renders countries as SVG paths using the geoNaturalEarth1 projection, and loads country boundaries and attributes from the world-atlas TopoJSON and TSV datasets. The interactive legend and zoom behavior are implemented through the D3 selection API and the custom zoom event handler.
AI-generated descriptionA choropleth map where you can hover over items in the color legend items to interactively filter!