Activity 8 Q5A
✓ Published0🌍 Public
This example renders an interactive world map using D3.js version 5 and TopoJSON. It displays countries as light green paths with indigo borders on a skyblue spherical backdrop, using the equirectangular projection and d3.geoPath. The map loads country boundaries from the world-atlas 110m TopoJSON dataset via a CDN. Users can pan and zoom the map through d3.zoom, while hovering over a country changes its fill to maroon via CSS. The code demonstrates importing specific D3 modules and the topojson feature method for GeoJSON conversion.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed