ecohealthalliance / fasterize

High performance raster conversion for modern spatial data 🚀🌏▦
https://ecohealthalliance.github.io/fasterize/
Other
182 stars 15 forks source link

Mean and other aggregation functions #18

Open noamross opened 6 years ago

noamross commented 6 years ago

Basically, a different version of "sum", per #13, we just need to be clear what happens with NAs.

We can also do running variance: https://www.johndcook.com/blog/standard_deviation/

It would not be that hard to pass R functions to fasterize for arbitrary aggregation functions, but it would also definitely be a huge slowdown. For any function that needs the entire vector of values, its probably better to first collect the values and then run calc.