Skip to main content
100%

Choropleth Map with Interactive Filtering

✓ Published0🌍 Public
NNitin Vadhiya
Last edited Nov 1, 2021
Created on Nov 1, 2021

This choropleth map colors countries by economy category and lets users click color legend items to filter the map, dimming non-matching countries and highlighting the selected category. Built with D3 v5, it uses d3.geoNaturalEarth1 and d3.geoPath to project the map from TopoJSON data loaded via d3.json, with d3.scaleOrdinal and d3.schemeSpectral for the color scale. The legend and map are rendered as SVG, with pan and zoom handled by d3.zoom and hover tooltips via SVG `<title>` elements.

AI-generated description

A choropleth map where you can hover over items in the color legend items to interactively filter!

MIT Licensed

Similar vizzes