Skip to content

Commit cc1f8f0

Browse files
authored
🎨
1 parent a01f0bc commit cc1f8f0

File tree

1 file changed

+26
-47
lines changed

1 file changed

+26
-47
lines changed

README.md

Lines changed: 26 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,18 @@ In [this Plotly-Resampler demo](https://github.com/predict-idlab/plotly-resample
4040
| ---| ----|
4141
<!-- | [**conda**](https://anaconda.org/conda-forge/plotly_resampler/) | `conda install -c conda-forge plotly_resampler` | -->
4242

43-
<br>
43+
### Features :tada:
44+
45+
* **Convenient** to use:
46+
* just add either
47+
* `register_plotly_resampler` function to your notebook with the best suited `mode` argument.
48+
* `FigureResampler` decorator around a plotly Figure and call `.show_dash()`
49+
* `FigureWidgetResampler` decorator around a plotly Figure and output the instance in a cell
50+
* allows all other plotly figure construction flexibility to be used!
51+
* **Environment-independent**
52+
* can be used in Jupyter, vscode-notebooks, Pycharm-notebooks, Google Colab, DataSpell, and even as application (on a server)
53+
* Interface for **various aggregation algorithms**:
54+
* ability to develop or select your preferred sequence aggregation method
4455

4556
## Usage
4657

@@ -79,14 +90,9 @@ In [this Plotly-Resampler demo](https://github.com/predict-idlab/plotly-resample
7990
</details>
8091

8192
* 👷 <b>Manually</b> _(higher data aggregation configurability, more speedup possibilities)_:
82-
<details>
83-
<summary>Within a <b><i>jupyter</i></b> environment without creating a <i>web application</i></summary>
84-
<br>
85-
93+
* Within a <b><i>jupyter</i></b> environment without creating a <i>web application</i>
8694
1. wrap the plotly Figure with `FigureWidgetResampler`
8795
2. output the `FigureWidgetResampler` instance in a cell
88-
89-
* **code example**:
9096
```python
9197
import plotly.graph_objects as go; import numpy as np
9298
from plotly_resampler import FigureResampler, FigureWidgetResampler
@@ -100,15 +106,9 @@ In [this Plotly-Resampler demo](https://github.com/predict-idlab/plotly-resample
100106

101107
fig
102108
```
103-
</details>
104-
<details>
105-
<summary>Using a <b><i>web-application</i></b> with <b><a href="https://github.com/plotly/dash">dash</a></b> callbacks</summary>
106-
<br>
107-
109+
* Using a <b><i>web-application</i></b> with <b><a href="https://github.com/plotly/dash">dash</a></b> callbacks
108110
1. wrap the plotly Figure with `FigureResampler`
109111
2. call `.show_dash()` on the `Figure`
110-
111-
* **code example**:
112112
```python
113113
import plotly.graph_objects as go; import numpy as np
114114
from plotly_resampler import FigureResampler, FigureWidgetResampler
@@ -122,10 +122,6 @@ In [this Plotly-Resampler demo](https://github.com/predict-idlab/plotly-resample
122122

123123
fig.show_dash(mode='inline')
124124
```
125-
126-
</details>
127-
<br>
128-
129125
> **Tip** 💡:
130126
> For significant faster initial loading of the Figure, we advise to wrap the
131127
> constructor of the plotly Figure and add the trace data as `hf_x` and `hf_y`
@@ -136,25 +132,7 @@ In [this Plotly-Resampler demo](https://github.com/predict-idlab/plotly-resample
136132
> Any plotly Figure can be wrapped with `FigureResampler` and `FigureWidgetResampler`! 🎉
137133
> But, (obviously) only the scatter traces will be resampled.
138134

139-
140-
141-
142-
<br>
143-
<details><summary>👉 <b>Features</b></summary>
144-
145-
* **Convenient** to use:
146-
* just add either
147-
* `register_plotly_resampler` function to your notebook with the best suited `mode` argument.
148-
* `FigureResampler` decorator around a plotly Figure and call `.show_dash()`
149-
* `FigureWidgetResampler` decorator around a plotly Figure and output the instance in a cell
150-
* allows all other plotly figure construction flexibility to be used!
151-
* **Environment-independent**
152-
* can be used in Jupyter, vscode-notebooks, Pycharm-notebooks, Google Colab, DataSpell, and even as application (on a server)
153-
* Interface for **various aggregation algorithms**:
154-
* ability to develop or select your preferred sequence aggregation method
155-
</details>
156-
157-
### Important considerations & tips
135+
## Important considerations & tips
158136

159137
* When running the code on a server, you should forward the port of the `FigureResampler.show_dash()` method to your local machine.<br>
160138
**Note** that you can add dynamic aggregation to plotly figures with the `FigureWidgetResampler` wrapper without needing to forward a port!
@@ -167,22 +145,23 @@ In [this Plotly-Resampler demo](https://github.com/predict-idlab/plotly-resample
167145

168146
Paper (preprint): https://arxiv.org/abs/2206.08703
169147

170-
```latex
171-
@misc{https://doi.org/10.48550/arxiv.2206.08703,
172-
author = {Van Der Donckt, Jonas and Van Der Donckt, Jeroen and Deprost, Emiel and Van Hoecke, Sofie},
173-
title = {Plotly-Resampler: Effective Visual Analytics for Large Time Series},
174-
year = {2022},
175-
doi = {10.48550/ARXIV.2206.08703},
176-
url = {https://arxiv.org/abs/2206.08703},
177-
publisher = {arXiv},
148+
```bibtex
149+
@inproceedings{van2022plotly,
150+
title={Plotly-resampler: Effective visual analytics for large time series},
151+
author={Van Der Donckt, Jonas and Van Der Donckt, Jeroen and Deprost, Emiel and Van Hoecke, Sofie},
152+
booktitle={2022 IEEE Visualization and Visual Analytics (VIS)},
153+
pages={21--25},
154+
year={2022},
155+
organization={IEEE}
178156
}
179157
```
180158

181159
## Future work 🔨
182160

183161
- [x] Support `.add_traces()` (currently only `.add_trace` is supported)
184-
- [ ] Support `hf_color` and `hf_markersize`, see [#50](https://github.com/predict-idlab/plotly-resampler/pull/50)
185-
- [ ] Create C bindings for our EfficientLTTB algorithm.
162+
- [ ] Support `hf_color` and `hf_markersize`, see [#148](https://github.com/predict-idlab/plotly-resampler/pull/148)
163+
- [x] Create C bindings for our EfficientLTTB algorithm.
164+
- [ ] Integrate with [tsdownsample](https://github.com/predict-idlab/tsdownsample) :racehorse:
186165

187166
<br>
188167

0 commit comments

Comments
 (0)