analytics icon indicating copy to clipboard operation
analytics copied to clipboard

Thin out datasource by aggregation over time period

Open kralan opened this issue 1 year ago • 1 comments

Dear maintainer, this is only a wishlist item.

If possible, please add functionality to clean a data source representing a time series by aggregating over a time period.

Use case: I have data sources of environmental data I add via the API. I sample the data every 10 minutes. This much detail is interesting only a few days back. After that, I'd like to keep the data for long-term statistics, but I don't need that much detail any more.

Feature request: I'd like to have a cleanup filter like: For data older than a cutoff point in time (eg 7 days ago), keep only one data point per period (eg of 3 hours) by aggregating all data that fall into one such period by an aggregation function (eg average).

I can solve this by writing a query that operates directly on the database, but I thought this might be a good enhancement for the analytics app and it can be useful for any time-series data. Maybe this can be even further generalized to have aggregation intervals other than time.

kralan avatar Sep 30 '24 14:09 kralan

Hi, yes, this is a valid idea. in general to have an aggregation of values across time. I am not sure at the solution yet. One idea might be a datasource on repots itself. e.g. have the data in detail and then load &delete the aggregated data within Analytics.

This would make it flexible in a way that the logic does not need to be implemented in various data source logic parts

...lets see

Rello avatar Sep 30 '24 14:09 Rello

Image

Hello,

wanted to report back: the next release will get a time aggregation option to aggregate too low scaled values. do you think this would help you? If I understood correctly, it does for the visualization. it will not reduce the data in the database, but the report will be much quicker and better usable

Rello avatar May 25 '25 15:05 Rello