Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

World map with React & D3

Public visualization

World map with React & D3

0 stars0🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed