Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Choropleth map

Public visualization

Viewing a saved revision (read-only)

7a988c666a1c41e0a31a8f8a9ea82d94

Choropleth map

1 star3🌍 Public
PPeter S
Last edited Jul 4, 2020
Created on Aug 24, 2019

This choropleth map colors countries by their income group using a categorical color scale applied from the `schemeSpectral` range. The visualization renders geographic boundaries from TopoJSON data processed with `topojson.feature` and projects them using `d3.geoNaturalEarth1` and `d3.geoPath`. A legend, built with a custom `colorLegend` function, displays the colored circles and labels for each income category. Country names and income groups appear as tooltips via SVG `title` elements, and the map supports zooming through `d3.zoom`.

AI-generated description

An example showing the capabilities of VizHub.