Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

unidirectional data flow

Public visualization

Viewing a saved revision (read-only)

746e317165cc471fb99891afe8cf6aec

unidirectional data flow

0 stars1🌍 Public
NNTCHANG1289
Last edited Oct 28, 2018
Created on Sep 27, 2018
Forked from Interaction

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 description