Skip to main content
100%

Let's make a map with D3.js!

✓ Published1🌍 Public
Cchaimmaeee
Last edited Nov 26, 2020
Created on Nov 26, 2020

This example shows a world map rendered as an SVG, featuring a blue sphere background and light green country outlines. It demonstrates a basic D3.js geographic visualization using `d3.geoNaturalEarth1` for the projection and `d3.geoPath` to generate path data for the sphere. The map loads TopoJSON data from a GitHub-hosted `.json` file via `d3.json` and the `topojson` library's `feature` module, though the country data is only logged to the console rather than drawn. The code imports specific D3 functions (`select`, `json`, `geoPath`, `geoNaturalEarth1`) and relies on v5 syntax, with CSS applying fill and stroke styling to the sphere and country paths.

AI-generated description
MIT Licensed

Similar vizzes