plotly-resampler icon indicating copy to clipboard operation
plotly-resampler copied to clipboard

Support for data that is not time series

Open matt-sd-watson opened this issue 1 year ago • 4 comments

I came across your tool and am quite impressed with the API and examples!

I would like to apply something of this sort to a dash app with a UMAP scatter plot that will have a highly variable number of points (between 10,000-500,000+) each of which represents a human cell in a biological system.

However, since UMAP data is inherently unordered (the order is merely the order at which different entities in a data frame come ordered), and that the coordinates can be either positive or negative, this type of data is not directly compatible with the FigureResampler class.

I was wondering if there was any way to provide support for unordered and non times series data with similar functionality for dash apps?

matt-sd-watson avatar Oct 31 '23 18:10 matt-sd-watson

I am the same, I have temperature data on the x axis, it is strictly monotonically increasing but it starts in the negative °C range so I get this error.

AssertionError: In order to perform time series aggregation, the data must be sorted in time; i.e., the x-data must be (non-strictly) monotonically increasing.

peak temp_interpolated
0.976562 -4.434
0.024796 -4.434
0 -4.434
1.953125 -4.434
0.031471 -4.434
... ...
0.137329 -4.403
0 -4.402
0.047684 -4.402
0.976562 -4.402
0.124931 -4.402

The only work around seems to convert from °C to Kelvin

domerich avatar Nov 30 '23 15:11 domerich

Any news on this enhancement? I am in a similar situation.

Thank you for the tool!

JotaKas avatar Aug 16 '24 07:08 JotaKas

It seems to be working with the latest version

domerich avatar Aug 16 '24 08:08 domerich

@domerich Are you able to provide a dataset or minimal example to show this? With the latest version I still require data that are strictly monotonically increasing.

As an example, the dataset attached does not work in dash with v0.10.0

umap_coordinates.csv

matt-sd-watson avatar Aug 16 '24 13:08 matt-sd-watson