Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Map with selectable countries

Public visualization

Map with selectable countries

0 stars0๐ŸŒ Public
LLongYuu
Last edited Nov 29, 2020
Created on Nov 29, 2020

This example presents an interactive choropleth map of the world, where each country is colored according to its economic classification. Users can click on any country to highlight it, dimming all others, and click again to deselect. The map uses D3's `geoPath` and `geoNaturalEarth1` projection, with `scaleOrdinal` and `schemeSpectral` for the color scale. A separate legend allows filtering by economy value, and the zoom feature (`zoom()`) is included. Data comes from the `world-atlas` package, loaded with `tsv` and `json`.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed