Country map with Topojson data
✓ Published1🌍 Public
This example shows a Mercator projection of Africa rendered as an SVG map, with each country outlined in white and filled with teal. The code loads GeoJSON data from a GitHub Gist URL using `d3.json`, then uses `d3.geoMercator` to define the projection and `d3.geoPath` to generate the SVG path data for each feature. The map is centered within a 600x400 SVG canvas, and the projection is scaled and translated accordingly. The visualization relies on D3 v4 and the `d3-geo-projection` library.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed