Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Choropleth Map

Public visualization

Choropleth Map

0 stars2๐ŸŒ Public
Ggabcoderboi
Last edited Dec 27, 2020
Created on Dec 21, 2020

This choropleth map colors countries by their economy type using a categorical color scale, with a legend showing each category. It renders world geography as SVG paths via `d3.geoPath` and the Natural Earth projection, while `d3.zoom` enables panning and zooming. The code loads TopoJSON and TSV data from the world-atlas package, mapping country IDs to economy labels, and uses `d3.scaleOrdinal` with `schemeSpectral`. Hovering highlights a country in red.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed