Choropleth Map
This choropleth map colors countries by their economy type, using a spectral color scale to distinguish categories. Built with D3 v5, it loads world country geometries from the world-atlas TopoJSON dataset and joins them with tab-separated metadata from the same source. The map uses a natural Earth projection and renders as SVG paths, with a color legend generated via a custom `colorLegend` function. Each country path includes a tooltip showing its name and economy value, while hovering highlights the country in red.