Skip to main content
100%

World Map with D3.js

✓ Published0🌍 Public
Ppasyasahas
Last edited Jul 21, 2023
Created on Jul 21, 2023
Forked from Hello VizHub

This example displays a world map using D3.js, rendering country boundaries as SVG paths on a light gray background. It loads GeoJSON data from a remote GitHub repository and projects it usingd3.geoMercator with fitSize to match the 800x600 viewport. The code demonstrates thed3.json method for asynchronously fetching data andd3.geoPath to generate the path strings, styling each country with a default gray fill and white stroke.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes