Skip to main content
100%

Cheap Tricks for World Map

✓ Published0🌍 Public
EEngine194
Last edited Mar 21, 2023
Created on Mar 21, 2023
Forked from Make a World Map

This example demonstrates a world map rendered with D3's geo projections, using the `d3.geoNaturalEarth1` projection and `d3.geoPath` to draw country polygons. The map displays landmasses in light green with a dark blue ocean sphere, and countries highlight red on hover via a CSS `:hover` rule. The code loads geographic data from the `world-atlas` package, processes it with the `topojson` library's `feature` function, and applies `d3.zoom` to allow interactive pan and zoom through SVG transforms. The visualization is built with D3 v7 and rendered as SVG, with styling defined in a separate `styles.css` file.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes