Published
Edited
Sep 15, 2020
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof currentTime = Scrubber(times)
Insert cell
Insert cell
function render(svg) {
let selection = d3.select(svg);
let data = hexdataGroupped.get(currentTime)
selection.selectAll('circle')
.data(data)
.join('circle')
.attr('cx', d => proj([d.lng, d.lat])[0])
.attr('cy', d => proj([d.lng, d.lat])[1])
.attr('fill', d => colorPM1(d.pm1))
.attr('opacity', 0.5)
.attr('r', 2);

selection.selectAll('path')
.data(states.features)
.join('path')
.attr('d', f => path(f))
.attr('stroke', 'grey')
.attr('fill', 'none');
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more