.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "tutorial-quick/eg_02_quick_view.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_tutorial-quick_eg_02_quick_view.py: Viewing time data ^^^^^^^^^^^^^^^^^ With the quick viewing functionality, it is possible to view time series data without having to setup a project or explicitly read the data first. The quickview decimation option provides an easy way to see the time series at multiple sampling frequencies (decimated to lower frequencies). .. warning:: The time series data is downsampled for viewing using the LTTB algorithm, which tries to capture the features of the time series using a given number of data points. Setting max_pts to None will try and plot all points which can cause serious performance issues for large datasets. Those looking to view non downsampled data are advised to use the quick reading functionality and then plot specific subsections of data. The dataset in this example has been provided for use by the SAMTEX consortium. For more information, please refer to [Jones2009]_. Additional details about the dataset can be found at https://www.mtnet.info/data/kap03/kap03.html. .. GENERATED FROM PYTHON SOURCE LINES 24-30 .. code-block:: default from pathlib import Path import seedir as sd import plotly import resistics.letsgo as letsgo .. GENERATED FROM PYTHON SOURCE LINES 31-32 Define the data path. This is dependent on where the data is stored. .. GENERATED FROM PYTHON SOURCE LINES 32-35 .. code-block:: default time_data_path = Path("..", "..", "data", "time", "quick", "kap123") sd.seedir(str(time_data_path), style="emoji") .. rst-class:: sphx-glr-script-out Out: .. code-block:: none 📁 kap123/ ├─📄 data.npy └─📄 metadata.json .. GENERATED FROM PYTHON SOURCE LINES 36-37 Quickly view the time series data .. GENERATED FROM PYTHON SOURCE LINES 37-41 .. code-block:: default fig = letsgo.quick_view(time_data_path, max_pts=1_000) fig.update_layout(height=700) plotly.io.show(fig) .. raw:: html :file: images/sphx_glr_eg_02_quick_view_001.html .. GENERATED FROM PYTHON SOURCE LINES 42-45 In many cases, data plotting at its recording frequency can be quite nosiy. The quickview function has the option to plot multiple decimation levels so the data can be compared at multiple sampling frequencies. .. GENERATED FROM PYTHON SOURCE LINES 45-48 .. code-block:: default fig = letsgo.quick_view(time_data_path, max_pts=1_000, decimate=True) fig.update_layout(height=700) plotly.io.show(fig) .. raw:: html :file: images/sphx_glr_eg_02_quick_view_002.html .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 4.802 seconds) .. _sphx_glr_download_tutorial-quick_eg_02_quick_view.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: eg_02_quick_view.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: eg_02_quick_view.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_