prio-data / views_transformation_library

The data transformation library used by the views data transformer service
Other
1 stars 1 forks source link

Time Since #5

Closed Peder2911 closed 3 years ago

Peder2911 commented 3 years ago

"Time Since" is an important transform when working with time-series. It is defined as a transform that takes a series:

0,1,0,0,0,0

And transforms it to

NaN,0,1,2,3,4

This is technically a bit challenging, since you need the entire available series to avoid truncating locally. Won't be too hard once I write a more robust way to fetch previous-data for each chunk.

Peder2911 commented 3 years ago

Implemented in ViEWS 2 and added in 308cc99a