Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Country map with D3.js!

Public visualization

Country map with D3.js!

0 stars1๐ŸŒ Public
Ppranatiyv
Last edited Apr 4, 2022
Created on Apr 4, 2022

This example visualizes the United States by filtering country boundaries from the world-atlas TopoJSON dataset and rendering them as an SVG map. It uses d3.geoAlbersUsa for the projection and d3.geoPath to generate the geographic paths. The code loads the TopoJSON data with d3.json, converts it to GeoJSON using topojson.feature, and then binds the filtered features to SVG path elements. The map appears as a solid blue country shape with thin black strokes, set against a white background.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed