Skip to main content
100%

Country map with D3.js!

✓ Published1🌍 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
MIT Licensed

Similar vizzes