plot icon indicating copy to clipboard operation
plot copied to clipboard

Spatial interpolator reducers

Open Fil opened this issue 1 year ago • 0 comments

The default spatial interpolator applies the current value to the current position, resulting in a "last" binning reducer. We could implement others (thinking out loud for now):

  • "first" is the easiest: just don't overwrite if a value is already present
  • "sum" is easy too (though it applies only to quantitative values), with a caveat that the color domain will have to be set by hand as it will almost always be wrong (it's based on the input values sent to the interpolator); the contours should work directly
  • "random sample" and "mean" can be done by keeping a separate track of the count; ("mean" expects the value to be quantitative)
  • "median" (and any other reducers, including custom functions) need to keep track of all the values, so that's probably not going to be great performance-wise, unless we can have iterative reducers

Fil avatar Mar 22 '24 15:03 Fil