Open mhauru opened 4 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?
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.