Skip to main content
100%

Let's make a map with D3.js!

✓ Published2🌍 Public
LLudovicGouverneur
Last edited Dec 22, 2018
Created on Dec 6, 2018

This example shows a world map colored by economic classification, with an ordinal color legend displayed in the corner. It uses `d3.geoNaturalEarth1` for the projection and `d3.geoPath` to render country outlines from TopoJSON data loaded via the `world-atlas` package. Countries are colored using `d3.scaleOrdinal` with `schemeSpectral`, and a custom `colorLegend` component draws circles and text labels. The map supports zooming through `d3.zoom`, and hover states change country fills to red via CSS.

AI-generated description
MIT Licensed

Similar vizzes