Skip to main content
100%

Adding interactions to a map with D3.js!

✓ Published1🌍 Public
MMounikaBeerelly
Last edited Jun 9, 2020
Created on Jun 9, 2020

This example demonstrates how to add interactive features to a geographic map using D3.js. It shows a world map rendered with SVG paths, where hovering over a country highlights it in red, and a tooltip displays the country name. The map also supports panning and zooming through the `d3.zoom` API. The visualization uses `d3.geoPath` and the `topojson` library to process GeoJSON data from the world-atlas package, with country names loaded from a TSV file.

AI-generated description

Adding interactions like :

  1. highlighting on hover using CSS
  2. adding simple tooltips
  3. panning & zooming
MIT Licensed

Similar vizzes