plot icon indicating copy to clipboard operation
plot copied to clipboard

stacking segments

Open Fil opened this issue 1 year ago • 1 comments

The stack transform could be extended from point bases to segment bases, where something extends from start to end.

Various kinds of outputs can be generated, depending on what we want to achieve:

  • a single value y for each segment (piling up straight segments into "lanes")
  • a series of (x, y) values for each segment (typically for a burndown chart)
  • a series of (x, y) values, with a reducer such as "max" or "sum" (typically for a coverage chart)

Prior art:

  • “canadian wildfires II” (unpublished notebook, see lanes, first image below)
  • https://observablehq.com/@tmcw/github-burndown
  • https://genomespy.app/docs/grammar/transform/coverage/

lanes lanes

coverage coverage

burndown burndown

Fil avatar Nov 15 '24 09:11 Fil

I think maybe the lanes and burndown approaches are (structurally) different, i.e., perhaps they should be done by different transforms: the burndown approach will require an area mark to render, whereas the lanes approach can be rendered with a rect.

mbostock avatar Nov 15 '24 16:11 mbostock