{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "name": "analysis_15_june_21.ipynb", "provenance": [] }, "kernelspec": { "name": "python3", "display_name": "Python 3" }, "language_info": { "name": "python" } }, "cells": [ { "cell_type": "code", "metadata": { "id": "VF3iS8WkGaj4" }, "source": [ "import bokeh\n", "from bokeh.plotting import figure, show\n", "from bokeh.io import output_file, output_notebook\n", "import pandas as pd\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "import seaborn as sns" ], "execution_count": 20, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "G4r3YyrzGsCn" }, "source": [ "url = \"https://gist.githubusercontent.com/seankross/a412dfbd88b3db70b74b/raw/5f23f993cd87c283ce766e7ac6b329ee7cc2e1d1/mtcars.csv\"" ], "execution_count": 21, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "0Q-bH23tHZ2G" }, "source": [ "carsdf = pd.read_csv(url)" ], "execution_count": 22, "outputs": [] }, { "cell_type": "code", "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 141 }, "id": "OkYWED_bHdEJ", "outputId": "7c7bbc3d-8594-427c-dd80-8acd518fe061" }, "source": [ "carsdf.head(3)" ], "execution_count": 23, "outputs": [ { "output_type": "execute_result", "data": { "text/html": [ "<div>\n", "<style scoped>\n", " .dataframe tbody tr th:only-of-type {\n", " vertical-align: middle;\n", " }\n", "\n", " .dataframe tbody tr th {\n", " vertical-align: top;\n", " }\n", "\n", " .dataframe thead th {\n", " text-align: right;\n", " }\n", "</style>\n", "<table border=\"1\" class=\"dataframe\">\n", " <thead>\n", " <tr style=\"text-align: right;\">\n", " <th></th>\n", " <th>model</th>\n", " <th>mpg</th>\n", " <th>cyl</th>\n", " <th>disp</th>\n", " <th>hp</th>\n", " <th>drat</th>\n", " <th>wt</th>\n", " <th>qsec</th>\n", " <th>vs</th>\n", " <th>am</th>\n", " <th>gear</th>\n", " <th>carb</th>\n", " </tr>\n", " </thead>\n", " <tbody>\n", " <tr>\n", " <th>0</th>\n", " <td>Mazda RX4</td>\n", " <td>21.0</td>\n", " <td>6</td>\n", " <td>160.0</td>\n", " <td>110</td>\n", " <td>3.90</td>\n", " <td>2.620</td>\n", " <td>16.46</td>\n", " <td>0</td>\n", " <td>1</td>\n", " <td>4</td>\n", " <td>4</td>\n", " </tr>\n", " <tr>\n", " <th>1</th>\n", " <td>Mazda RX4 Wag</td>\n", " <td>21.0</td>\n", " <td>6</td>\n", " <td>160.0</td>\n", " <td>110</td>\n", " <td>3.90</td>\n", " <td>2.875</td>\n", " <td>17.02</td>\n", " <td>0</td>\n", " <td>1</td>\n", " <td>4</td>\n", " <td>4</td>\n", " </tr>\n", " <tr>\n", " <th>2</th>\n", " <td>Datsun 710</td>\n", " <td>22.8</td>\n", " <td>4</td>\n", " <td>108.0</td>\n", " <td>93</td>\n", " <td>3.85</td>\n", " <td>2.320</td>\n", " <td>18.61</td>\n", " <td>1</td>\n", " <td>1</td>\n", " <td>4</td>\n", " <td>1</td>\n", " </tr>\n", " </tbody>\n", "</table>\n", "</div>" ], "text/plain": [ " model mpg cyl disp hp drat wt qsec vs am gear carb\n", "0 Mazda RX4 21.0 6 160.0 110 3.90 2.620 16.46 0 1 4 4\n", "1 Mazda RX4 Wag 21.0 6 160.0 110 3.90 2.875 17.02 0 1 4 4\n", "2 Datsun 710 22.8 4 108.0 93 3.85 2.320 18.61 1 1 4 1" ] }, "metadata": { "tags": [] }, "execution_count": 23 } ] }, { "cell_type": "code", "metadata": { "id": "up8_pe5hHfny" }, "source": [ "p = figure(title=\"Simple line example\", x_axis_label=\"wt\", y_axis_label=\"mpg\")" ], "execution_count": 24, "outputs": [] }, { "cell_type": "code", "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 617 }, "id": "xT5yT5YHHrMw", "outputId": "a8c98250-05e1-4250-d3df-f1d3455e9860" }, "source": [ "p.circle(carsdf['wt'], carsdf['mpg'])\n", "show(p)\n", "output_notebook()" ], "execution_count": 26, "outputs": [ { "output_type": "display_data", "data": { "application/javascript": [ "\n", "(function(root) {\n", " function now() {\n", " return new Date();\n", " }\n", "\n", " var force = true;\n", "\n", " if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n", " root._bokeh_onload_callbacks = [];\n", " root._bokeh_is_loading = undefined;\n", " }\n", "\n", " var JS_MIME_TYPE = 'application/javascript';\n", " var HTML_MIME_TYPE = 'text/html';\n", " var EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", " var CLASS_NAME = 'output_bokeh rendered_html';\n", "\n", " /**\n", " * Render data to the DOM node\n", " */\n", " function render(props, node) {\n", " var script = document.createElement(\"script\");\n", " node.appendChild(script);\n", " }\n", "\n", " /**\n", " * Handle when an output is cleared or removed\n", " */\n", " function handleClearOutput(event, handle) {\n", " var cell = handle.cell;\n", "\n", " var id = cell.output_area._bokeh_element_id;\n", " var server_id = cell.output_area._bokeh_server_id;\n", " // Clean up Bokeh references\n", " if (id != null && id in Bokeh.index) {\n", " Bokeh.index[id].model.document.clear();\n", " delete Bokeh.index[id];\n", " }\n", "\n", " if (server_id !== undefined) {\n", " // Clean up Bokeh references\n", " var cmd = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n", " cell.notebook.kernel.execute(cmd, {\n", " iopub: {\n", " output: function(msg) {\n", " var id = msg.content.text.trim();\n", " if (id in Bokeh.index) {\n", " Bokeh.index[id].model.document.clear();\n", " delete Bokeh.index[id];\n", " }\n", " }\n", " }\n", " });\n", " // Destroy server and session\n", " var cmd = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n", " cell.notebook.kernel.execute(cmd);\n", " }\n", " }\n", "\n", " /**\n", " * Handle when a new output is added\n", " */\n", " function handleAddOutput(event, handle) {\n", " var output_area = handle.output_area;\n", " var output = handle.output;\n", "\n", " // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n", " if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n", " return\n", " }\n", "\n", " var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", "\n", " if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n", " toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n", " // store reference to embed id on output_area\n", " output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", " }\n", " if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", " var bk_div = document.createElement(\"div\");\n", " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", " var script_attrs = bk_div.children[0].attributes;\n", " for (var i = 0; i < script_attrs.length; i++) {\n", " toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n", " toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n", " }\n", " // store reference to server id on output_area\n", " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", " }\n", " }\n", "\n", " function register_renderer(events, OutputArea) {\n", "\n", " function append_mime(data, metadata, element) {\n", " // create a DOM node to render to\n", " var toinsert = this.create_output_subarea(\n", " metadata,\n", " CLASS_NAME,\n", " EXEC_MIME_TYPE\n", " );\n", " this.keyboard_manager.register_events(toinsert);\n", " // Render to node\n", " var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", " render(props, toinsert[toinsert.length - 1]);\n", " element.append(toinsert);\n", " return toinsert\n", " }\n", "\n", " /* Handle when an output is cleared or removed */\n", " events.on('clear_output.CodeCell', handleClearOutput);\n", " events.on('delete.Cell', handleClearOutput);\n", "\n", " /* Handle when a new output is added */\n", " events.on('output_added.OutputArea', handleAddOutput);\n", "\n", " /**\n", " * Register the mime type and append_mime function with output_area\n", " */\n", " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", " /* Is output safe? */\n", " safe: true,\n", " /* Index of renderer in `output_area.display_order` */\n", " index: 0\n", " });\n", " }\n", "\n", " // register the mime type if in Jupyter Notebook environment and previously unregistered\n", " if (root.Jupyter !== undefined) {\n", " var events = require('base/js/events');\n", " var OutputArea = require('notebook/js/outputarea').OutputArea;\n", "\n", " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", " register_renderer(events, OutputArea);\n", " }\n", " }\n", "\n", " \n", " if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n", " root._bokeh_timeout = Date.now() + 5000;\n", " root._bokeh_failed_load = false;\n", " }\n", "\n", " var NB_LOAD_WARNING = {'data': {'text/html':\n", " \"<div style='background-color: #fdd'>\\n\"+\n", " \"<p>\\n\"+\n", " \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n", " \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n", " \"</p>\\n\"+\n", " \"<ul>\\n\"+\n", " \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n", " \"<li>use INLINE resources instead, as so:</li>\\n\"+\n", " \"</ul>\\n\"+\n", " \"<code>\\n\"+\n", " \"from bokeh.resources import INLINE\\n\"+\n", " \"output_notebook(resources=INLINE)\\n\"+\n", " \"</code>\\n\"+\n", " \"</div>\"}};\n", "\n", " function display_loaded() {\n", " var el = document.getElementById(null);\n", " if (el != null) {\n", " el.textContent = \"BokehJS is loading...\";\n", " }\n", " if (root.Bokeh !== undefined) {\n", " if (el != null) {\n", " el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n", " }\n", " } else if (Date.now() < root._bokeh_timeout) {\n", " setTimeout(display_loaded, 100)\n", " }\n", " }\n", "\n", "\n", " function run_callbacks() {\n", " try {\n", " root._bokeh_onload_callbacks.forEach(function(callback) {\n", " if (callback != null)\n", " callback();\n", " });\n", " } finally {\n", " delete root._bokeh_onload_callbacks\n", " }\n", " console.debug(\"Bokeh: all callbacks have finished\");\n", " }\n", "\n", " function load_libs(css_urls, js_urls, callback) {\n", " if (css_urls == null) css_urls = [];\n", " if (js_urls == null) js_urls = [];\n", "\n", " root._bokeh_onload_callbacks.push(callback);\n", " if (root._bokeh_is_loading > 0) {\n", " console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n", " return null;\n", " }\n", " if (js_urls == null || js_urls.length === 0) {\n", " run_callbacks();\n", " return null;\n", " }\n", " console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n", " root._bokeh_is_loading = css_urls.length + js_urls.length;\n", "\n", " function on_load() {\n", " root._bokeh_is_loading--;\n", " if (root._bokeh_is_loading === 0) {\n", " console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n", " run_callbacks()\n", " }\n", " }\n", "\n", " function on_error(url) {\n", " console.error(\"failed to load \" + url);\n", " }\n", "\n", " for (let i = 0; i < css_urls.length; i++) {\n", " const url = css_urls[i];\n", " const element = document.createElement(\"link\");\n", " element.onload = on_load;\n", " element.onerror = on_error.bind(null, url);\n", " element.rel = \"stylesheet\";\n", " element.type = \"text/css\";\n", " element.href = url;\n", " console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n", " document.body.appendChild(element);\n", " }\n", "\n", " const hashes = {\"https://cdn.bokeh.org/bokeh/release/bokeh-2.3.2.min.js\": \"XypntL49z55iwGVUW4qsEu83zKL3XEcz0MjuGOQ9SlaaQ68X/g+k1FcioZi7oQAc\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.3.2.min.js\": \"bEsM86IHGDTLCS0Zod8a8WM6Y4+lafAL/eSiyQcuPzinmWNgNO2/olUF0Z2Dkn5i\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.3.2.min.js\": \"TX0gSQTdXTTeScqxj6PVQxTiRW8DOoGVwinyi1D3kxv7wuxQ02XkOxv0xwiypcAH\"};\n", "\n", " for (let i = 0; i < js_urls.length; i++) {\n", " const url = js_urls[i];\n", " const element = document.createElement('script');\n", " element.onload = on_load;\n", " element.onerror = on_error.bind(null, url);\n", " element.async = false;\n", " element.src = url;\n", " if (url in hashes) {\n", " element.crossOrigin = \"anonymous\";\n", " element.integrity = \"sha384-\" + hashes[url];\n", " }\n", " console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", " document.head.appendChild(element);\n", " }\n", " };\n", "\n", " function inject_raw_css(css) {\n", " const element = document.createElement(\"style\");\n", " element.appendChild(document.createTextNode(css));\n", " document.body.appendChild(element);\n", " }\n", "\n", " \n", " var js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-2.3.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.3.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.3.2.min.js\"];\n", " var css_urls = [];\n", " \n", "\n", " var inline_js = [\n", " function(Bokeh) {\n", " Bokeh.set_log_level(\"info\");\n", " },\n", " function(Bokeh) {\n", " \n", " \n", " }\n", " ];\n", "\n", " function run_inline_js() {\n", " \n", " if (root.Bokeh !== undefined || force === true) {\n", " \n", " for (var i = 0; i < inline_js.length; i++) {\n", " inline_js[i].call(root, root.Bokeh);\n", " }\n", " } else if (Date.now() < root._bokeh_timeout) {\n", " setTimeout(run_inline_js, 100);\n", " } else if (!root._bokeh_failed_load) {\n", " console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n", " root._bokeh_failed_load = true;\n", " } else if (force !== true) {\n", " var cell = $(document.getElementById(null)).parents('.cell').data().cell;\n", " cell.output_area.append_execute_result(NB_LOAD_WARNING)\n", " }\n", "\n", " }\n", "\n", " if (root._bokeh_is_loading === 0) {\n", " console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n", " run_inline_js();\n", " } else {\n", " load_libs(css_urls, js_urls, function() {\n", " console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n", " run_inline_js();\n", " });\n", " }\n", "}(window));" ], "application/vnd.bokehjs_load.v0+json": "\n(function(root) {\n function now() {\n return new Date();\n }\n\n var force = true;\n\n if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\n \n\n \n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n var NB_LOAD_WARNING = {'data': {'text/html':\n \"<div style='background-color: #fdd'>\\n\"+\n \"<p>\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"</p>\\n\"+\n \"<ul>\\n\"+\n \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n \"<li>use INLINE resources instead, as so:</li>\\n\"+\n \"</ul>\\n\"+\n \"<code>\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"</code>\\n\"+\n \"</div>\"}};\n\n function display_loaded() {\n var el = document.getElementById(null);\n if (el != null) {\n el.textContent = \"BokehJS is loading...\";\n }\n if (root.Bokeh !== undefined) {\n if (el != null) {\n el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(display_loaded, 100)\n }\n }\n\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n\n function on_error(url) {\n console.error(\"failed to load \" + url);\n }\n\n for (let i = 0; i < css_urls.length; i++) {\n const url = css_urls[i];\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n }\n\n const hashes = {\"https://cdn.bokeh.org/bokeh/release/bokeh-2.3.2.min.js\": \"XypntL49z55iwGVUW4qsEu83zKL3XEcz0MjuGOQ9SlaaQ68X/g+k1FcioZi7oQAc\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.3.2.min.js\": \"bEsM86IHGDTLCS0Zod8a8WM6Y4+lafAL/eSiyQcuPzinmWNgNO2/olUF0Z2Dkn5i\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.3.2.min.js\": \"TX0gSQTdXTTeScqxj6PVQxTiRW8DOoGVwinyi1D3kxv7wuxQ02XkOxv0xwiypcAH\"};\n\n for (let i = 0; i < js_urls.length; i++) {\n const url = js_urls[i];\n const element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.async = false;\n element.src = url;\n if (url in hashes) {\n element.crossOrigin = \"anonymous\";\n element.integrity = \"sha384-\" + hashes[url];\n }\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n \n var js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-2.3.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.3.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.3.2.min.js\"];\n var css_urls = [];\n \n\n var inline_js = [\n function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\n function(Bokeh) {\n \n \n }\n ];\n\n function run_inline_js() {\n \n if (root.Bokeh !== undefined || force === true) {\n \n for (var i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n var cell = $(document.getElementById(null)).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n\n }\n\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(css_urls, js_urls, function() {\n console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));" }, "metadata": { "tags": [] } }, { "output_type": "display_data", "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n", "\n", " <div class=\"bk-root\" id=\"6d5a3644-00bf-4d09-9dbc-878bc5dbf72c\" data-root-id=\"1436\"></div>\n" ] }, "metadata": { "tags": [] } }, { "output_type": "display_data", "data": { "application/javascript": [ "(function(root) {\n", " function embed_document(root) {\n", " \n", " var docs_json = {\"d7252b32-41db-4934-9d19-a97e2e1e8f75\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"1447\"}],\"center\":[{\"id\":\"1450\"},{\"id\":\"1454\"}],\"left\":[{\"id\":\"1451\"}],\"renderers\":[{\"id\":\"1472\"},{\"id\":\"1503\"}],\"title\":{\"id\":\"1437\"},\"toolbar\":{\"id\":\"1462\"},\"x_range\":{\"id\":\"1439\"},\"x_scale\":{\"id\":\"1443\"},\"y_range\":{\"id\":\"1441\"},\"y_scale\":{\"id\":\"1445\"}},\"id\":\"1436\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"text\":\"Simple line example\"},\"id\":\"1437\",\"type\":\"Title\"},{\"attributes\":{\"axis_label\":\"wt\",\"formatter\":{\"id\":\"1496\"},\"major_label_policy\":{\"id\":\"1494\"},\"ticker\":{\"id\":\"1448\"}},\"id\":\"1447\",\"type\":\"LinearAxis\"},{\"attributes\":{\"data_source\":{\"id\":\"1500\"},\"glyph\":{\"id\":\"1501\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1502\"},\"view\":{\"id\":\"1504\"}},\"id\":\"1503\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1460\",\"type\":\"HelpTool\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"9ihcj8L1BEAAAAAAAAAHQI/C9ShcjwJAuB6F61G4CUCF61G4HoULQK5H4XoUrgtAj8L1KFyPDECF61G4HoUJQDMzMzMzMwlAhetRuB6FC0CF61G4HoULQEjhehSuRxBA16NwPQrXDUA9CtejcD0OQAAAAAAAABVAGARWDi2yFUDhehSuR2EVQJqZmZmZmQFA16NwPQrX+T9cj8L1KFz9P7gehetRuANAKVyPwvUoDEB7FK5H4XoLQLgehetRuA5Aw/UoXI/CDkD2KFyPwvX+Px+F61G4HgFAaZHtfD81+D9cj8L1KFwJQClcj8L1KAZAj8L1KFyPDEA9CtejcD0GQA==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[32]},\"y\":{\"__ndarray__\":\"AAAAAAAANUAAAAAAAAA1QM3MzMzMzDZAZmZmZmZmNUAzMzMzM7MyQJqZmZmZGTJAmpmZmZmZLEBmZmZmZmY4QM3MzMzMzDZAMzMzMzMzM0DNzMzMzMwxQGZmZmZmZjBAzczMzMxMMUBmZmZmZmYuQM3MzMzMzCRAzczMzMzMJEBmZmZmZmYtQDMzMzMzM0BAZmZmZmZmPkAzMzMzM/NAQAAAAAAAgDVAAAAAAAAAL0BmZmZmZmYuQJqZmZmZmSpAMzMzMzMzM0DNzMzMzEw7QAAAAAAAADpAZmZmZmZmPkCamZmZmZkvQDMzMzMzszNAAAAAAAAALkBmZmZmZmY1QA==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[32]}},\"selected\":{\"id\":\"1498\"},\"selection_policy\":{\"id\":\"1499\"}},\"id\":\"1469\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"1455\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"1445\",\"type\":\"LinearScale\"},{\"attributes\":{\"fill_color\":{\"value\":\"#1f77b4\"},\"line_color\":{\"value\":\"#1f77b4\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1501\",\"type\":\"Circle\"},{\"attributes\":{\"active_multi\":null,\"tools\":[{\"id\":\"1455\"},{\"id\":\"1456\"},{\"id\":\"1457\"},{\"id\":\"1458\"},{\"id\":\"1459\"},{\"id\":\"1460\"}]},\"id\":\"1462\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1498\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1439\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"1491\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1515\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"1458\",\"type\":\"SaveTool\"},{\"attributes\":{\"axis\":{\"id\":\"1451\"},\"dimension\":1,\"ticker\":null},\"id\":\"1454\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1443\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"1441\",\"type\":\"DataRange1d\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1502\",\"type\":\"Circle\"},{\"attributes\":{\"overlay\":{\"id\":\"1461\"}},\"id\":\"1457\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1499\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"axis_label\":\"mpg\",\"formatter\":{\"id\":\"1493\"},\"major_label_policy\":{\"id\":\"1491\"},\"ticker\":{\"id\":\"1452\"}},\"id\":\"1451\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"1459\",\"type\":\"ResetTool\"},{\"attributes\":{\"source\":{\"id\":\"1500\"}},\"id\":\"1504\",\"type\":\"CDSView\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"1461\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1516\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_color\":{\"value\":\"#1f77b4\"},\"line_color\":{\"value\":\"#1f77b4\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1470\",\"type\":\"Circle\"},{\"attributes\":{\"axis\":{\"id\":\"1447\"},\"ticker\":null},\"id\":\"1450\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1494\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1448\",\"type\":\"BasicTicker\"},{\"attributes\":{\"data_source\":{\"id\":\"1469\"},\"glyph\":{\"id\":\"1470\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"1471\"},\"view\":{\"id\":\"1473\"}},\"id\":\"1472\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"1456\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"source\":{\"id\":\"1469\"}},\"id\":\"1473\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1496\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1471\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1452\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1493\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"data\":{\"x\":{\"__ndarray__\":\"9ihcj8L1BEAAAAAAAAAHQI/C9ShcjwJAuB6F61G4CUCF61G4HoULQK5H4XoUrgtAj8L1KFyPDECF61G4HoUJQDMzMzMzMwlAhetRuB6FC0CF61G4HoULQEjhehSuRxBA16NwPQrXDUA9CtejcD0OQAAAAAAAABVAGARWDi2yFUDhehSuR2EVQJqZmZmZmQFA16NwPQrX+T9cj8L1KFz9P7gehetRuANAKVyPwvUoDEB7FK5H4XoLQLgehetRuA5Aw/UoXI/CDkD2KFyPwvX+Px+F61G4HgFAaZHtfD81+D9cj8L1KFwJQClcj8L1KAZAj8L1KFyPDEA9CtejcD0GQA==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[32]},\"y\":{\"__ndarray__\":\"AAAAAAAANUAAAAAAAAA1QM3MzMzMzDZAZmZmZmZmNUAzMzMzM7MyQJqZmZmZGTJAmpmZmZmZLEBmZmZmZmY4QM3MzMzMzDZAMzMzMzMzM0DNzMzMzMwxQGZmZmZmZjBAzczMzMxMMUBmZmZmZmYuQM3MzMzMzCRAzczMzMzMJEBmZmZmZmYtQDMzMzMzM0BAZmZmZmZmPkAzMzMzM/NAQAAAAAAAgDVAAAAAAAAAL0BmZmZmZmYuQJqZmZmZmSpAMzMzMzMzM0DNzMzMzEw7QAAAAAAAADpAZmZmZmZmPkCamZmZmZkvQDMzMzMzszNAAAAAAAAALkBmZmZmZmY1QA==\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[32]}},\"selected\":{\"id\":\"1515\"},\"selection_policy\":{\"id\":\"1516\"}},\"id\":\"1500\",\"type\":\"ColumnDataSource\"}],\"root_ids\":[\"1436\"]},\"title\":\"Bokeh Application\",\"version\":\"2.3.2\"}};\n", " var render_items = [{\"docid\":\"d7252b32-41db-4934-9d19-a97e2e1e8f75\",\"root_ids\":[\"1436\"],\"roots\":{\"1436\":\"6d5a3644-00bf-4d09-9dbc-878bc5dbf72c\"}}];\n", " root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", "\n", " }\n", " if (root.Bokeh !== undefined) {\n", " embed_document(root);\n", " } else {\n", " var attempts = 0;\n", " var timer = setInterval(function(root) {\n", " if (root.Bokeh !== undefined) {\n", " clearInterval(timer);\n", " embed_document(root);\n", " } else {\n", " attempts++;\n", " if (attempts > 100) {\n", " clearInterval(timer);\n", " console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n", " }\n", " }\n", " }, 10, root)\n", " }\n", "})(window);" ], "application/vnd.bokehjs_exec.v0+json": "" }, "metadata": { "tags": [], "application/vnd.bokehjs_exec.v0+json": { "id": "1436" } } } ] }, { "cell_type": "code", "metadata": { "id": "Lkbpx0oUH5jw" }, "source": [ "" ], "execution_count": null, "outputs": [] } ] }