unidirectional data flow
✓ Published1🌍 Public
This example shows a world map where clicking a country highlights it in pink, illustrating unidirectional data flow through a single render function that updates the visualization. Built with D3 v5, it uses `d3.geoNaturalEarth1` for projection, `d3.geoPath` to draw country outlines from TopoJSON data (world-atlas 50m), and `d3.zoom` for panning and zooming. The code loads geographic data via `d3.json` and country names via `d3.tsv`, then binds click events to update the selected country state. SVG paths represent countries, with a blue sphere as the ocean backdrop.
AI-generated descriptionMIT Licensed