Skip to main content
100%

Activity 8 Q5A

✓ Published0🌍 Public
Ppasyasahas
Last edited Jul 7, 2023
Created on Jul 7, 2023

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 description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes