observablehq / observablehq/plot

1-d KDE transform?

Open
#1,469 5 comments 23 reactions 1 assignee View on GitHub

@Fil is already working on this.

Since Apr 19, 2023.

enhancement
Dominant language
HTML
Stars
5.4k
Forks
244
PR merge metrics
No merged PRs in 30d

Description

(As mentioned in a few places: #948, #943, #791.)

We can look at https://github.com/uwdata/fast-kde/ for speed, and https://observablehq.com/@d3/kernel-density-estimation for a more straightforward implementation. Could be used to create violin plots, etc. Building on our 2-d implementation, the efficient approach might be to just bin (with linear binning for when a point doesn't fall exactly on a point) then blur.

An (old) experimental notebook: https://observablehq.com/@observablehq/fast-kde-and-plot/2

(2-d KDE is addressed by the density mark.)

Examples would include violin plots

(Need to add some padding.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.