Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a map with D3.js!

Public visualization

Let's make a map with D3.js!

0 stars1🌍 Public
Cchaimmaeee
Last edited Nov 26, 2020
Created on Nov 26, 2020

This example shows how to create a world map using D3.js, rendering geographic features as SVG paths. It loads TopoJSON data from a remote URL and converts it to GeoJSON using the `feature` function from Topojson. The map uses a `geoNaturalEarth1` projection with a `geoPath` generator to draw each country boundary. The code imports specific D3 modules such as `select`, `json`, and `geoPath`, and appends path elements to an SVG canvas with a width of 960 and height of 500.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed