Skip to main content
100%

Map D3.js HW

✓ Published0🌍 Public
KKCachel
Last edited Nov 5, 2018
Created on Sep 25, 2018
Forked from Hello VizHub

This interactive world map lets users click individual countries to select them, highlighting each in orange with a red stroke while displaying the country’s name in red text above the SVG. Clicking a selected country reverts its fill to light green, though the name label remains visible. The visualization uses D3 v5 and TopoJSON, rendering with `d3.geoPath` and the `geoNaturalEarth1` projection, with zoom support via `d3.zoom`. Country names come from a TSV file paired with the world-atlas TopoJSON dataset.

AI-generated description

Kathleen Cachel Week 5 Homework

<br/> I found this page at [D3 in Depth](https://d3indepth.com/selections/) to be helpful in making the selection events. And these [code examples](https://github.com/d3/d3-selection) as well.

<br /> I would really like feedback on how to remove the Name when you deselect a country. When you click on a country that is selected I change it back to the unselected state, but the name still stays up. I fiddled with it, but was not able to get that working. I tried a remove etc. would love some pointers on that!

MIT Licensed

Similar vizzes