Skip to main content
100%

Let's make a map with D3.js!!

✓ Published0🌍 Public
TTomas S
Last edited Nov 15, 2019
Created on Nov 13, 2019

This example demonstrates a basic thematic map of world countries using D3.js and the geoMercator projection. The code loads a TopoJSON dataset from the World Atlas package and converts it into GeoJSON features with the `topojson.feature` API, then renders each country as an SVG path via `d3.geoPath`. It also includes a simple text label manipulated through D3 selections. The map is rendered to an SVG canvas with a fixed width and height, and the styling removes page margins for a full-bleed display.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes