Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Map with Selectable Countries

Public visualization

Map with Selectable Countries

0 stars1🌍 Public
Ccaydener
Last edited Jul 19, 2019
Created on Jul 19, 2019

This interactive map displays countries color-coded by economy type using D3’s `geoNaturalEarth1` projection and `geoPath`. Clicking a country highlights it while dimming others, and clicking again deselects it; a `scaleOrdinal` legend with `schemeSpectral` colors supports filtering. The visualization uses topojson data from world-atlas and applies a zoom transform via d3.zoom. Selection state is managed by an internal `selectedCountryId` variable, updated through click handlers on country paths and legend ticks.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed