Skip to main content
100%

Kernel Smoothing

✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Dec 1, 2015

This example visualizes kernel smoothing by plotting raw count data over time as small, semi-transparent steel-blue symbols, then overlaying a smooth black trend line that averages nearby values with an Epanechnikov kernel. The data, loaded from a CSV file, is parsed with `d3.utcParse` and drawn to a Canvas context. The custom smoothing curve is implemented via `d3.line` with a `kernelSmooth` curve factory, which computes weighted averages over a specified bandwidth. The visualization uses D3 v4 for scaling and plotting, and the result is a clear comparison between the noisy observations and the smoothed pattern.

AI-generated description

A quick-and-dirty attempt at kernel smoothing. See d3/d3-shape#43.

gpl-3.0 Licensed

Similar vizzes