Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Country map with D3.js!

Public visualization

Viewing a saved revision (read-only)

94d25800940a4da08a1915a3123fcd98

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