Skip to main content
100%

World map with React & D3

✓ Published0🌍 Public
Bbassra
Last edited Jan 16, 2023
Created on Jan 16, 2023

This example displays a world map rendered as an SVG using React and D3 v5. The map shows country boundaries and a background sphere, styled with a teal fill and light gray strokes. It loads geographic data from a TopoJSON file via the `world-atlas` package, converting it to GeoJSON with topojson’s `feature` function. The projection and path generation rely on `d3.geoEqualEarth` and `d3.geoPath`, while React components manage the rendering and data loading through a custom `useData` hook.

AI-generated description

World Map with React & d3.

MIT Licensed

Similar vizzes