Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Let's make a map with D3.js!

Public visualization

Let's make a map with D3.js!

0 stars2๐ŸŒ 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

Comments

Sign in to join the discussion.

MIT Licensed