<jupyter_start><jupyter_text>Time series explorer<jupyter_code>import tstools.tstools as tsclass
import ipywidgets
from ipywidgets import HBox, VBox, Box, HTML
import ee
import warnings
# Allow Jupyter display to be 100% the width of the browser
display(ipywidgets.HTML('<style>.container { width:100% !important; }</style>'))
# Disable pandas and ccd warnings
warnings.filterwarnings('ignore')
# Authenticate to the Earth Engine servers, and initialize the ee module.
ee.Initialize()
# Get a measures object
tst = tsclass.TSTools()
# Organize all widgets

im_st = HTML(value="<b>IMAGE STRETCH:</b>")

stretch_tab = VBox([im_st, tst.image_band_1, tst.image_band_2, 
                    tst.image_band_3, tst.stretch_min,
                    tst.stretch_max, tst.color_check,
                    tst.clear_layers, tst.pyccd_button2, 
                    tst.toggle_pyccd_button2])
display_tab = VBox([HTML(value="<b>CLICKED TS</b>"), 
                    tst.band_selector2, tst.ylim2, tst.xlim2])

panel = HBox([stretch_tab, display_tab], layout=ipywidgets.Layout(width='40%', min_height='400px', max_height='400px'))

# Time series plots
fig = ipywidgets.Tab(children=[tst.fig2, tst.fig3])
fig.set_title(0, 'Clicked TS')
fig.set_title(1, 'Clicked DOY')

# Put the boxes together
controls = HBox([tst.m, panel])

# Put the boxes with the time series
tabfig = VBox([controls, fig])
display(tabfig)
#### View input dataframe
#tst.click_df
#### View pyccd coefficients
#tst.results['change_models']<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12327868852459016, 'fraction_numerical': 0.017049180327868854, 'mean_word_length': 4.373239436619718, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '349558', 'license': 'MIT', 'n_tokens_mistral': 561, 'n_tokens_neox': 534, 'n_words': 125, 'path': 'ts_explorer.ipynb', 'repo_name': 'parevalo/tstools-online', 'size': '1525'}