Skip to main content
100%

Making a World Map

✓ Published1🌍 Public
ZZoe Ferencova
Last edited Mar 9, 2023
Created on Mar 8, 2023

This example shows how to construct a world map from GeoJSON and TopoJSON data using D3’s geographic projections. The visualization renders landmasses as filled green paths, with a blue sphere backdrop, graticule grid lines, and country borders outlined in light strokes. The code fetches country boundaries from the world-atlas dataset, converts TopoJSON features with `topojson.feature` and `topojson.mesh`, then projects them using `d3.geoNaturalEarth1` and `d3.geoPath`. React manages the component state and SVG rendering.

AI-generated description

Half way towards a smiley face.

MIT Licensed

Similar vizzes