🌍 Public
Viewing a saved revision (read-only)
ef012f03b2e94ce8a5b966907cebe95e
d3: Topojson Basemap
This example displays a static map of the world’s countries, rendered as gray SVG paths with white borders. The visualization uses d3.v3 to load a TopoJSON file from the world-atlas package and transforms it with the `d3.geo.albersUsa()` projection. The code employs `d3.geo.path()` to convert geographic features into SVG path data, and appends each country as a path element with the class "name". The basemap is positioned within a 900 by 480 pixel SVG canvas, set via `d3.select` and attributes on the root element.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.