Fast density heatmaps for time series with WebGL
Try the demo at https://domoritz.github.io/line-density.
This implementation renders as many lines a possible into a single framebuffer and computes the sums and normalization entirely on the GPU. The multiple heatmaps are eventually collected into a single output buffer. We can then render the buffer with the tool of our choice (e.g. Vega).
This module is available on npm and can be installed with
yarn add line-density.
The density function takes an optional canvas as the fourth parameter (for use with https://github.com/Automattic/node-canvas).
https://github.com/domoritz/line-density-rust for a parallel Rust implementation.