This directory withholds several examples, highlighting the applicability of plotly-resampler for various use cases.
To successfully run these examples, make sure that you've installed all the requirements by running:
pip install -r requirements.txt
The basic example notebook covers most use-cases in which plotly resampler will be employed. It serves as an ideal starting point for data-scientists who want to use plotly-resampler in their day-to-day jupyter environments.
Additionally, this notebook also shows some more advanced functionalities, such as:
- Retaining (a static) plotly-resampler figure in your notebook
- Adjusting trace data of plotly-resampler figures at runtime
- The flexibility of configuring different aggregation-algorithms and number of shown samples per trace
The figurewidget example notebook utilizes the FigureWidgetResampler
wrapper to create a go.FigureWidget
with dynamic aggregation functionality. A major advantage of this approach is that this does not create a web application, avoiding starting an application on a port (and forwarding that port when working remotely).
Additionally, this notebook highlights how to use the FigureWidget
its on-click callback to utilize plotly for large time series annotation.
The dash_apps folder contains example dash apps in
which plotly-resampler
is integrated
description | |
---|---|
minimal examples | |
global variable | bad practice: minimal example in which a global FigureResampler variable is used |
server side caching | good practice: minimal example in which we perform server side caching of the FigureResampler variable |
runtime graph construction | minimal example where graphs are constructed based on user interactions at runtime. Pattern matching callbacks are used construct these plotly-resampler graphs dynamically. Again, server side caching is performed. |
advanced apps | |
dynamic sine generator | exponential sine generator which uses pattern matching callbacks to remove and construct plotly-resampler graphs dynamically |
file visualization | load and visualize multiple .parquet files with plotly-resampler |
dynamic static graph | Visualization dashboard in which a dynamic (i.e., plotly-resampler graph) and a coarse, static graph (i.e., go.Figure) are shown (made for this issue). Graph interaction events on the coarse graph update the dynamic graph. |
modify traces | Example in which trace data is modified based on front-end parameter values. |
The other_apps folder contains examples of plotly-resampler
being integrated in other apps / frameworks
app-name | description |
---|---|
streamlit integration | visualize a large noisy sine in a streamlit app |