Home

Awesome

<p align="center"> <a href="#readme"> <img alt="Plotly-Resampler logo" src="https://raw.githubusercontent.com/predict-idlab/plotly-resampler/main/mkdocs/static/logo.svg" width=65%> </a> </p>

PyPI Latest Release support-version codecov CodeQL Downloads PRs Welcome Testing Documentation Discord

<!-- [![Downloads](https://pepy.tech/badge/plotly-resampler)](https://pepy.tech/project/plotly-resampler) -->

plotly_resampler: visualize large sequential data by adding resampling functionality to Plotly figures

plotly-resampler improves the scalability of Plotly for visualizing large time series datasets. Specifically, our library dynamically aggregates time-series data respective to the current graph view, ensuring efficient and responsive updates during user interactions like panning or zooming via callbacks.

This core aggregation functionality is achieved by utilizing by time-series data point selection algorithms, for which plotly-resampler leverages the highly optimized implementations available in tsdownsample. Our default data aggregation method is MinMaxLTTB (and selects 1000 data points for plotting). For a deeper understanding of this method, you can consult to the algorithm's dedicated MinMaxLTTB repository and the associated research paper.

basic example gif

In this Plotly-Resampler demo over 110,000,000 data points are visualized!

<!-- These dynamic aggregation callbacks are realized with: --> <!-- * [Dash](https://github.com/plotly/dash) when a `go.Figure` object is wrapped with dynamic aggregation functionality, see example ⬆️. --> <!-- * The [FigureWidget.layout.on_change](https://plotly.com/python-api-reference/generated/plotly.html?highlight=on_change#plotly.basedatatypes.BasePlotlyType.on_change) method, when a `go.FigureWidget` is used within a `.ipynb` environment. --> <!-- #### Useful links --> <!-- - [Documentation]() work in progress 🚧 --> <!-- - [Example notebooks](https://github.com/predict-idlab/plotly-resampler/tree/main/examples/) -->

πŸ› οΈ Installation

pippip install plotly-resampler
<!-- | [**conda**](https://anaconda.org/conda-forge/plotly_resampler/) | `conda install -c conda-forge plotly_resampler` | --> <br> <details><summary><b>πŸ‘€ What is the difference between plotly-resampler figures and plain plotly figures?</b></summary>

plotly-resampler can be thought of as wrapper around plain plotly figures which adds visualization scalability to line-charts by dynamically aggregating the data w.r.t. the front-end view. plotly-resampler thus adds dynamic aggregation functionality to plain plotly figures.

❗ Important to know:

Other changes of plotly-resampler figures w.r.t. vanilla plotly:

</details><br>

πŸ“‹ Features

πŸš€ Usage

Add dynamic aggregation to your plotly Figure (unfold your fitting use case)

<br>

Note: Any plotly Figure can be wrapped with FigureResampler and FigureWidgetResampler! πŸŽ‰ But only the go.Scatter/go.Scattergl traces are resampled.

πŸ’­ Important considerations & tips

πŸ“œ Citation and papers

The paper about the plotly-resampler toolkit itself (preprint): https://arxiv.org/abs/2206.08703

@inproceedings{van2022plotly,
  title={Plotly-resampler: Effective visual analytics for large time series},
  author={Van Der Donckt, Jonas and Van Der Donckt, Jeroen and Deprost, Emiel and Van Hoecke, Sofie},
  booktitle={2022 IEEE Visualization and Visual Analytics (VIS)},
  pages={21--25},
  year={2022},
  organization={IEEE}
}

Related papers:

<br>
<p align="center"> πŸ‘€ <i>Jonas Van Der Donckt, Jeroen Van Der Donckt, Emiel Deprost</i> </p>