Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Choropleth Map

Public visualization

Viewing a saved revision (read-only)

0e4ecdaeb4464274a469dfdb4f1a3383

Choropleth Map

0 stars0🌍 Public
YYoung Song
Last edited Jul 18, 2022
Created on Jul 18, 2022
Forked from Choropleth Map

This choropleth map colors countries by their economy grouping, using a spectral color scale assigned through D3's `scaleOrdinal` and `schemeSpectral`. The code projects geographic features with `geoNaturalEarth1` and `geoPath` onto an SVG, overlaying a white legend built by a custom `colorLegend` component. Hovering highlights a country in red via CSS. Data comes from the `world-atlas` package, merging TopoJSON shapes with TSV metadata. Zoom interactions are handled through D3's `zoom` event, transforming the map group.

AI-generated description