{ "cells": [ { "cell_type": "markdown", "id": "7652c120-54fa-4c12-bbb2-8dd7a8aeb9b9", "metadata": {}, "source": [ "# Band Geometry" ] }, { "cell_type": "code", "execution_count": 1, "id": "7b8e17a3-5669-4609-b8eb-22fe78fc96fc", "metadata": {}, "outputs": [], "source": [ "from datetime import datetime\n", "\n", "import pandas as pd\n", "\n", "from lets_plot import *" ] }, { "cell_type": "code", "execution_count": 2, "id": "e5a21782-05b6-4072-83dd-142980bc0916", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "LetsPlot.setup_html()" ] }, { "cell_type": "code", "execution_count": 3, "id": "4b511a3d-cc20-45c9-9aa9-8feb555d54ca", "metadata": {}, "outputs": [], "source": [ "def get_dt(year, month=1, day=1):\n", " return int(round(1_000 * datetime(year, month, day).timestamp()))" ] }, { "cell_type": "code", "execution_count": 4, "id": "672f2175-e227-4950-b444-946211dd557e", "metadata": {}, "outputs": [], "source": [ "presidential_df = pd.read_csv(\"data/presidential.csv\", parse_dates=[\"start\", \"end\"])\n", "economics_df = pd.read_csv(\"https://raw.githubusercontent.com/JetBrains/lets-plot-docs/master/data/economics.csv\", parse_dates=[\"date\"])" ] }, { "cell_type": "code", "execution_count": 5, "id": "50a763a1-3244-4e3e-9743-dc9a0674914d", "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", " " ], "text/plain": [ "