Skip to main content
100%

choroplethMap.js

✓ Published0🌍 Public
NNkwachi Abel
Last edited Jun 3, 2022
Created on Jun 3, 2022

A choropleth map of world countries colored by economy type, rendered with SVG paths projected using D3's `geoNaturalEarth1` and `geoPath`. The legend, built with a reusable `colorLegend` function, displays ordinal color swatches from `schemeSpectral`, and clicking a legend item dims other categories. Data is loaded from the World Atlas TopoJSON and TSV files via `loadAndProcessData`, with country names and economy values appended to each feature. Pan and zoom are enabled through `d3.zoom`, applying transforms to the map group.

AI-generated description
MIT Licensed

Similar vizzes