Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

ywontthiswork

Public visualization

Viewing a saved revision (read-only)

26cd39f952844fec94696d438cfe6576

ywontthiswork

0 stars1🌍 Public
Jjons288
Last edited Sep 26, 2018
Created on Sep 26, 2018

This example shows an interactive world map where clicking a country turns it green while all other countries remain red, displaying a selected-country highlighting behavior. The visualization loads geographic data from the world-atlas TopoJSON dataset and country names from a corresponding TSV file, then renders the map using d3.geoPath with a d3.geoNaturalEarth1 projection. Click events trigger a re-render that updates fill colors based on the selected country’s ID. The code uses d3.json, d3.tsv, and d3.select to manage data loading and SVG elements.

AI-generated description