🌍 Public
Viewing a saved revision (read-only)
06bfc3dd330945659d1cabc0d9b2ca60
Assignment2_question6
This example displays a map of Texas rendered as an SVG using D3.js version 5. It loads U.S. state boundaries from the `us-atlas` TopoJSON file hosted on a CDN, then extracts the geometry for Texas using the `topojson.feature` API. The map is projected with `d3.geoAlbersUsa` and drawn with `d3.geoPath`, resulting in a single-path visualization of the state outline. The code selects the body element and appends an SVG canvas sized 960 by 500 pixels to display the final geographic shape.
AI-generated descriptionA demonstration of how to start using D3 version 6.