Export Image
Export Code

Cheap tricks for interaction

James Malvern

Last edited Mar 19, 2021
Created on Mar 19, 2021

This D3.js map of the world displays country name when the mouse is hovered over that specific country. It's using a tsv file and a topojson file with a reduce function (ES6) to match the two in order to get the country name.

You can zoom in and out using two fingers pushing up or down the mouse pad (or whatever you're holding).

This is using:

  • d3-geo
  • topoJSON
  • zoom
  • tsv data
  • css
MIT Licensed