keyframes = [
{
title: html`Start with cumulative positive test results`,
statistic: "positive",
transformation: "linear",
derivative: 0,
smoothing: 1
},
{
title: html`Take day-to-day change`,
statistic: "positive",
transformation: "linear",
derivative: 1,
smoothing: 1
},
{
title: html`Make each point the average of the last seven`,
statistic: "positive",
transformation: "linear",
derivative: 1,
smoothing: 7
},
{
title: html`Align the first day they pass ${threshold} cases`,
statistic: "positive",
transformation: "linear",
derivative: 1,
smoothing: 7,
seriesTransform: d => `translate(${-x(xOffsets.get(d))}, 0)`
},
{
title: html`Draw constant growth rate curves`,
statistic: "positive",
transformation: "linear",
derivative: 1,
smoothing: 7,
curves: curve => curve.attr("opacity", 1)
},
{
title: html`Warp vertically to make them straight`,
statistic: "positive",
transformation: "linear",
derivative: 1,
smoothing: 7,
yScale: d3
.scaleLog()
.base(2)
.domain([threshold, max(dataFinal)])
.range([height - margin.bottom, margin.top])
}
]