Skip to main content
100%

21 - interactive filtering - choropleth map - dataviz 2018

✓ Published0🌍 Public
Zzach b.
Last edited Nov 7, 2025
Created on Jan 10, 2022

This interactive choropleth map displays world countries colored by economy category, with a linked legend that filters the map by category. Users click a country or legend label to select or deselect a category, or click the ocean to clear the selection; non-selected countries fade to 30% opacity. Built with d3.v5, it uses `geoNaturalEarth1` projection and `geoPath` for rendering, `topojson` for world atlas data (from world-atlas npm package), and `scaleOrdinal` with `schemeSpectral` for colors. Zooming is implemented via d3’s `zoom` behavior.

AI-generated description

datraviz 2018 #21 - interactive filtering - choropleth map

click country or label to select/unselect category.
click ocean to deslect category.

world atlas topojson
unpk: topojson.js

MIT Licensed

Similar vizzes