Skip to main content
100%

cheap tricks for interaction

✓ Published0🌍 Public
Jjlspangl
Last edited Sep 7, 2021
Created on Sep 7, 2021

This example displays a world map using a natural Earth projection, where each country is rendered as a light green SVG path and the ocean appears as a blue sphere. Hovering over a country highlights it in red. The visualization loads geographic data from the world-atlas TopoJSON file, converts it to GeoJSON with topojson.feature, and draws it using d3.geoPath and d3.geoNaturalEarth1. Interaction is implemented via a CSS :hover rule on the country paths, which changes their fill color without any JavaScript event handlers.

AI-generated description
MIT Licensed

Similar vizzes