🌍 Public
Viewing a saved revision (read-only)
ad759cb1cb1e471aa8100aca6cfceb8c
Let's make a map with D3.js!
This example shows a simple world map rendered as an SVG, with countries filled in light green and oceans in blue using a Natural Earth projection. The code loads GeoJSON country boundaries from the World Atlas TopoJSON file and converts them into SVG paths using `d3.geoPath` and `d3.geoNaturalEarth1`. It relies on the `topojson.feature` API to extract country geometries, and appends each as a separate path element with a stroke to delineate borders.
AI-generated description