Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Let's make a face with D3.js!

Public visualization

Viewing a saved revision (read-only)

c10ee03bd27440388dab19514bfc5b8a

Fork of Let's make a face with D3.js!

0 stars1🌍 Public
AAkshita Shukla
Last edited Nov 28, 2021
Created on Nov 28, 2021

This example displays a set of geographic regions as a simple SVG map. It loads GeoJSON data from `region.json` and renders each polygon as a separate `path` element. The visualization uses D3.js v5, specifically the `d3.geoPath` function and a `d3.geoMercator` projection. The code automatically calculates an appropriate scale and center point for the mercator projection based on the bounds of the provided features, then positions the map in the center of the canvas.

AI-generated description