alan-turing-institute / DTBase

A starting point from which digital twins can be developed.
MIT License
10 stars 4 forks source link

Implement way to download less granular data #239

Open mhauru opened 4 months ago

mhauru commented 4 months ago

Currently you get all data points in a time range. This makes plots of long time ranges veeeery slow if you have high resolution data.

mhauru commented 3 months ago

Maybe the right way to do this is to have the endpoint for retrieving sensor data take an optional argument for a resampling frequency. If provided, the data will be resampled (binned and averaged within bins) by the backend, before sending it to the caller.

Note that once #266 is merged, dtbase/models/utils/sensor_data.py will have a function that does resampling for models. Maybe that could be moved to core and used for this too?