Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

cheap tricks for interaction

Public visualization

cheap tricks for interaction

0 stars0๐ŸŒ 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

Comments

Sign in to join the discussion.

MIT Licensed