{ "cells": [ { "cell_type": "markdown", "id": "f087b216-4c7c-41aa-a9a7-cc6b8893a02a", "metadata": { "tags": [] }, "source": [ "# TDA of financial time series\n", "\n", "This web app is a reimplementation of the paper\n", "[TDA of financial time series: Landscapes of crashes](https://arxiv.org/abs/1703.04385)\n", "using [gudhi](https://gudhi.inria.fr).\n", "\n", "Select a start and an end date (default one is to visualize the dotcom crash).\n", "You can visualize:\n", "* **dotcom** crash : start=03/10/1999 (10th of march), end = 03/10/2000\n", "* **Lehman brothers** crash : start=09/15/2007 (15th of september), end = 09/15/2008.\n", "\n", "In the publication, they use a 250 days (a little bit more than 1 year). \n", "You can set smaller date range if you find the computation not fast enough." ] }, { "cell_type": "code", "execution_count": 2, "id": "ce92a3b8-5fb7-4988-aab7-2cbdc2edba4e", "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0.06840157508850098 sec. \n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "f98f546611f04bc9af1593a8196cf966", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(DatePicker(value=datetime.date(2024, 8, 25), description='start', step=1), DatePicker(value=dat…" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "8b273ebe61ee446bb509aa4f8b2f8e08", "version_major": 2, "version_minor": 0 }, "text/plain": [ "FigureWidget({\n", " 'data': [{'mode': 'lines',\n", " 'name': 'L1',\n", " 'type': 'scatter',\n", " 'uid': '34ced7f8-82ec-4727-a504-4493cb2cd65e',\n", " 'x': array(['2024-09-16', '2024-09-17', '2024-09-18', '2024-09-19', '2024-09-20',\n", " '2024-09-23', '2024-09-24', '2024-09-25', '2024-09-26', '2024-09-27',\n", " '2024-09-30', '2024-10-01', '2024-10-02', '2024-10-03', '2024-10-04',\n", " '2024-10-07', '2024-10-08', '2024-10-09', '2024-10-10', '2024-10-11',\n", " '2024-10-14', '2024-10-15', '2024-10-16', '2024-10-17', '2024-10-18',\n", " '2024-10-21', '2024-10-22', '2024-10-23', '2024-10-24', '2024-10-25',\n", " '2024-10-28', '2024-10-29', '2024-10-30', '2024-10-31', '2024-11-01',\n", " '2024-11-04', '2024-11-05', '2024-11-06', '2024-11-07', '2024-11-08',\n", " '2024-11-11', '2024-11-12', '2024-11-13', '2024-11-14', '2024-11-15',\n", " '2024-11-18', '2024-11-19', '2024-11-20', '2024-11-21', '2024-11-22',\n", " '2024-11-25', '2024-11-26', '2024-11-27', '2024-11-29', '2024-12-02',\n", " '2024-12-03', '2024-12-04', '2024-12-05', '2024-12-06', '2024-12-09',\n", " '2024-12-10', '2024-12-11', '2024-12-12', '2024-12-13', '2024-12-16',\n", " '2024-12-17', '2024-12-18', '2024-12-19', '2024-12-20', '2024-12-23',\n", " '2024-12-24', '2024-12-26', '2024-12-27', '2024-12-30', '2024-12-31',\n", " '2025-01-02', '2025-01-03', '2025-01-06', '2025-01-07', '2025-01-08',\n", " '2025-01-10', '2025-01-13', '2025-01-14', '2025-01-15', '2025-01-16',\n", " '2025-01-17', '2025-01-21', '2025-01-22', '2025-01-23', '2025-01-24',\n", " '2025-01-27', '2025-01-28', '2025-01-29', '2025-01-30', '2025-01-31',\n", " '2025-02-03', '2025-02-04', '2025-02-05', '2025-02-06', '2025-02-07',\n", " '2025-02-10', '2025-02-11', '2025-02-12', '2025-02-13', '2025-02-14',\n", " '2025-02-18', '2025-02-19', '2025-02-20', '2025-02-21', '2025-02-24',\n", " '2025-02-25', '2025-02-26', '2025-02-27', '2025-02-28', '2025-03-03',\n", " '2025-03-04', '2025-03-05', '2025-03-06', '2025-03-07', '2025-03-10',\n", " '2025-03-11', '2025-03-12', '2025-03-13', '2025-03-14', '2025-03-17',\n", " '2025-03-18', '2025-03-19', '2025-03-20', '2025-03-21', '2025-03-24',\n", " '2025-03-25', '2025-03-26', '2025-03-27', '2025-03-28', '2025-03-31',\n", " '2025-04-01', '2025-04-02', '2025-04-03', '2025-04-04', '2025-04-07',\n", " '2025-04-08', '2025-04-09', '2025-04-10', '2025-04-11', '2025-04-14',\n", " '2025-04-15', '2025-04-16', '2025-04-17', '2025-04-21', '2025-04-22',\n", " '2025-04-23', '2025-04-24', '2025-04-25', '2025-04-28', '2025-04-29',\n", " '2025-04-30', '2025-05-01'], dtype=object),\n", " 'y': {'bdata': ('LnH03+Bh6T8F74f+2GHpP2cLwDi6Fu' ... 'AAAAAAAI6fEv1OgbA/H2Jq1rAMyD8='),\n", " 'dtype': 'f8'}},\n", " {'mode': 'lines',\n", " 'name': 'L2',\n", " 'type': 'scatter',\n", " 'uid': '5e19ef66-d488-403d-b509-8a244315e693',\n", " 'x': array(['2024-09-16', '2024-09-17', '2024-09-18', '2024-09-19', '2024-09-20',\n", " '2024-09-23', '2024-09-24', '2024-09-25', '2024-09-26', '2024-09-27',\n", " '2024-09-30', '2024-10-01', '2024-10-02', '2024-10-03', '2024-10-04',\n", " '2024-10-07', '2024-10-08', '2024-10-09', '2024-10-10', '2024-10-11',\n", " '2024-10-14', '2024-10-15', '2024-10-16', '2024-10-17', '2024-10-18',\n", " '2024-10-21', '2024-10-22', '2024-10-23', '2024-10-24', '2024-10-25',\n", " '2024-10-28', '2024-10-29', '2024-10-30', '2024-10-31', '2024-11-01',\n", " '2024-11-04', '2024-11-05', '2024-11-06', '2024-11-07', '2024-11-08',\n", " '2024-11-11', '2024-11-12', '2024-11-13', '2024-11-14', '2024-11-15',\n", " '2024-11-18', '2024-11-19', '2024-11-20', '2024-11-21', '2024-11-22',\n", " '2024-11-25', '2024-11-26', '2024-11-27', '2024-11-29', '2024-12-02',\n", " '2024-12-03', '2024-12-04', '2024-12-05', '2024-12-06', '2024-12-09',\n", " '2024-12-10', '2024-12-11', '2024-12-12', '2024-12-13', '2024-12-16',\n", " '2024-12-17', '2024-12-18', '2024-12-19', '2024-12-20', '2024-12-23',\n", " '2024-12-24', '2024-12-26', '2024-12-27', '2024-12-30', '2024-12-31',\n", " '2025-01-02', '2025-01-03', '2025-01-06', '2025-01-07', '2025-01-08',\n", " '2025-01-10', '2025-01-13', '2025-01-14', '2025-01-15', '2025-01-16',\n", " '2025-01-17', '2025-01-21', '2025-01-22', '2025-01-23', '2025-01-24',\n", " '2025-01-27', '2025-01-28', '2025-01-29', '2025-01-30', '2025-01-31',\n", " '2025-02-03', '2025-02-04', '2025-02-05', '2025-02-06', '2025-02-07',\n", " '2025-02-10', '2025-02-11', '2025-02-12', '2025-02-13', '2025-02-14',\n", " '2025-02-18', '2025-02-19', '2025-02-20', '2025-02-21', '2025-02-24',\n", " '2025-02-25', '2025-02-26', '2025-02-27', '2025-02-28', '2025-03-03',\n", " '2025-03-04', '2025-03-05', '2025-03-06', '2025-03-07', '2025-03-10',\n", " '2025-03-11', '2025-03-12', '2025-03-13', '2025-03-14', '2025-03-17',\n", " '2025-03-18', '2025-03-19', '2025-03-20', '2025-03-21', '2025-03-24',\n", " '2025-03-25', '2025-03-26', '2025-03-27', '2025-03-28', '2025-03-31',\n", " '2025-04-01', '2025-04-02', '2025-04-03', '2025-04-04', '2025-04-07',\n", " '2025-04-08', '2025-04-09', '2025-04-10', '2025-04-11', '2025-04-14',\n", " '2025-04-15', '2025-04-16', '2025-04-17', '2025-04-21', '2025-04-22',\n", " '2025-04-23', '2025-04-24', '2025-04-25', '2025-04-28', '2025-04-29',\n", " '2025-04-30', '2025-05-01'], dtype=object),\n", " 'y': {'bdata': ('1RuxMPfs6D+lGKwu9+zoPyccb6O1Ee' ... 'AAAAAAABLC2x+jdbU/2+2TlNA2zj8='),\n", " 'dtype': 'f8'}},\n", " {'mode': 'lines',\n", " 'name': 'L1_variance',\n", " 'type': 'scatter',\n", " 'uid': 'd975019c-5401-4567-8d42-3bc1302eee68',\n", " 'x': array(['2024-09-16', '2024-09-17', '2024-09-18', '2024-09-19', '2024-09-20',\n", " '2024-09-23', '2024-09-24', '2024-09-25', '2024-09-26', '2024-09-27',\n", " '2024-09-30', '2024-10-01', '2024-10-02', '2024-10-03', '2024-10-04',\n", " '2024-10-07', '2024-10-08', '2024-10-09', '2024-10-10', '2024-10-11',\n", " '2024-10-14', '2024-10-15', '2024-10-16', '2024-10-17', '2024-10-18',\n", " '2024-10-21', '2024-10-22', '2024-10-23', '2024-10-24', '2024-10-25',\n", " '2024-10-28', '2024-10-29', '2024-10-30', '2024-10-31', '2024-11-01',\n", " '2024-11-04', '2024-11-05', '2024-11-06', '2024-11-07', '2024-11-08',\n", " '2024-11-11', '2024-11-12', '2024-11-13', '2024-11-14', '2024-11-15',\n", " '2024-11-18', '2024-11-19', '2024-11-20', '2024-11-21', '2024-11-22',\n", " '2024-11-25', '2024-11-26', '2024-11-27', '2024-11-29', '2024-12-02',\n", " '2024-12-03', '2024-12-04', '2024-12-05', '2024-12-06', '2024-12-09',\n", " '2024-12-10', '2024-12-11', '2024-12-12', '2024-12-13', '2024-12-16',\n", " '2024-12-17', '2024-12-18', '2024-12-19', '2024-12-20', '2024-12-23',\n", " '2024-12-24', '2024-12-26', '2024-12-27', '2024-12-30', '2024-12-31',\n", " '2025-01-02', '2025-01-03', '2025-01-06', '2025-01-07', '2025-01-08',\n", " '2025-01-10', '2025-01-13', '2025-01-14', '2025-01-15', '2025-01-16',\n", " '2025-01-17', '2025-01-21', '2025-01-22', '2025-01-23', '2025-01-24',\n", " '2025-01-27', '2025-01-28', '2025-01-29', '2025-01-30', '2025-01-31',\n", " '2025-02-03', '2025-02-04', '2025-02-05', '2025-02-06', '2025-02-07',\n", " '2025-02-10', '2025-02-11', '2025-02-12', '2025-02-13', '2025-02-14',\n", " '2025-02-18', '2025-02-19', '2025-02-20', '2025-02-21', '2025-02-24',\n", " '2025-02-25', '2025-02-26', '2025-02-27', '2025-02-28', '2025-03-03',\n", " '2025-03-04', '2025-03-05', '2025-03-06', '2025-03-07', '2025-03-10',\n", " '2025-03-11', '2025-03-12', '2025-03-13', '2025-03-14', '2025-03-17',\n", " '2025-03-18', '2025-03-19', '2025-03-20', '2025-03-21', '2025-03-24',\n", " '2025-03-25', '2025-03-26', '2025-03-27', '2025-03-28', '2025-03-31',\n", " '2025-04-01', '2025-04-02', '2025-04-03', '2025-04-04', '2025-04-07',\n", " '2025-04-08', '2025-04-09', '2025-04-10', '2025-04-11', '2025-04-14',\n", " '2025-04-15', '2025-04-16', '2025-04-17', '2025-04-21', '2025-04-22',\n", " '2025-04-23', '2025-04-24', '2025-04-25', '2025-04-28', '2025-04-29',\n", " '2025-04-30', '2025-05-01'], dtype=object),\n", " 'y': {'bdata': ('AAAAAAAA+H8AAAAAAAAAAGIThIQ3DY' ... '3vHyKuP+TLFaMKXK8/6InBU4c7sD8='),\n", " 'dtype': 'f8'}},\n", " {'mode': 'lines',\n", " 'name': 'L2_variance',\n", " 'type': 'scatter',\n", " 'uid': '1add5db8-23cf-4c63-8800-4567837bb181',\n", " 'x': array(['2024-09-16', '2024-09-17', '2024-09-18', '2024-09-19', '2024-09-20',\n", " '2024-09-23', '2024-09-24', '2024-09-25', '2024-09-26', '2024-09-27',\n", " '2024-09-30', '2024-10-01', '2024-10-02', '2024-10-03', '2024-10-04',\n", " '2024-10-07', '2024-10-08', '2024-10-09', '2024-10-10', '2024-10-11',\n", " '2024-10-14', '2024-10-15', '2024-10-16', '2024-10-17', '2024-10-18',\n", " '2024-10-21', '2024-10-22', '2024-10-23', '2024-10-24', '2024-10-25',\n", " '2024-10-28', '2024-10-29', '2024-10-30', '2024-10-31', '2024-11-01',\n", " '2024-11-04', '2024-11-05', '2024-11-06', '2024-11-07', '2024-11-08',\n", " '2024-11-11', '2024-11-12', '2024-11-13', '2024-11-14', '2024-11-15',\n", " '2024-11-18', '2024-11-19', '2024-11-20', '2024-11-21', '2024-11-22',\n", " '2024-11-25', '2024-11-26', '2024-11-27', '2024-11-29', '2024-12-02',\n", " '2024-12-03', '2024-12-04', '2024-12-05', '2024-12-06', '2024-12-09',\n", " '2024-12-10', '2024-12-11', '2024-12-12', '2024-12-13', '2024-12-16',\n", " '2024-12-17', '2024-12-18', '2024-12-19', '2024-12-20', '2024-12-23',\n", " '2024-12-24', '2024-12-26', '2024-12-27', '2024-12-30', '2024-12-31',\n", " '2025-01-02', '2025-01-03', '2025-01-06', '2025-01-07', '2025-01-08',\n", " '2025-01-10', '2025-01-13', '2025-01-14', '2025-01-15', '2025-01-16',\n", " '2025-01-17', '2025-01-21', '2025-01-22', '2025-01-23', '2025-01-24',\n", " '2025-01-27', '2025-01-28', '2025-01-29', '2025-01-30', '2025-01-31',\n", " '2025-02-03', '2025-02-04', '2025-02-05', '2025-02-06', '2025-02-07',\n", " '2025-02-10', '2025-02-11', '2025-02-12', '2025-02-13', '2025-02-14',\n", " '2025-02-18', '2025-02-19', '2025-02-20', '2025-02-21', '2025-02-24',\n", " '2025-02-25', '2025-02-26', '2025-02-27', '2025-02-28', '2025-03-03',\n", " '2025-03-04', '2025-03-05', '2025-03-06', '2025-03-07', '2025-03-10',\n", " '2025-03-11', '2025-03-12', '2025-03-13', '2025-03-14', '2025-03-17',\n", " '2025-03-18', '2025-03-19', '2025-03-20', '2025-03-21', '2025-03-24',\n", " '2025-03-25', '2025-03-26', '2025-03-27', '2025-03-28', '2025-03-31',\n", " '2025-04-01', '2025-04-02', '2025-04-03', '2025-04-04', '2025-04-07',\n", " '2025-04-08', '2025-04-09', '2025-04-10', '2025-04-11', '2025-04-14',\n", " '2025-04-15', '2025-04-16', '2025-04-17', '2025-04-21', '2025-04-22',\n", " '2025-04-23', '2025-04-24', '2025-04-25', '2025-04-28', '2025-04-29',\n", " '2025-04-30', '2025-05-01'], dtype=object),\n", " 'y': {'bdata': ('AAAAAAAA+H8AAAAAAAAAAACkqH+XUF' ... '5Pi3evPwG+VQGmp7A/jJk0H+U1sT8='),\n", " 'dtype': 'f8'}}],\n", " 'layout': {'template': '...', 'title': {'text': 'Lp norms'}, 'xaxis': {'dtick': 'M1', 'tickformat': '%b\\n%Y'}}\n", "})" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Some basic data science imports\n", "import pandas as pd\n", "import numpy as np\n", "from sklearn.preprocessing import MinMaxScaler\n", "from sklearn.pipeline import Pipeline\n", "import datetime\n", "\n", "import time\n", "import os\n", "\n", "# Some gudhi imports for TDA\n", "from tda_pipeline import DataSelector, LPNorm\n", "from gudhi.representations import Landscape\n", "from gudhi.sklearn.rips_persistence import RipsPersistence\n", "\n", "# Some graphical imports for the web app\n", "import ipywidgets as widgets\n", "import plotly.graph_objects as go\n", "\n", "# Some imports for ipywidgets\n", "from ipywidgets import DatePicker, BoundedIntText, ToggleButton, Text, HBox, VBox\n", "from IPython.display import display\n", "\n", "# cf. data_generation.py\n", "df = pd.read_csv('latest.csv', index_col=0)\n", "\n", "# min, max and default start values taken from the dataset - Python 3.7+\n", "min_value = datetime.date.fromisoformat(df.index[0])\n", "max_value = datetime.date.fromisoformat(df.index[-1])\n", "\n", "last_year = max_value - datetime.timedelta(days=250)\n", "\n", "# Widgets\n", "start = DatePicker(description='start', value = last_year)\n", "end = DatePicker(description='end', value = max_value)\n", "window = BoundedIntText(value=50, min=10, max=200, step=1, description='Windows size')\n", "\n", "button = ToggleButton(description='Compute', icon='cogs')\n", "\n", "def nearest_str_date(items, pivot):\n", " return min(items, key=lambda str_date: abs(datetime.date.fromisoformat(str_date) - pivot))\n", "\n", "def compute_Lp_norms():\n", " w=int(window.value)\n", " start_idx = df.index.get_loc(str(nearest_str_date(df.index, start.value - datetime.timedelta(days=w))))\n", " end_idx = df.index.get_loc(str(nearest_str_date(df.index, end.value)))\n", " # Some error management\n", " if start_idx == end_idx:\n", " raise IndexError('Start date must be different from end date.')\n", " if end_idx < w:\n", " end_idx = w\n", " if end_idx < start_idx:\n", " start_idx, end_idx = end_idx, start_idx\n", "\n", " pipe = Pipeline(\n", " [\n", " (\"data_sel\", DataSelector(start=start_idx, end=end_idx, w=w)),\n", " (\"rips_pers\", RipsPersistence(homology_dimensions=1, n_jobs=-1)),\n", " (\"landscape\", Landscape(resolution=1000)),\n", " (\"lpnorm\", LPNorm(n_jobs=-1)),\n", " (\"mms\", MinMaxScaler()),\n", " ]\n", " )\n", "\n", " start_chrono = float(time.time())\n", " #os.write(1, bytes(str(start_chrono),'UTF-8') + b'\\r\\n')\n", " L1L2mms = pipe.fit_transform(df)\n", " stop_chrono = float(time.time())\n", " #os.write(1, bytes(str(stop_chrono),'UTF-8') + b'\\r\\n')\n", " os.write(1, bytes(str(stop_chrono - start_chrono),'UTF-8') + b' sec. \\r\\n')\n", " \n", " l1l2df = pd.DataFrame({'date': df[start_idx+w:end_idx].index, 'L1': L1L2mms.transpose()[0], 'L2': L1L2mms.transpose()[1]})\n", " # Calculate the variance for the L norms\n", " j = 0\n", "\n", " for i in l1l2df.index:\n", " if j < w:\n", " k = 0\n", " else:\n", " k = j - w\n", " l1l2df.loc[i, 'L1_variance'] = np.var(l1l2df.iloc[k:j].L1)\n", " l1l2df.loc[i, 'L2_variance'] = np.var(l1l2df.iloc[k:j].L2)\n", " j += 1\n", " \n", " return l1l2df\n", "\n", "def compute(args):\n", " l1l2df = compute_Lp_norms()\n", " fig.data[0]['x'] = l1l2df['date']\n", " fig.data[0]['y'] = l1l2df['L1']\n", " fig.data[1]['x'] = l1l2df['date']\n", " fig.data[1]['y'] = l1l2df['L2']\n", " fig.data[2]['x'] = l1l2df['date']\n", " fig.data[2]['y'] = l1l2df['L1_variance']\n", " fig.data[3]['x'] = l1l2df['date']\n", " fig.data[3]['y'] = l1l2df['L2_variance']\n", " \n", "button.observe(compute, 'value')\n", "\n", "# Layout\n", "left_box = HBox([start, end, window, button])\n", "\n", "fig = go.FigureWidget()\n", "\n", "l1l2df = compute_Lp_norms()\n", "fig.add_scatter(x=l1l2df['date'], y=l1l2df['L1'], mode='lines', name='L1')\n", "fig.add_scatter(x=l1l2df['date'], y=l1l2df['L2'], mode='lines', name='L2')\n", "fig.add_scatter(x=l1l2df['date'], y=l1l2df['L1_variance'], mode='lines', name='L1_variance')\n", "fig.add_scatter(x=l1l2df['date'], y=l1l2df['L2_variance'], mode='lines', name='L2_variance')\n", "fig.update_xaxes(dtick=\"M1\", tickformat=\"%b\\n%Y\")\n", "fig.layout.title.text = 'Lp norms'\n", "\n", "display(left_box)\n", "fig" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.3" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { "04bc1b8cc8c4440bb1ae1f67623b495a": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "0dc80c24c27f44fa896d7ca633cdc852": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "2dd47ab560bf407ba83fcbe459cad9fb": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "357fd4335a6e44048a0930d36e813e17": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "3eec89c53f2b41f4a20fd494cf878aa4": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "3fc813ba2a024825bc45323cb5095a39": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "BoundedIntTextModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "BoundedIntTextModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "IntTextView", "continuous_update": false, "description": "Windows size", "description_tooltip": null, "disabled": false, "layout": "IPY_MODEL_04bc1b8cc8c4440bb1ae1f67623b495a", "max": 100, "min": 10, "step": 1, "style": "IPY_MODEL_3eec89c53f2b41f4a20fd494cf878aa4", "value": 50 } }, "5e3a1b06e72f427b8e4a70d93b24d0aa": { "buffers": [ { "data": "AAAAAAAA+H8AAAAAAAAAAN+dGBnz90M/ya6foaX7jz8UobdEndWRP8Pp1zvdxpE/o2AhmHvDkD+TZB7Jn0aSP6bDYyYvjpI/jIYGYS9Ekj80pon0UhySP3SjMUUwmac/8d3vTAA9sz8mhtY2Ola4Pw==", "encoding": "base64", "path": [ "_py2js_addTraces", "trace_data", 0, "y", "buffer" ] } ], "model_module": "jupyterlab-plotly", "model_module_version": "^5.8.0", "model_name": "FigureModel", "state": { "_config": { "plotlyServerURL": "https://plot.ly" }, "_data": [], "_dom_classes": [], "_js2py_layoutDelta": {}, "_js2py_pointsCallback": {}, "_js2py_relayout": {}, "_js2py_restyle": {}, "_js2py_traceDeltas": {}, "_js2py_update": {}, "_last_layout_edit_id": 6, "_last_trace_edit_id": 5, "_layout": {}, "_model_module": "jupyterlab-plotly", "_model_module_version": "^5.8.0", "_model_name": "FigureModel", "_py2js_addTraces": null, "_py2js_animate": {}, "_py2js_deleteTraces": {}, "_py2js_moveTraces": {}, "_py2js_relayout": null, "_py2js_removeLayoutProps": {}, "_py2js_removeTraceProps": {}, "_py2js_restyle": {}, "_py2js_update": null, "_view_count": 0, "_view_module": "jupyterlab-plotly", "_view_module_version": "^5.8.0", "_view_name": "FigureView" } }, "6974f6f5554e4668be6b4fa3a3fb492e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "ToggleButtonModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "ToggleButtonModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "ToggleButtonView", "button_style": "", "description": "Compute", "description_tooltip": null, "disabled": false, "icon": "cogs", "layout": "IPY_MODEL_a5791796fc444ec2bea6bcbc8ad415b2", "style": "IPY_MODEL_357fd4335a6e44048a0930d36e813e17", "tooltip": "", "value": false } }, "69be8b6286d34467887fb5c33635d05a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DatePickerModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DatePickerModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "DatePickerView", "description": "end", "description_tooltip": null, "disabled": false, "layout": "IPY_MODEL_dd7395b432754bf5b0d79468572c28b4", "style": "IPY_MODEL_2dd47ab560bf407ba83fcbe459cad9fb", "value": { "date": 26, "month": 4, "year": 2022 } } }, "6a4dcad6b7664b3881f746d503756c95": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "HBoxModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "HBoxView", "box_style": "", "children": [ "IPY_MODEL_bfe8dd1677374565874f47575c965f2a", "IPY_MODEL_69be8b6286d34467887fb5c33635d05a", "IPY_MODEL_3fc813ba2a024825bc45323cb5095a39", "IPY_MODEL_6974f6f5554e4668be6b4fa3a3fb492e" ], "layout": "IPY_MODEL_f66b3f77f7734f5cb0dbb201d72c0bc0" } }, "9effc611d77549d7b8b5b7a82551964a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", "state": { "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DescriptionStyleModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "StyleView", "description_width": "" } }, "a5791796fc444ec2bea6bcbc8ad415b2": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "bfe8dd1677374565874f47575c965f2a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DatePickerModel", "state": { "_dom_classes": [], "_model_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_model_name": "DatePickerModel", "_view_count": null, "_view_module": "@jupyter-widgets/controls", "_view_module_version": "1.5.0", "_view_name": "DatePickerView", "description": "start", "description_tooltip": null, "disabled": false, "layout": "IPY_MODEL_0dc80c24c27f44fa896d7ca633cdc852", "style": "IPY_MODEL_9effc611d77549d7b8b5b7a82551964a", "value": { "date": 18, "month": 8, "year": 2021 } } }, "dd7395b432754bf5b0d79468572c28b4": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } }, "f66b3f77f7734f5cb0dbb201d72c0bc0": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { "_model_module": "@jupyter-widgets/base", "_model_module_version": "1.2.0", "_model_name": "LayoutModel", "_view_count": null, "_view_module": "@jupyter-widgets/base", "_view_module_version": "1.2.0", "_view_name": "LayoutView", "align_content": null, "align_items": null, "align_self": null, "border": null, "bottom": null, "display": null, "flex": null, "flex_flow": null, "grid_area": null, "grid_auto_columns": null, "grid_auto_flow": null, "grid_auto_rows": null, "grid_column": null, "grid_gap": null, "grid_row": null, "grid_template_areas": null, "grid_template_columns": null, "grid_template_rows": null, "height": null, "justify_content": null, "justify_items": null, "left": null, "margin": null, "max_height": null, "max_width": null, "min_height": null, "min_width": null, "object_fit": null, "object_position": null, "order": null, "overflow": null, "overflow_x": null, "overflow_y": null, "padding": null, "right": null, "top": null, "visibility": null, "width": null } } }, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 5 }