Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a Map with simplified code!

Public visualization

Let's make a Map with simplified code!

0 stars1🌍 Public
CChristine Lanser
Last edited Oct 6, 2020
Created on Oct 6, 2020

This example shows a world map rendered as SVG paths, with countries filled in light green and the ocean sphere in blue. The code uses D3 v5's `geoNaturalEarth1` projection and `geoPath` to convert geographic data into SVG path strings, while TopoJSON's `feature` method transforms the TopoJSON world-atlas dataset into GeoJSON features for rendering. A data join appends one path per country, and the map is loaded asynchronously via `d3.json` from a remote unpkg URL.

AI-generated description

DOM manipulation to make Map

Comments

Sign in to join the discussion.

MIT Licensed