Skip to main content
100%

World Map with D3.js!

✓ Published0🌍 Public
Yyaswanthsen
Last edited Mar 27, 2023
Created on Mar 27, 2023
Forked from Hello VizHub

This example renders a world map using an equirectangular projection, with countries filled in pink against a light blue sphere. It loads country boundaries from a TopoJSON file (world-atlas countries-110m.json) and converts them to GeoJSON features using the `feature` method. The visualization employs D3 v5’s `geoPath` and `geoEquirectangular` functions to generate SVG paths, and CSS hover styles highlight each country in green. The sphere and country shapes are appended as SVG path elements with distinct classes.

AI-generated description
MIT Licensed

Similar vizzes