Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Chloropleath Map

Public visualization

Chloropleath Map

0 stars2🌍 Public
AAjit Singh
Last edited Jan 11, 2021
Created on Jan 11, 2021

This example displays a world choropleth map coloring countries by economy type, using a natural Earth projection and an ordinal color scale. It loads geographic data from the World Atlas TopoJSON and TSV files, rendering SVG paths with `d3.geoPath` and TopoJSON’s `feature`. A zoom behavior via `d3.zoom` pans and scales the map, while a custom color legend built with SVG circles and text shows the categorical values. The map also includes tooltips via appended `title` elements, with a dark blue sphere background and black country strokes.

AI-generated description

An example including some commonly used features of SVG.

Comments

Sign in to join the discussion.

MIT Licensed