Skip to main content
100%

Let's make a map with D3.js!

✓ Published0🌍 Public
Kklumng
Last edited Feb 10, 2023
Created on Feb 8, 2023

This example shows a simple world map rendered with D3.js, displaying country boundaries using data from the world-atlas TopoJSON dataset. Country shapes are drawn as SVG paths via `d3.geoPath` with a natural Earth projection, and hovering highlights each country in red. The code uses `d3.json`, `topojson.feature`, and appends `<title>` elements for each path, though it only logs data to the console. The page loads D3 v5, TopoJSON, and hexmap libraries, with a gray background and light blue countries.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

MIT Licensed

Similar vizzes