🌍 Public
Viewing a saved revision (read-only)
ec82198696614d6089f21e055209593d
Let's make a map with D3.js!
This example displays a world map in D3.js using the Natural Earth projection (geoNaturalEarth1) and draws country boundaries as SVG paths. It begins by rendering a blue sphere backdrop, then loads geographical data from the world-atlas package via a JSON request. The topojson library’s feature function extracts country geometries, which are then projected and drawn as light green filled paths with subtle black strokes using d3.geoPath. The map is rendered entirely as vector SVG elements, demonstrating a basic choropleth setup with static styling.
AI-generated description