A density plot — formally a Kernel Density Estimate (KDE) — visualises the distribution of a continuous variable as a smooth curve rather than as discrete histogram bars. At each point along the x-axis, the curve height encodes the probability density: where values are concentrated, the curve peaks; where they are absent, the curve falls to zero. The Epanechnikov kernel used here is the theoretically optimal kernel for minimising mean integrated squared error. It computes a weighted average of observations within a sliding window, whose width is controlled by the bandwidth parameter (adjustable with the bw − / bw + buttons above).
The key advantage over a histogram is that density plots have no bin boundary problem. A histogram's apparent shape changes with bin width and bin origin — two arbitrary parameters. The same data can look unimodal at 5 bins and bimodal at 15. The KDE eliminates this by using a continuous kernel, producing a shape that is stable across a sensible bandwidth range. Bandwidth affects smoothness, not topology: under-smoothed curves show noise as false peaks; over-smoothed curves blur real structure together.
About this example: Three crisis types are compared — Natural Disaster, Conflict, and Displacement — each as a separate density curve. Natural Disaster (solid walnut line) clusters fast, peaking around 4–5 days: response pipelines for sudden-onset events are well-rehearsed. Conflict (dashed blood-red) is the analytically interesting case — it is bimodal, with one cluster at 1–3 days (rapid tactical responses) and a second at 12–16 days (protracted access-negotiation responses). This bimodal structure would be invisible or fragile in a histogram. Displacement (dotted gray) skews right: slow-building population movements delay response triggers. The dashed vertical line marks the 72-hour humanitarian response target. Hover anywhere on the chart to read crosshair density values for all three distributions simultaneously.
A density plot (formally a Kernel Density Estimate, or KDE) visualises the distribution of a continuous variable by placing a smooth kernel function over each data point and summing the result across the range. The perceptual mechanism exploited is position along a common scale — the curve's height at any x-value encodes the probability density there. Peaks reveal where values concentrate. Troughs reveal gaps. Shape — symmetric, skewed, bimodal — is the primary message. This implementation uses the Epanechnikov kernel, the theoretically optimal kernel for minimising mean integrated squared error.
The data is three sets of continuous observations — response times in days — where the shape of each distribution is the message, not individual values. The conflict distribution is bimodal: fast-strike responses and protracted negotiations produce two distinct clusters. A histogram would either smooth that bimodality away (too few bins) or introduce false peaks from bin boundary placement (too many bins). A density plot eliminates the bin count decision entirely by using a continuous kernel, producing a shape that is stable under reasonable bandwidth choices.
A histogram's shape changes with bin width and bin origin — two parameters with no principled optimal value. The same data can appear unimodal at 5 bins and bimodal at 15. For the conflict distribution here, the bimodal structure at days 2–3 and days 12–15 would be visible with narrow bins but destroyed with wide ones. The density plot makes the bimodal pattern structurally stable: the two peaks survive across a wide range of bandwidths, so the viewer can trust that shape reflects data rather than a parameter choice they weren't told about.
The density plot trades the histogram's bin-width problem for a bandwidth (smoothing window) problem — but the tradeoff is better. Bandwidth affects smoothness, not shape topology. The bw − / bw + buttons on slide 1 let you tune bandwidth in real time. The optimal bandwidth for this dataset is 2.5 (set in data.json). Increasing it to 5.0 would merge the conflict bimodal peaks. Decreasing to 1.0 would fragment the natural disaster distribution into false peaks.
The FT Visual Vocabulary places density plots under Distribution: "Show values in a dataset and how often they occur — the shape of the distribution can be a powerful message in itself." The Abela framework routes here when the question is "how is this variable distributed?" rather than "how do these categories compare?" Tufte's principle of graphical integrity is honored: the y-axis starts at zero, and every visual element — curve height, fill area, reference line — encodes data. The three stroke dash patterns (solid, dashed, dotted) are redundant encodings alongside color, satisfying WCAG 2.1 and remaining legible in monochrome output.
The crosshair tooltip — a vertical line that reads density values for all three series at once — replaces the per-point tooltip used in scatter or bar charts. Density plots have no discrete data points to hover over; the meaningful query is "at this x-value, how do the three distributions compare?" The crosshair reads all three curves simultaneously. Each series gets a tracking dot on the curve at the crosshair x-position, using the same color and dash pattern as the legend swatch. Bandwidth is exposed as a live control because it is the one parameter that materially changes the viewer's interpretation — hiding it would be a form of graphical deception.