- CSV data: Convert to numbers
- We are only interested in entries from year 2017
- Filter the entries using Array.prototype.filter
-
Think about UX: What are good sizes for circles? Min size? Max size?
-
Scales in D3js
-
d3.scaleLinear().domain().range() -
support for numbers, colors
-
d3.extent, d3.max, d3.min
Explain:
d3.forceSimulation()- forces:
d3.forceCenter() d3.forceCollision()d3.forceManyBody()d3.forceLinks()d3.forceX()d3.forceY()d3.forceSimulation().on('tick')
Explain:
- How to insert data into DOM
SELECTION.on('click', d => console.log(d))
- mouseenter, mouseleave
Explain TopoJSON, GeoJSON
- Inject our data into GeoJSON data
- Choose a suitable projection: d3.geoIdentity()
- Draw the map using d3.geoPath() into attribute "d" of SvgPath