This is my attempt learning D3 by following, and extending Mike Bostock's excellent Bubble Map tutorial. At the end of his tutorial, he suggests some modifications as exercises. Here, I try to implement those modifications by way of:
- A tooltip showing county name and population
- I used the D3-tip library for this
- Showing county lines on hover
- I don't yet have this working. Right now, I'm drawing the county lines with
opacity: 0
, thinking I could show them later. However, I think this is a wrong approach, as I don't think I could individually refer to the paths. I suspect thearc
property in thejson
file is what I will need to use, though I need to better understand thetopoJSON
library for this.
Data source: American Community Survey, 2012 5-year estimate.