{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Making a data frame wide\n", "\n", "[Data set download](https://s3.amazonaws.com/bebi103.caltech.edu/data/penguins_subset.csv)\n", "\n", "
" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "nbsphinx": "hidden", "tags": [] }, "outputs": [], "source": [ "# Colab setup ------------------\n", "import os, sys, subprocess\n", "if \"google.colab\" in sys.modules:\n", " cmd = \"pip install --upgrade polars iqplot bebi103 iqplot watermark\"\n", " process = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n", " stdout, stderr = process.communicate()\n", " data_path = \"https://s3.amazonaws.com/bebi103.caltech.edu/data/\"\n", "else:\n", " data_path = \"../data/\"" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", "
\n", " \n", " Loading BokehJS ...\n", "
\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "'use strict';\n", "(function(root) {\n", " function now() {\n", " return new Date();\n", " }\n", "\n", " const 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", "const JS_MIME_TYPE = 'application/javascript';\n", " const HTML_MIME_TYPE = 'text/html';\n", " const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", " const CLASS_NAME = 'output_bokeh rendered_html';\n", "\n", " /**\n", " * Render data to the DOM node\n", " */\n", " function render(props, node) {\n", " const 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", " function drop(id) {\n", " const view = Bokeh.index.get_by_id(id)\n", " if (view != null) {\n", " view.model.document.clear()\n", " Bokeh.index.delete(view)\n", " }\n", " }\n", "\n", " const cell = handle.cell;\n", "\n", " const id = cell.output_area._bokeh_element_id;\n", " const server_id = cell.output_area._bokeh_server_id;\n", "\n", " // Clean up Bokeh references\n", " if (id != null) {\n", " drop(id)\n", " }\n", "\n", " if (server_id !== undefined) {\n", " // Clean up Bokeh references\n", " const cmd_clean = \"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_clean, {\n", " iopub: {\n", " output: function(msg) {\n", " const id = msg.content.text.trim()\n", " drop(id)\n", " }\n", " }\n", " });\n", " // Destroy server and session\n", " const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n", " cell.notebook.kernel.execute(cmd_destroy);\n", " }\n", " }\n", "\n", " /**\n", " * Handle when a new output is added\n", " */\n", " function handleAddOutput(event, handle) {\n", " const output_area = handle.output_area;\n", " const 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", " const 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", " const bk_div = document.createElement(\"div\");\n", " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", " const script_attrs = bk_div.children[0].attributes;\n", " for (let 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", " const 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", " const 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", " const events = require('base/js/events');\n", " const 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", " if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n", " root._bokeh_timeout = Date.now() + 5000;\n", " root._bokeh_failed_load = false;\n", " }\n", "\n", " const NB_LOAD_WARNING = {'data': {'text/html':\n", " \"
\\n\"+\n", " \"

\\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", " \"

\\n\"+\n", " \"\\n\"+\n", " \"\\n\"+\n", " \"from bokeh.resources import INLINE\\n\"+\n", " \"output_notebook(resources=INLINE)\\n\"+\n", " \"\\n\"+\n", " \"
\"}};\n", "\n", " function display_loaded(error = null) {\n", " const el = document.getElementById(\"ff6393b2-f1cf-4810-a9ec-6f655e338a5b\");\n", " if (el != null) {\n", " const html = (() => {\n", " if (typeof root.Bokeh === \"undefined\") {\n", " if (error == null) {\n", " return \"BokehJS is loading ...\";\n", " } else {\n", " return \"BokehJS failed to load.\";\n", " }\n", " } else {\n", " const prefix = `BokehJS ${root.Bokeh.version}`;\n", " if (error == null) {\n", " return `${prefix} successfully loaded.`;\n", " } else {\n", " return `${prefix} encountered errors while loading and may not function as expected.`;\n", " }\n", " }\n", " })();\n", " el.innerHTML = html;\n", "\n", " if (error != null) {\n", " const wrapper = document.createElement(\"div\");\n", " wrapper.style.overflow = \"auto\";\n", " wrapper.style.height = \"5em\";\n", " wrapper.style.resize = \"vertical\";\n", " const content = document.createElement(\"div\");\n", " content.style.fontFamily = \"monospace\";\n", " content.style.whiteSpace = \"pre-wrap\";\n", " content.style.backgroundColor = \"rgb(255, 221, 221)\";\n", " content.textContent = error.stack ?? error.toString();\n", " wrapper.append(content);\n", " el.append(wrapper);\n", " }\n", " } else if (Date.now() < root._bokeh_timeout) {\n", " setTimeout(() => display_loaded(error), 100);\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", " 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", " 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", " const js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-3.4.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.4.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.4.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.4.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-3.4.1.min.js\", \"https://unpkg.com/@holoviz/panel@1.4.4/dist/panel.min.js\"];\n", " const css_urls = [];\n", "\n", " const inline_js = [ function(Bokeh) {\n", " Bokeh.set_log_level(\"info\");\n", " },\n", "function(Bokeh) {\n", " }\n", " ];\n", "\n", " function run_inline_js() {\n", " if (root.Bokeh !== undefined || force === true) {\n", " try {\n", " for (let i = 0; i < inline_js.length; i++) {\n", " inline_js[i].call(root, root.Bokeh);\n", " }\n", "\n", " } catch (error) {display_loaded(error);throw error;\n", " }if (force === true) {\n", " display_loaded();\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", " const cell = $(document.getElementById(\"ff6393b2-f1cf-4810-a9ec-6f655e338a5b\")).parents('.cell').data().cell;\n", " cell.output_area.append_execute_result(NB_LOAD_WARNING)\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": "'use strict';\n(function(root) {\n function now() {\n return new Date();\n }\n\n const 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 if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n const NB_LOAD_WARNING = {'data': {'text/html':\n \"
\\n\"+\n \"

\\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 \"

\\n\"+\n \"\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\n\n function display_loaded(error = null) {\n const el = document.getElementById(\"ff6393b2-f1cf-4810-a9ec-6f655e338a5b\");\n if (el != null) {\n const html = (() => {\n if (typeof root.Bokeh === \"undefined\") {\n if (error == null) {\n return \"BokehJS is loading ...\";\n } else {\n return \"BokehJS failed to load.\";\n }\n } else {\n const prefix = `BokehJS ${root.Bokeh.version}`;\n if (error == null) {\n return `${prefix} successfully loaded.`;\n } else {\n return `${prefix} encountered errors while loading and may not function as expected.`;\n }\n }\n })();\n el.innerHTML = html;\n\n if (error != null) {\n const wrapper = document.createElement(\"div\");\n wrapper.style.overflow = \"auto\";\n wrapper.style.height = \"5em\";\n wrapper.style.resize = \"vertical\";\n const content = document.createElement(\"div\");\n content.style.fontFamily = \"monospace\";\n content.style.whiteSpace = \"pre-wrap\";\n content.style.backgroundColor = \"rgb(255, 221, 221)\";\n content.textContent = error.stack ?? error.toString();\n wrapper.append(content);\n el.append(wrapper);\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(() => display_loaded(error), 100);\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 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 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 const js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-3.4.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.4.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.4.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.4.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-3.4.1.min.js\", \"https://unpkg.com/@holoviz/panel@1.4.4/dist/panel.min.js\"];\n const css_urls = [];\n\n const inline_js = [ function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\nfunction(Bokeh) {\n }\n ];\n\n function run_inline_js() {\n if (root.Bokeh !== undefined || force === true) {\n try {\n for (let i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\n\n } catch (error) {display_loaded(error);throw error;\n }if (force === true) {\n display_loaded();\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 const cell = $(document.getElementById(\"ff6393b2-f1cf-4810-a9ec-6f655e338a5b\")).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\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": {}, "output_type": "display_data" } ], "source": [ "import polars as pl\n", "\n", "import bebi103\n", "\n", "import iqplot\n", "\n", "import bokeh.io\n", "bokeh.io.output_notebook()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "We have seen how unpivoting a data frame can bring it to tidy format, but a tall format is often not the only tidy option nor the easiest to work with. As usual, this is best seen by example, and we will use a subset of the [Palmer penguins data set](https://towardsdatascience.com/penguins-dataset-overview-iris-alternative-9453bb8c8d95), which you can download here: [https://s3.amazonaws.com/bebi103.caltech.edu/data/penguins_subset.csv](https://s3.amazonaws.com/bebi103.caltech.edu/data/penguins_subset.csv), to demonstrate. The data set consists of measurements of three different species of penguins acquired at the [Palmer Station in Antarctica](https://en.wikipedia.org/wiki/Palmer_Station). The measurements were made between 2007 and 2009 by [Kristen Gorman](https://gormankb.github.io/).\n", "\n", "As we work toward getting the data in a useful tidy format, we will learn some additional wrangling techniques." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exploring the data set\n", "\n", "First, let's take a look at the data set stored in the CSV file." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Gentoo,Gentoo,Gentoo,Gentoo,Adelie,Adelie,Adelie,Adelie,Chinstrap,Chinstrap,Chinstrap,Chinstrap\n", "bill_depth_mm,bill_length_mm,flipper_length_mm,body_mass_g,bill_depth_mm,bill_length_mm,flipper_length_mm,body_mass_g,bill_depth_mm,bill_length_mm,flipper_length_mm,body_mass_g\n", "16.3,48.4,220.0,5400.0,18.5,36.8,193.0,3500.0,18.3,47.6,195.0,3850.0\n", "15.8,46.3,215.0,5050.0,16.9,37.0,185.0,3000.0,16.7,42.5,187.0,3350.0\n", "14.2,47.5,209.0,4600.0,19.5,42.0,200.0,4050.0,16.6,40.9,187.0,3200.0\n", "15.7,48.7,208.0,5350.0,18.3,42.7,196.0,4075.0,20.0,52.8,205.0,4550.0\n", "14.1,48.7,210.0,4450.0,18.0,35.7,202.0,3550.0,18.7,45.4,188.0,3525.0\n", "15.0,49.6,216.0,4750.0,19.1,39.8,184.0,4650.0,18.2,49.6,193.0,3775.0\n", "15.7,49.3,217.0,5850.0,18.4,40.8,195.0,3900.0,17.5,48.5,191.0,3400.0\n", "15.2,49.2,221.0,6300.0,18.4,36.6,184.0,3475.0,18.2,49.2,195.0,4400.0\n" ] } ], "source": [ "!head ../data/penguins_subset.csv" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We see that we have *two* header rows. The first gives the species and the second the quantity that is being measured. Apparently, then, each row of data has information for three different penguins, one from each species. This is not a tidy data set!" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Reading the data set into a Polars data frame\n", "\n", "We start by naively reading this data set using `pl.read_csv()`." ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "shape: (5, 12)
GentooGentoo_duplicated_0Gentoo_duplicated_1Gentoo_duplicated_2AdelieAdelie_duplicated_0Adelie_duplicated_1Adelie_duplicated_2ChinstrapChinstrap_duplicated_0Chinstrap_duplicated_1Chinstrap_duplicated_2
strstrstrstrstrstrstrstrstrstrstrstr
"bill_depth_mm""bill_length_mm""flipper_length_mm""body_mass_g""bill_depth_mm""bill_length_mm""flipper_length_mm""body_mass_g""bill_depth_mm""bill_length_mm""flipper_length_mm""body_mass_g"
"16.3""48.4""220.0""5400.0""18.5""36.8""193.0""3500.0""18.3""47.6""195.0""3850.0"
"15.8""46.3""215.0""5050.0""16.9""37.0""185.0""3000.0""16.7""42.5""187.0""3350.0"
"14.2""47.5""209.0""4600.0""19.5""42.0""200.0""4050.0""16.6""40.9""187.0""3200.0"
"15.7""48.7""208.0""5350.0""18.3""42.7""196.0""4075.0""20.0""52.8""205.0""4550.0"
" ], "text/plain": [ "shape: (5, 12)\n", "┌───────────┬───────────┬───────────┬───────────┬───┬───────────┬───────────┬───────────┬──────────┐\n", "│ Gentoo ┆ Gentoo_du ┆ Gentoo_du ┆ Gentoo_du ┆ … ┆ Chinstrap ┆ Chinstrap ┆ Chinstrap ┆ Chinstra │\n", "│ --- ┆ plicated_ ┆ plicated_ ┆ plicated_ ┆ ┆ --- ┆ _duplicat ┆ _duplicat ┆ p_duplic │\n", "│ str ┆ 0 ┆ 1 ┆ 2 ┆ ┆ str ┆ ed_0 ┆ ed_1 ┆ ated_2 │\n", "│ ┆ --- ┆ --- ┆ --- ┆ ┆ ┆ --- ┆ --- ┆ --- │\n", "│ ┆ str ┆ str ┆ str ┆ ┆ ┆ str ┆ str ┆ str │\n", "╞═══════════╪═══════════╪═══════════╪═══════════╪═══╪═══════════╪═══════════╪═══════════╪══════════╡\n", "│ bill_dept ┆ bill_leng ┆ flipper_l ┆ body_mass ┆ … ┆ bill_dept ┆ bill_leng ┆ flipper_l ┆ body_mas │\n", "│ h_mm ┆ th_mm ┆ ength_mm ┆ _g ┆ ┆ h_mm ┆ th_mm ┆ ength_mm ┆ s_g │\n", "│ 16.3 ┆ 48.4 ┆ 220.0 ┆ 5400.0 ┆ … ┆ 18.3 ┆ 47.6 ┆ 195.0 ┆ 3850.0 │\n", "│ 15.8 ┆ 46.3 ┆ 215.0 ┆ 5050.0 ┆ … ┆ 16.7 ┆ 42.5 ┆ 187.0 ┆ 3350.0 │\n", "│ 14.2 ┆ 47.5 ┆ 209.0 ┆ 4600.0 ┆ … ┆ 16.6 ┆ 40.9 ┆ 187.0 ┆ 3200.0 │\n", "│ 15.7 ┆ 48.7 ┆ 208.0 ┆ 5350.0 ┆ … ┆ 20.0 ┆ 52.8 ┆ 205.0 ┆ 4550.0 │\n", "└───────────┴───────────┴───────────┴───────────┴───┴───────────┴───────────┴───────────┴──────────┘" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = pl.read_csv(os.path.join(data_path, \"penguins_subset.csv\"))\n", "df.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Ooof! This is nasty. The second header row is included with the data, which results in inferring every column data type to be a string. Polars only allows for a single header row, so we cannot load this data set.\n", "\n", "This is a fairly common occurrence with human-made tabular data. Researchers will have **hierarchical column headings**. In this case, the first header row is species and the second is the quantity that is being measured for the respective species. (Note that I did this intentionally for instructional purposes; this is not what the original penguins data set had.)\n", "\n", "To convert this type of structure into a tidy format, we can perform an unpivoting operation where each of the levels of the hierarchical column headings become rows. Polars will not do this for you, since it forbids hierarchical column headings (hierarchical indexing is not a good idea, in my opinion, so I see why Polars forbids it). I therefore wrote a function for the bebi103 package that takes a CSV file, possibly with a hierarchical index, and unpivots it to give a new CSV file. We can use this on the penguins data set and then load in the result." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "shape: (10, 4)
penguin_idspeciesquantityvalue
i64strstrf64
0"Gentoo""bill_depth_mm"16.3
0"Gentoo""bill_length_mm"48.4
0"Gentoo""flipper_length_mm"220.0
0"Gentoo""body_mass_g"5400.0
0"Adelie""bill_depth_mm"18.5
0"Adelie""bill_length_mm"36.8
0"Adelie""flipper_length_mm"193.0
0"Adelie""body_mass_g"3500.0
0"Chinstrap""bill_depth_mm"18.3
0"Chinstrap""bill_length_mm"47.6
" ], "text/plain": [ "shape: (10, 4)\n", "┌────────────┬───────────┬───────────────────┬────────┐\n", "│ penguin_id ┆ species ┆ quantity ┆ value │\n", "│ --- ┆ --- ┆ --- ┆ --- │\n", "│ i64 ┆ str ┆ str ┆ f64 │\n", "╞════════════╪═══════════╪═══════════════════╪════════╡\n", "│ 0 ┆ Gentoo ┆ bill_depth_mm ┆ 16.3 │\n", "│ 0 ┆ Gentoo ┆ bill_length_mm ┆ 48.4 │\n", "│ 0 ┆ Gentoo ┆ flipper_length_mm ┆ 220.0 │\n", "│ 0 ┆ Gentoo ┆ body_mass_g ┆ 5400.0 │\n", "│ 0 ┆ Adelie ┆ bill_depth_mm ┆ 18.5 │\n", "│ 0 ┆ Adelie ┆ bill_length_mm ┆ 36.8 │\n", "│ 0 ┆ Adelie ┆ flipper_length_mm ┆ 193.0 │\n", "│ 0 ┆ Adelie ┆ body_mass_g ┆ 3500.0 │\n", "│ 0 ┆ Chinstrap ┆ bill_depth_mm ┆ 18.3 │\n", "│ 0 ┆ Chinstrap ┆ bill_length_mm ┆ 47.6 │\n", "└────────────┴───────────┴───────────────────┴────────┘" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "bebi103.utils.unpivot_csv(\n", " os.path.join(data_path, \"penguins_subset.csv\"), \n", " os.path.join(data_path, \"penguins_tall.csv\"),\n", " header_names=['species', 'quantity'],\n", " retain_row_index=True,\n", " row_index_name='penguin_id',\n", " force_overwrite=True\n", ")\n", "\n", "df = pl.read_csv(os.path.join(data_path, \"penguins_tall.csv\"))\n", "\n", "df.head(10)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Notice that we kept the row index in the column `'penguin_id'` to make sure that we didn't lose track of what penguin each measurement was associated with. Note also that each penguin has a unique identifier *when combined with the species*. E.g., Adelie penguin with penguin ID 0 has four measurements associated with it." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Pivoting from tall to wide format\n", "\n", "Looking at the melded data frame above, it is very **tall**. Each row only has a single **value**, that is, a single measurement, and every other column in the row is metadata associated with that measurement, specifically which penguin/species and which quantity was being measured.\n", "\n", "While this tall format is tidy, we can imagine using a **wide** format, in which each row is a specific penguin and each column is a quantity measured on that penguin. This is also a tidy format. In some cases, a tall format is more convenient, and in others a wide format is more convenient.\n", "\n", "To convert from a tall to a wide format, we perform a **pivot**. A pivot operation classifies columns of a tall data frame in three ways.\n", "\n", "- The column(s) we pivot **on** gets converted into column *headings* of the pivoted data frame.\n", "- The **value** column's entries get populated under the new column headings determined by the **on** column.\n", "- The **index** column(s) are essentially along for the ride. They are retained as columns. If the index columns are not unique, they you need to specify an aggregating operation that will be applied to the values associated with rows that have like entries in the index column(s).\n", "\n", "Let us now perform the pivot. We want `'quantity'` as the \"on\" column, since it\n", "takes a column or columns of a data frame and converts them to column headings. In this case, the value column is `'value'`, and `'penguin_id'` and `'species'` columns are the index columns. They uniquely define a penguin, so we do not need to provide any aggregating function." ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "shape: (5, 6)
penguin_idspeciesbill_depth_mmbill_length_mmflipper_length_mmbody_mass_g
i64strf64f64f64f64
0"Gentoo"16.348.4220.05400.0
0"Adelie"18.536.8193.03500.0
0"Chinstrap"18.347.6195.03850.0
1"Gentoo"15.846.3215.05050.0
1"Adelie"16.937.0185.03000.0
" ], "text/plain": [ "shape: (5, 6)\n", "┌────────────┬───────────┬───────────────┬────────────────┬───────────────────┬─────────────┐\n", "│ penguin_id ┆ species ┆ bill_depth_mm ┆ bill_length_mm ┆ flipper_length_mm ┆ body_mass_g │\n", "│ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │\n", "│ i64 ┆ str ┆ f64 ┆ f64 ┆ f64 ┆ f64 │\n", "╞════════════╪═══════════╪═══════════════╪════════════════╪═══════════════════╪═════════════╡\n", "│ 0 ┆ Gentoo ┆ 16.3 ┆ 48.4 ┆ 220.0 ┆ 5400.0 │\n", "│ 0 ┆ Adelie ┆ 18.5 ┆ 36.8 ┆ 193.0 ┆ 3500.0 │\n", "│ 0 ┆ Chinstrap ┆ 18.3 ┆ 47.6 ┆ 195.0 ┆ 3850.0 │\n", "│ 1 ┆ Gentoo ┆ 15.8 ┆ 46.3 ┆ 215.0 ┆ 5050.0 │\n", "│ 1 ┆ Adelie ┆ 16.9 ┆ 37.0 ┆ 185.0 ┆ 3000.0 │\n", "└────────────┴───────────┴───────────────┴────────────────┴───────────────────┴─────────────┘" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = df.pivot(\n", " on='quantity', \n", " index=['penguin_id', 'species'], \n", " values='value'\n", ")\n", "\n", "# Take a look\n", "df.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Excellent! We now have a wide, but still tidy, data frame.\n", "\n", "The `'penguin_id'` column is dispensable, but we will keep it for now, since we will demonstrate a pivot operation from this wide data frame in a moment." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### A couple of plots for fun\n", "\n", "Now that we've done all this work and our data set is tidy, let's make a plot for fun. First, we'll plot the ECDFs of the bill lengths." ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "(function(root) {\n", " function embed_document(root) {\n", " const docs_json = {\"214302da-1e0e-4380-a52c-35f9441c7bf2\":{\"version\":\"3.4.1\",\"title\":\"Bokeh Application\",\"roots\":[{\"type\":\"object\",\"name\":\"Figure\",\"id\":\"p1002\",\"attributes\":{\"x_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1003\"},\"y_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1004\"},\"x_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1011\"},\"y_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1012\"},\"title\":{\"type\":\"object\",\"name\":\"Title\",\"id\":\"p1009\"},\"renderers\":[{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1040\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1034\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1035\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1036\"},\"data\":{\"type\":\"map\",\"entries\":[[\"x\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"MzMzMzNzREAzMzMzM3NEQM3MzMzMTEVAzczMzMxMRUC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LS0vbPzw8PDw8PNw/PDw8PDw83D8tLS0tLS3dPy0tLS0tLd0/Hh4eHh4e3j8eHh4eHh7ePw8PDw8PD98/Dw8PDw8P3z8AAAAAAADgPwAAAAAAAOA/eHh4eHh44D94eHh4eHjgP/Hw8PDw8OA/8fDw8PDw4D9paWlpaWnhP2lpaWlpaeE/4uHh4eHh4T/i4eHh4eHhP1paWlpaWuI/WlpaWlpa4j/T0tLS0tLiP9PS0tLS0uI/S0tLS0tL4z9LS0tLS0vjP8TDw8PDw+M/xMPDw8PD4z88PDw8PDzkPzw8PDw8POQ/tbS0tLS05D+1tLS0tLTkPy0tLS0tLeU/LS0tLS0t5T+mpaWlpaXlP6alpaWlpeU/Hh4eHh4e5j8eHh4eHh7mP5eWlpaWluY/l5aWlpaW5j8PDw8PDw/nPw8PDw8PD+c/iIeHh4eH5z+Ih4eHh4fnPwAAAAAAAOg/AAAAAAAA6D94eHh4eHjoP3h4eHh4eOg/8fDw8PDw6D/x8PDw8PDoP2lpaWlpaek/aWlpaWlp6T/i4eHh4eHpP+Lh4eHh4ek/WlpaWlpa6j9aWlpaWlrqP9PS0tLS0uo/09LS0tLS6j9LS0tLS0vrP0tLS0tLS+s/xMPDw8PD6z/Ew8PDw8PrPzw8PDw8POw/PDw8PDw87D+1tLS0tLTsP7W0tLS0tOw/LS0tLS0t7T8tLS0tLS3tP6alpaWlpe0/pqWlpaWl7T8eHh4eHh7uPx4eHh4eHu4/l5aWlpaW7j+XlpaWlpbuPw8PDw8PD+8/Dw8PDw8P7z+Ih4eHh4fvP4iHh4eHh+8/AAAAAAAA8D8=\"},\"shape\":[136],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1041\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1042\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"p1037\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":\"#1f77b3\",\"line_width\":2}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"p1038\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":\"#1f77b3\",\"line_alpha\":0.1,\"line_width\":2}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"p1039\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":\"#1f77b3\",\"line_alpha\":0.2,\"line_width\":2}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1049\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1043\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1044\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1045\"},\"data\":{\"type\":\"map\"}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1050\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1051\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1046\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":40.9},\"y\":{\"type\":\"value\",\"value\":0},\"angle\":{\"type\":\"value\",\"value\":3.141592653589793},\"line_color\":{\"type\":\"value\",\"value\":\"#1f77b3\"},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1047\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":40.9},\"y\":{\"type\":\"value\",\"value\":0},\"angle\":{\"type\":\"value\",\"value\":3.141592653589793},\"line_color\":{\"type\":\"value\",\"value\":\"#1f77b3\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1048\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":40.9},\"y\":{\"type\":\"value\",\"value\":0},\"angle\":{\"type\":\"value\",\"value\":3.141592653589793},\"line_color\":{\"type\":\"value\",\"value\":\"#1f77b3\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"line_width\":{\"type\":\"value\",\"value\":2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1058\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1052\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1053\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1054\"},\"data\":{\"type\":\"map\"}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1059\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1060\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1055\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":55.9},\"y\":{\"type\":\"value\",\"value\":1},\"line_color\":{\"type\":\"value\",\"value\":\"#1f77b3\"},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1056\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":55.9},\"y\":{\"type\":\"value\",\"value\":1},\"line_color\":{\"type\":\"value\",\"value\":\"#1f77b3\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1057\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":55.9},\"y\":{\"type\":\"value\",\"value\":1},\"line_color\":{\"type\":\"value\",\"value\":\"#1f77b3\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"line_width\":{\"type\":\"value\",\"value\":2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1067\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1061\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1062\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1063\"},\"data\":{\"type\":\"map\",\"entries\":[[\"x\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAADAQEAAAAAAAMBAQAAAAAAAAEFAAAAAAAAAQUDNzMzMzAxBQM3MzMzMDEFAAAAAAABAQUAAAAAAAEBBQM3MzMzMTEFAzczMzMxMQUAAAAAAAIBBQAAAAAAAgEFAmpmZmZmZQUCamZmZmZlBQJqZmZmZ2UFAmpmZmZnZQUCamZmZmdlBQJqZmZmZ2UFAMzMzMzPzQUAzMzMzM/NBQAAAAAAAAEJAAAAAAAAAQkAAAAAAAABCQAAAAAAAAEJAmpmZmZkZQkCamZmZmRlCQJqZmZmZGUJAmpmZmZkZQkCamZmZmRlCQJqZmZmZGUJAZmZmZmYmQkBmZmZmZiZCQDMzMzMzM0JAMzMzMzMzQkAzMzMzMzNCQDMzMzMzM0JAAAAAAABAQkAAAAAAAEBCQAAAAAAAQEJAAAAAAABAQkDNzMzMzExCQM3MzMzMTEJAmpmZmZlZQkCamZmZmVlCQGZmZmZmZkJAZmZmZmZmQkAAAAAAAIBCQAAAAAAAgEJAAAAAAACAQkAAAAAAAIBCQJqZmZmZmUJAmpmZmZmZQkBmZmZmZqZCQGZmZmZmpkJAZmZmZmamQk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Wlpaek/aWlpaWlp6T/i4eHh4eHpP+Lh4eHh4ek/WlpaWlpa6j9aWlpaWlrqP9PS0tLS0uo/09LS0tLS6j9LS0tLS0vrP0tLS0tLS+s/xMPDw8PD6z/Ew8PDw8PrPzw8PDw8POw/PDw8PDw87D+1tLS0tLTsP7W0tLS0tOw/LS0tLS0t7T8tLS0tLS3tP6alpaWlpe0/pqWlpaWl7T8eHh4eHh7uPx4eHh4eHu4/l5aWlpaW7j+XlpaWlpbuPw8PDw8PD+8/Dw8PDw8P7z+Ih4eHh4fvP4iHh4eHh+8/AAAAAAAA8D8=\"},\"shape\":[136],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1068\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1069\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"p1064\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":\"#ff7e0e\",\"line_width\":2}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"p1065\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":\"#ff7e0e\",\"line_alpha\":0.1,\"line_width\":2}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"p1066\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":\"#ff7e0e\",\"line_alpha\":0.2,\"line_width\":2}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1076\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1070\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1071\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1072\"},\"data\":{\"type\":\"map\"}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1077\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1078\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1073\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":33.5},\"y\":{\"type\":\"value\",\"value\":0},\"angle\":{\"type\":\"value\",\"value\":3.141592653589793},\"line_color\":{\"type\":\"value\",\"value\":\"#ff7e0e\"},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1074\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":33.5},\"y\":{\"type\":\"value\",\"value\":0},\"angle\":{\"type\":\"value\",\"value\":3.141592653589793},\"line_color\":{\"type\":\"value\",\"value\":\"#ff7e0e\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1075\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":33.5},\"y\":{\"type\":\"value\",\"value\":0},\"angle\":{\"type\":\"value\",\"value\":3.141592653589793},\"line_color\":{\"type\":\"value\",\"value\":\"#ff7e0e\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"line_width\":{\"type\":\"value\",\"value\":2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1085\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1079\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1080\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1081\"},\"data\":{\"type\":\"map\"}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1086\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1087\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1082\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":46.0},\"y\":{\"type\":\"value\",\"value\":1},\"line_color\":{\"type\":\"value\",\"value\":\"#ff7e0e\"},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1083\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":46.0},\"y\":{\"type\":\"value\",\"value\":1},\"line_color\":{\"type\":\"value\",\"value\":\"#ff7e0e\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1084\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":46.0},\"y\":{\"type\":\"value\",\"value\":1},\"line_color\":{\"type\":\"value\",\"value\":\"#ff7e0e\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"line_width\":{\"type\":\"value\",\"value\":2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1094\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1088\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1089\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1090\"},\"data\":{\"type\":\"map\",\"entries\":[[\"x\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"MzMzMzNzREAzMzMzM3NEQDMzMzMzM0VAMzMzMzMzRUAAAAAAAEBFQAAAA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w8PNw/PDw8PDw83D8tLS0tLS3dPy0tLS0tLd0/Hh4eHh4e3j8eHh4eHh7ePw8PDw8PD98/Dw8PDw8P3z8AAAAAAADgPwAAAAAAAOA/eHh4eHh44D94eHh4eHjgP/Hw8PDw8OA/8fDw8PDw4D9paWlpaWnhP2lpaWlpaeE/4uHh4eHh4T/i4eHh4eHhP1paWlpaWuI/WlpaWlpa4j/T0tLS0tLiP9PS0tLS0uI/S0tLS0tL4z9LS0tLS0vjP8TDw8PDw+M/xMPDw8PD4z88PDw8PDzkPzw8PDw8POQ/tbS0tLS05D+1tLS0tLTkPy0tLS0tLeU/LS0tLS0t5T+mpaWlpaXlP6alpaWlpeU/Hh4eHh4e5j8eHh4eHh7mP5eWlpaWluY/l5aWlpaW5j8PDw8PDw/nPw8PDw8PD+c/iIeHh4eH5z+Ih4eHh4fnPwAAAAAAAOg/AAAAAAAA6D94eHh4eHjoP3h4eHh4eOg/8fDw8PDw6D/x8PDw8PDoP2lpaWlpaek/aWlpaWlp6T/i4eHh4eHpP+Lh4eHh4ek/WlpaWlpa6j9aWlpaWlrqP9PS0tLS0uo/09LS0tLS6j9LS0tLS0vrP0tLS0tLS+s/xMPDw8PD6z/Ew8PDw8PrPzw8PDw8POw/PDw8PDw87D+1tLS0tLTsP7W0tLS0tOw/LS0tLS0t7T8tLS0tLS3tP6alpaWlpe0/pqWlpaWl7T8eHh4eHh7uPx4eHh4eHu4/l5aWlpaW7j+XlpaWlpbuPw8PDw8PD+8/Dw8PDw8P7z+Ih4eHh4fvP4iHh4eHh+8/AAAAAAAA8D8=\"},\"shape\":[136],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1095\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1096\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"p1091\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":\"#2ba02b\",\"line_width\":2}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"p1092\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":\"#2ba02b\",\"line_alpha\":0.1,\"line_width\":2}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"p1093\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":\"#2ba02b\",\"line_alpha\":0.2,\"line_width\":2}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1103\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1097\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1098\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1099\"},\"data\":{\"type\":\"map\"}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1104\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1105\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1100\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":40.9},\"y\":{\"type\":\"value\",\"value\":0},\"angle\":{\"type\":\"value\",\"value\":3.141592653589793},\"line_color\":{\"type\":\"value\",\"value\":\"#2ba02b\"},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1101\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":40.9},\"y\":{\"type\":\"value\",\"value\":0},\"angle\":{\"type\":\"value\",\"value\":3.141592653589793},\"line_color\":{\"type\":\"value\",\"value\":\"#2ba02b\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1102\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":40.9},\"y\":{\"type\":\"value\",\"value\":0},\"angle\":{\"type\":\"value\",\"value\":3.141592653589793},\"line_color\":{\"type\":\"value\",\"value\":\"#2ba02b\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"line_width\":{\"type\":\"value\",\"value\":2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1112\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1106\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1107\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1108\"},\"data\":{\"type\":\"map\"}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1113\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1114\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1109\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":58.0},\"y\":{\"type\":\"value\",\"value\":1},\"line_color\":{\"type\":\"value\",\"value\":\"#2ba02b\"},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1110\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":58.0},\"y\":{\"type\":\"value\",\"value\":1},\"line_color\":{\"type\":\"value\",\"value\":\"#2ba02b\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1111\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":58.0},\"y\":{\"type\":\"value\",\"value\":1},\"line_color\":{\"type\":\"value\",\"value\":\"#2ba02b\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"line_width\":{\"type\":\"value\",\"value\":2}}}}}],\"toolbar\":{\"type\":\"object\",\"name\":\"Toolbar\",\"id\":\"p1010\",\"attributes\":{\"tools\":[{\"type\":\"object\",\"name\":\"PanTool\",\"id\":\"p1023\"},{\"type\":\"object\",\"name\":\"WheelZoomTool\",\"id\":\"p1024\",\"attributes\":{\"renderers\":\"auto\"}},{\"type\":\"object\",\"name\":\"BoxZoomTool\",\"id\":\"p1025\",\"attributes\":{\"overlay\":{\"type\":\"object\",\"name\":\"BoxAnnotation\",\"id\":\"p1026\",\"attributes\":{\"syncable\":false,\"level\":\"overlay\",\"visible\":false,\"left\":{\"type\":\"number\",\"value\":\"nan\"},\"right\":{\"type\":\"number\",\"value\":\"nan\"},\"top\":{\"type\":\"number\",\"value\":\"nan\"},\"bottom\":{\"type\":\"number\",\"value\":\"nan\"},\"left_units\":\"canvas\",\"right_units\":\"canvas\",\"top_units\":\"canvas\",\"bottom_units\":\"canvas\",\"line_color\":\"black\",\"line_alpha\":1.0,\"line_width\":2,\"line_dash\":[4,4],\"fill_color\":\"lightgrey\",\"fill_alpha\":0.5}}}},{\"type\":\"object\",\"name\":\"SaveTool\",\"id\":\"p1031\"},{\"type\":\"object\",\"name\":\"ResetTool\",\"id\":\"p1032\"},{\"type\":\"object\",\"name\":\"HelpTool\",\"id\":\"p1033\"}]}},\"toolbar_location\":\"above\",\"left\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1018\",\"attributes\":{\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1019\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1020\"},\"axis_label\":\"ECDF\",\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1021\"}}}],\"right\":[{\"type\":\"object\",\"name\":\"Legend\",\"id\":\"p1115\",\"attributes\":{\"location\":\"center\",\"click_policy\":\"hide\",\"items\":[{\"type\":\"object\",\"name\":\"LegendItem\",\"id\":\"p1116\",\"attributes\":{\"label\":{\"type\":\"value\",\"value\":\"Gentoo\"},\"renderers\":[{\"id\":\"p1040\"},{\"id\":\"p1058\"},{\"id\":\"p1049\"}]}},{\"type\":\"object\",\"name\":\"LegendItem\",\"id\":\"p1117\",\"attributes\":{\"label\":{\"type\":\"value\",\"value\":\"Adelie\"},\"renderers\":[{\"id\":\"p1067\"},{\"id\":\"p1085\"},{\"id\":\"p1076\"}]}},{\"type\":\"object\",\"name\":\"LegendItem\",\"id\":\"p1118\",\"attributes\":{\"label\":{\"type\":\"value\",\"value\":\"Chinstrap\"},\"renderers\":[{\"id\":\"p1094\"},{\"id\":\"p1112\"},{\"id\":\"p1103\"}]}}]}}],\"below\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1013\",\"attributes\":{\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1014\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1015\"},\"axis_label\":\"bill length (mm)\",\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1016\"}}}],\"center\":[{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1017\",\"attributes\":{\"axis\":{\"id\":\"p1013\"}}},{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1022\",\"attributes\":{\"dimension\":1,\"axis\":{\"id\":\"p1018\"}}}],\"frame_width\":400,\"frame_height\":275}}],\"defs\":[{\"type\":\"model\",\"name\":\"ReactiveHTML1\"},{\"type\":\"model\",\"name\":\"FlexBox1\",\"properties\":[{\"name\":\"align_content\",\"kind\":\"Any\",\"default\":\"flex-start\"},{\"name\":\"align_items\",\"kind\":\"Any\",\"default\":\"flex-start\"},{\"name\":\"flex_direction\",\"kind\":\"Any\",\"default\":\"row\"},{\"name\":\"flex_wrap\",\"kind\":\"Any\",\"default\":\"wrap\"},{\"name\":\"gap\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"justify_content\",\"kind\":\"Any\",\"default\":\"flex-start\"}]},{\"type\":\"model\",\"name\":\"FloatPanel1\",\"properties\":[{\"name\":\"config\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"contained\",\"kind\":\"Any\",\"default\":true},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"right-top\"},{\"name\":\"offsetx\",\"kind\":\"Any\",\"default\":null},{\"name\":\"offsety\",\"kind\":\"Any\",\"default\":null},{\"name\":\"theme\",\"kind\":\"Any\",\"default\":\"primary\"},{\"name\":\"status\",\"kind\":\"Any\",\"default\":\"normalized\"}]},{\"type\":\"model\",\"name\":\"GridStack1\",\"properties\":[{\"name\":\"mode\",\"kind\":\"Any\",\"default\":\"warn\"},{\"name\":\"ncols\",\"kind\":\"Any\",\"default\":null},{\"name\":\"nrows\",\"kind\":\"Any\",\"default\":null},{\"name\":\"allow_resize\",\"kind\":\"Any\",\"default\":true},{\"name\":\"allow_drag\",\"kind\":\"Any\",\"default\":true},{\"name\":\"state\",\"kind\":\"Any\",\"default\":[]}]},{\"type\":\"model\",\"name\":\"drag1\",\"properties\":[{\"name\":\"slider_width\",\"kind\":\"Any\",\"default\":5},{\"name\":\"slider_color\",\"kind\":\"Any\",\"default\":\"black\"},{\"name\":\"value\",\"kind\":\"Any\",\"default\":50}]},{\"type\":\"model\",\"name\":\"click1\",\"properties\":[{\"name\":\"terminal_output\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"debug_name\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"clears\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"FastWrapper1\",\"properties\":[{\"name\":\"object\",\"kind\":\"Any\",\"default\":null},{\"name\":\"style\",\"kind\":\"Any\",\"default\":null}]},{\"type\":\"model\",\"name\":\"NotificationAreaBase1\",\"properties\":[{\"name\":\"js_events\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"bottom-right\"},{\"name\":\"_clear\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"NotificationArea1\",\"properties\":[{\"name\":\"js_events\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"notifications\",\"kind\":\"Any\",\"default\":[]},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"bottom-right\"},{\"name\":\"_clear\",\"kind\":\"Any\",\"default\":0},{\"name\":\"types\",\"kind\":\"Any\",\"default\":[{\"type\":\"map\",\"entries\":[[\"type\",\"warning\"],[\"background\",\"#ffc107\"],[\"icon\",{\"type\":\"map\",\"entries\":[[\"className\",\"fas fa-exclamation-triangle\"],[\"tagName\",\"i\"],[\"color\",\"white\"]]}]]},{\"type\":\"map\",\"entries\":[[\"type\",\"info\"],[\"background\",\"#007bff\"],[\"icon\",{\"type\":\"map\",\"entries\":[[\"className\",\"fas fa-info-circle\"],[\"tagName\",\"i\"],[\"color\",\"white\"]]}]]}]}]},{\"type\":\"model\",\"name\":\"Notification\",\"properties\":[{\"name\":\"background\",\"kind\":\"Any\",\"default\":null},{\"name\":\"duration\",\"kind\":\"Any\",\"default\":3000},{\"name\":\"icon\",\"kind\":\"Any\",\"default\":null},{\"name\":\"message\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"notification_type\",\"kind\":\"Any\",\"default\":null},{\"name\":\"_destroyed\",\"kind\":\"Any\",\"default\":false}]},{\"type\":\"model\",\"name\":\"TemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"BootstrapTemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"TemplateEditor1\",\"properties\":[{\"name\":\"layout\",\"kind\":\"Any\",\"default\":[]}]},{\"type\":\"model\",\"name\":\"MaterialTemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"copy_to_clipboard1\",\"properties\":[{\"name\":\"fill\",\"kind\":\"Any\",\"default\":\"none\"},{\"name\":\"value\",\"kind\":\"Any\",\"default\":null}]}]}};\n", " const render_items = [{\"docid\":\"214302da-1e0e-4380-a52c-35f9441c7bf2\",\"roots\":{\"p1002\":\"c5d324bd-6487-4278-a0f6-023b36fd091f\"},\"root_ids\":[\"p1002\"]}];\n", " void root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", " }\n", " if (root.Bokeh !== undefined) {\n", " embed_document(root);\n", " } else {\n", " let attempts = 0;\n", " const 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": { "application/vnd.bokehjs_exec.v0+json": { "id": "p1002" } }, "output_type": "display_data" } ], "source": [ "bokeh.io.show(\n", " iqplot.ecdf(\n", " data=df,\n", " cats='species',\n", " q='bill_length_mm',\n", " x_axis_label='bill length (mm)',\n", " frame_width=400,\n", " )\n", ")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can also plot bill length versus flipper length to see if we can see a difference among the species. It is also useful to have a hover tool that shows bill depth and body mass." ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "(function(root) {\n", " function embed_document(root) {\n", " const docs_json = {\"118611e7-2d72-4170-826a-557c937b8f9b\":{\"version\":\"3.4.1\",\"title\":\"Bokeh Application\",\"roots\":[{\"type\":\"object\",\"name\":\"Figure\",\"id\":\"p1125\",\"attributes\":{\"x_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1126\"},\"y_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1127\"},\"x_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1134\"},\"y_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1135\"},\"title\":{\"type\":\"object\",\"name\":\"Title\",\"id\":\"p1132\"},\"renderers\":[{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1167\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1158\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1159\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1160\"},\"data\":{\"type\":\"map\",\"entries\":[[\"penguin_id\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAABAAAAARAAAAEgAAABMAAAAUAAAAFQAAABYAAAAXAAAAGAAAABkAAAAaAAAAGwAAABwAAAAdAAAAHgAAAB8AAAAgAAAAIQAAACIAAAAjAAAAJAAAACUAAAAmAAAAJwAAACgAAAApAAAAKgAAACsAAAAsAAAALQAAAC4AAAAvAAAAMAAAADEAAAAyAAAAMwAAADQAAAA1AAAANgAAADcAAAA4AAAAOQAAADoAAAA7AAAAPAAAAD0AAAA+AAAAPwAAAEAAAABBAAAAQgAAAEMAAAA=\"},\"shape\":[68],\"dtype\":\"int32\",\"order\":\"little\"}],[\"species\",{\"type\":\"ndarray\",\"array\":[\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\",\"Gentoo\"],\"shape\":[68],\"dtype\":\"object\",\"order\":\"little\"}],[\"bill_depth_mm\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"zczMzMxMMECamZmZmZkvQGZmZmZmZixAZmZmZmZmL0AzMzMzMzMsQAAAAAAAAC5AZmZmZmZmL0BmZmZmZmYuQAAAAAAAAC5AMzMzMzMzMEAAAAAAAAAuQAAAAAAAADBAAAAAAAAAK0BmZmZmZmYvQM3MzMzMzCtAzczMzMzML0BmZmZmZmYrQJqZmZmZmSpAMzMzMzMzMECamZmZmZkvQJqZmZmZmS5AZmZmZmZmK0CamZmZmZkvQAAAAAAAAC5AAAAAAACAMECamZmZmRkwQDMzMzMzMypAzczMzMzML0BmZmZmZmYuQDMzMzMzMy9AzczMzMzMLUCamZmZmRkwQAAAAAAAADBAMzMzMzMzLkAAAAAAAAAtQAAAAAAAAC1AAAAAAAAAMUAAAAAAAAAtQGZmZmZmZi1AmpmZmZmZLEDNzMzMzMwrQM3MzMzMTDFAAAAAAAAAL0CamZmZmZkrQDMzMzMzMy5AZmZmZmZmK0AzMzMzMzMuQGZmZmZmZixAzczMzMzMKkAAAAAAAAAtQGZmZmZmZi5AmpmZmZmZLUCamZmZmZksQAAAAAAAAC1AMzMzMzMzK0BmZmZmZmYqQGZmZmZmZixAZmZmZmZmK0DNzMzMzEwxQJqZmZmZGTFAzczMzMzMLECamZmZmZksQDMzMzMzMy9AMzMzMzMzLUCamZmZmZksQAAAAAAAADFAZmZmZmZmL0AzMzMzMzMtQA==\"},\"shape\":[68],\"dtype\":\"float64\",\"order\":\"little\"}],[\"bill_length_mm\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"MzMzMzMzSEBmZmZmZiZHQAAAAAAAwEdAmpmZmZlZSECamZmZmVlIQM3MzMzMzEhAZmZmZmamSECamZmZmZlIQAAAAAAAwEZAZmZmZmZmSEAzMzMzMzNHQM3MzMzMTEhAAAAAAABAR0BmZmZmZmZJQJqZmZmZ2UZAAAAAAAAASUCamZmZmVlFQDMzMzMzc0ZAAAAAAADASECamZmZmZlGQAAAAAAAAElAMzMzMzNzREAzMzMzM7NKQM3MzMzMDElAzczMzMyMSUAAAAAAAIBIQDMzMzMzc0VAAAAAAABASUAAAAAAAABJQAAAAAAAQEpAmpmZmZkZR0BmZmZmZmZHQM3MzMzMjEtAzczMzMwMR0AAAAAAAMBGQM3MzMzMjEhAzczMzMwMSkAAAAAAAEBHQAAAAAAAQEZAAAAAAABARkAAAAAAAMBGQDMzMzMzM0ZAmpmZmZmZR0CamZmZmZlGQM3MzMzMDEhAZmZmZmamRkCamZmZmVlIQM3MzMzMTEdAZmZmZmamRUCamZmZmZlFQAAAAAAAwEVAmpmZmZmZRkCamZmZmRlIQJqZmZmZGUdAAAAAAAAARkDNzMzMzAxHQGZmZmZmZkVAzczMzMxMRUBmZmZmZmZJQJqZmZmZGUpAAAAAAABAR0CamZmZmRlJQJqZmZmZGUhAMzMzMzMzSEBmZmZmZmZHQDMzMzMz80tAAAAAAABARkBmZmZmZuZGQA==\"},\"shape\":[68],\"dtype\":\"float64\",\"order\":\"little\"}],[\"flipper_length_mm\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAACAa0AAAAAAAOBqQAAAAAAAIGpAAAAAAAAAakAAAAAAAEBqQAAAAAAAAGtAAAAAAAAga0AAAAAAAKBrQAAAAAAAgGtAAAAAAADAa0AAAAAAAABrQAAAAAAAwGxAAAAAAABAakAAAAAAAEBsQAAAAAAAwGpAAAAAAAAAbEAAAAAAAABqQAAAAAAAoGpAAAAAAACgbEAAAAAAAOBqQAAAAAAAgGtAAAAAAADAakAAAAAAAGBrQAAAAAAAIGxAAAAAAAAgbEAAAAAAAABrQAAAAAAA4GpAAAAAAADAa0AAAAAAAEBrQAAAAAAAoGtAAAAAAACga0AAAAAAAOBqQAAAAAAAwGxAAAAAAADgakAAAAAAAIBqQAAAAAAAgGpAAAAAAADAbEAAAAAAAKBqQAAAAAAAwGpAAAAAAAAAa0AAAAAAAEBqQAAAAAAAYGtAAAAAAADgakAAAAAAAOBqQAAAAAAAIGpAAAAAAABAakAAAAAAAMBrQAAAAAAAQGpAAAAAAAAgakAAAAAAAABqQAAAAAAAoGpAAAAAAACAakAAAAAAAEBqQAAAAAAAIGpAAAAAAAAAakAAAAAAAGBqQAAAAAAAIGpAAAAAAACgakAAAAAAAIBsQAAAAAAAgGxAAAAAAAAga0AAAAAAAEBrQAAAAAAAoGtAAAAAAACgakAAAAAAAOBqQAAAAAAAgGxAAAAAAAAga0AAAAAAAEBqQA==\"},\"shape\":[68],\"dtype\":\"float64\",\"order\":\"little\"}],[\"body_mass_g\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAAYtUAAAAAAALqzQAAAAAAA+LFAAAAAAADmtEAAAAAAAGKxQAAAAAAAjrJAAAAAAADatkAAAAAAAJy4QAAAAAAAiLNAAAAAAABwt0AAAAAAAFyyQAAAAAAAqLZAAAAAAADGsUAAAAAAAFC0QAAAAAAAMLFAAAAAAADmtEAAAAAAANyuQAAAAAAA7LNAAAAAAACotkAAAAAAALS0QAAAAAAArrVAAAAAAAAqskAAAAAAAHy1QAAAAAAAiLNAAAAAAACCtEAAAAAAAK61QAAAAAAAiLNAAAAAAACutUAAAAAAAES2QAAAAAAASrVAAAAAAAC0tEAAAAAAAHy1QAAAAAAA2rZAAAAAAADss0AAAAAAAI6yQAAAAAAAEbJAAAAAAACutUAAAAAAADCxQAAAAAAA8rJAAAAAAAAEsEAAAAAAAGiwQAAAAAAAgrRAAAAAAABvs0AAAAAAAI6yQAAAAAAAfLVAAAAAAADMsEAAAAAAAOa0QAAAAAAA8rJAAAAAAAAwsUAAAAAAAGKxQAAAAAAAKrJAAAAAAABQtEAAAAAAAPixQAAAAAAAwLJAAAAAAAD+sEAAAAAAAJSxQAAAAAAAXLJAAAAAAABWs0AAAAAAAOC1QAAAAAAAGLVAAAAAAAAks0AAAAAAAES2QAAAAAAA7LNAAAAAAADatkAAAAAAAPKyQAAAAAAA4LVAAAAAAAALs0AAAAAAAGiwQA==\"},\"shape\":[68],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1168\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1169\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1164\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"bill_length_mm\"},\"y\":{\"type\":\"field\",\"field\":\"flipper_length_mm\"},\"line_color\":{\"type\":\"value\",\"value\":\"#1f77b4\"},\"fill_color\":{\"type\":\"value\",\"value\":\"#1f77b4\"},\"hatch_color\":{\"type\":\"value\",\"value\":\"#1f77b4\"}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1165\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"bill_length_mm\"},\"y\":{\"type\":\"field\",\"field\":\"flipper_length_mm\"},\"line_color\":{\"type\":\"value\",\"value\":\"#1f77b4\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"fill_color\":{\"type\":\"value\",\"value\":\"#1f77b4\"},\"fill_alpha\":{\"type\":\"value\",\"value\":0.1},\"hatch_color\":{\"type\":\"value\",\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.1}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1166\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"bill_length_mm\"},\"y\":{\"type\":\"field\",\"field\":\"flipper_length_mm\"},\"line_color\":{\"type\":\"value\",\"value\":\"#1f77b4\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"fill_color\":{\"type\":\"value\",\"value\":\"#1f77b4\"},\"fill_alpha\":{\"type\":\"value\",\"value\":0.2},\"hatch_color\":{\"type\":\"value\",\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1179\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1170\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1171\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1172\"},\"data\":{\"type\":\"map\",\"entries\":[[\"penguin_id\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAABAAAAARAAAAEgAAABMAAAAUAAAAFQAAABYAAAAXAAAAGAAAABkAAAAaAAAAGwAAABwAAAAdAAAAHgAAAB8AAAAgAAAAIQAAACIAAAAjAAAAJAAAACUAAAAmAAAAJwAAACgAAAApAAAAKgAAACsAAAAsAAAALQAAAC4AAAAvAAAAMAAAADEAAAAyAAAAMwAAADQAAAA1AAAANgAAADcAAAA4AAAAOQAAADoAAAA7AAAAPAAAAD0AAAA+AAAAPwAAAEAAAABBAAAAQgAAAEMAAAA=\"},\"shape\":[68],\"dtype\":\"int32\",\"order\":\"little\"}],[\"species\",{\"type\":\"ndarray\",\"array\":[\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\",\"Adelie\"],\"shape\":[68],\"dtype\":\"object\",\"order\":\"little\"}],[\"bill_depth_mm\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAACAMkBmZmZmZuYwQAAAAAAAgDNAzczMzMxMMkAAAAAAAAAyQJqZmZmZGTNAZmZmZmZmMkBmZmZmZmYyQJqZmZmZGTJAAAAAAAAAMkBmZmZmZuYwQDMzMzMzMzFAAAAAAAAAM0DNzMzMzMwxQAAAAAAAgDJAmpmZmZkZM0AzMzMzMzM0QDMzMzMzMzFAzczMzMzMMkDNzMzMzEwxQAAAAAAAADFAmpmZmZkZMkCamZmZmRkxQJqZmZmZmTJAzczMzMxMMkDNzMzMzMwzQM3MzMzMzDFAAAAAAACAMEDNzMzMzMwxQJqZmZmZmTBAAAAAAACAM0AAAAAAAIA1QAAAAAAAADNAmpmZmZkZM0AzMzMzMzMyQAAAAAAAADNAzczMzMzMMEAAAAAAAAAxQM3MzMzMTDNAAAAAAAAAM0BmZmZmZuYxQAAAAAAAgDBAmpmZmZmZMEDNzMzMzMwwQAAAAAAAgDJAAAAAAAAAMkAAAAAAAAAxQM3MzMzMTDFAmpmZmZkZMUAzMzMzM7M0QJqZmZmZGTFAZmZmZmbmMUAAAAAAAIA0QAAAAAAAADJAZmZmZmbmMkCamZmZmRkyQJqZmZmZGTBAzczMzMzMMkAzMzMzM7MyQJqZmZmZGTJAmpmZmZkZMUCamZmZmZkxQAAAAAAAgDJAmpmZmZmZMkBmZmZmZuYyQGZmZmZm5jFAZmZmZmbmMkDNzMzMzMwvQA==\"},\"shape\":[68],\"dtype\":\"float64\",\"order\":\"little\"}],[\"bill_length_mm\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"ZmZmZmZmQkAAAAAAAIBCQAAAAAAAAEVAmpmZmZlZRUCamZmZmdlBQGZmZmZm5kNAZmZmZmZmREDNzMzMzExCQM3MzMzMDEFAZmZmZmYmRECamZmZmdlBQM3MzMzMTEFAzczMzMxMREBmZmZmZqZCQAAAAAAAwEJAzczMzMyMREAAAAAAAABFQJqZmZmZGUJAzczM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6qUAAAAAAAMywQAAAAAAAAKlAAAAAAAA2sEAAAAAAANSnQA==\"},\"shape\":[68],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1180\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1181\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1176\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"bill_length_mm\"},\"y\":{\"type\":\"field\",\"field\":\"flipper_length_mm\"},\"line_color\":{\"type\":\"value\",\"value\":\"#ff7f0e\"},\"fill_color\":{\"type\":\"value\",\"value\":\"#ff7f0e\"},\"hatch_color\":{\"type\":\"value\",\"value\":\"#ff7f0e\"}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1177\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"bill_length_mm\"},\"y\":{\"type\":\"field\",\"field\":\"flipper_length_mm\"},\"line_color\":{\"type\":\"value\",\"value\":\"#ff7f0e\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"fill_color\":{\"type\":\"value\",\"value\":\"#ff7f0e\"},\"fill_alpha\":{\"type\":\"value\",\"value\":0.1},\"hatch_color\":{\"type\":\"value\",\"value\":\"#ff7f0e\"},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.1}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1178\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"bill_length_mm\"},\"y\":{\"type\":\"field\",\"field\":\"flipper_length_mm\"},\"line_color\":{\"type\":\"value\",\"value\":\"#ff7f0e\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"fill_color\":{\"type\":\"value\",\"value\":\"#ff7f0e\"},\"fill_alpha\":{\"type\":\"value\",\"value\":0.2},\"hatch_color\":{\"type\":\"value\",\"value\":\"#ff7f0e\"},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1191\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1182\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1183\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1184\"},\"data\":{\"type\":\"map\",\"entries\":[[\"penguin_id\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAABAAAAARAAAAEgAAABMAAAAUAAAAFQAAABYAAAAXAAAAGAAAABkAAAAaAAAAGwAAABwAAAAdAAAAHgAAAB8AAAAgAAAAIQAAACIAAAAjAAAAJAAAACUAAAAmAAAAJwAAACgAAAApAAAAKgAAACsAAAAsAAAALQAAAC4AAAAvAAAAMAAAADEAAAAyAAAAMwAAADQAAAA1AAAANgAAADcAAAA4AAAAOQAAADoAAAA7AAAAPAAAAD0AAAA+AAAAPwAAAEAAAABBAAAAQgAAAEMAAAA=\"},\"shape\":[68],\"dtype\":\"int32\",\"order\":\"little\"}],[\"species\",{\"type\":\"ndarray\",\"array\":[\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\",\"Chinstrap\"],\"shape\":[68],\"dtype\":\"object\",\"order\":\"little\"}],[\"bill_depth_mm\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"zczMzMxMMkAzMzMzM7MwQJqZmZmZmTBAAAAAAAAANEAzMzMzM7MyQDMzMzMzMzJAAAAAAACAMUAzMzMzMzMyQAAAAAAAADNAAAAAAACAM0CamZmZmRkyQDMzMzMzszRAZmZmZmZmM0DNzMzMzEwxQJqZmZmZmTBAAAAAAAAAMUAzMzMzMzMzQGZmZmZm5jNAzczMzMzMMkAzMzMzMzMyQGZmZmZmZjNAzczMzMxMMUDNzMzMzEw0QM3MzMzMzDFAZmZmZmbmM0DNzMzMzEwxQM3MzMzMzDFAMzMzMzOzM0AAAAAAAAAzQAAAAAAAgDJAAAAAAACAMUDNzMzMzEwxQJqZmZmZGTNAZmZmZmbmMUCamZmZmZkzQM3MzMzMzDFAAAAAAACAM0BmZmZmZuYxQJqZmZmZmTNAZmZmZmbmMUBmZmZmZuYzQM3MzMzMzDJAzczMzMxMMUCamZmZmZkwQAAAAAAAADRAAAAAAACAMEAzMzMzM7MyQM3MzMzMzDFAmpmZmZkZMUCamZmZmZkwQM3MzMzMzDNAZmZmZmZmMEDNzMzMzMwwQJqZmZmZmTJAMzMzMzOzMkCamZmZmRkyQJqZmZmZmTJAAAAAAACAM0DNzMzMzMw0QAAAAAAAADNAzczMzMzMM0AAAAAAAAAxQGZmZmZm5jFAzczMzMzMMkAAAAAAAAAzQGZmZmZmZjJAMzMzMzMzMkBmZmZmZuYyQA==\"},\"shape\":[68],\"dtype\":\"float64\",\"order\":\"little\"}],[\"bill_length_mm\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"zczMzMzMR0AAAAAAAEBFQDMzMzMzc0RAZmZmZmZmSkAzMzMzM7NGQM3MzMzMzEhAAAAAAABASECamZmZmZlIQGZmZmZmZklAMzMzMzPzSUAAAAAAAABKQAAAAAAAAEpAzczMzMzMRkCamZmZmdlGQDMzMzMzc0dAmpmZmZnZRkBmZmZmZqZJQGZmZmZmpkhAmpmZmZkZSUBmZmZmZqZJQM3MzMzMTElAAAAAAABARUCamZmZmdlJQM3MzMzMTEdAAAAAAADASkBmZmZmZuZIQAAAAAAAAE1AmpmZmZlZSUAAAAAAAABKQGZmZmZmZklAmpmZmZkZR0AzMzMzMzNFQDMzMzMzc0lAmpmZmZlZR0AAAAAAAIBIQJqZmZmZmUZAAAAAAACASEAAAAAAAEBHQAAAAAAAQElAzczMzMwMSUBmZmZmZqZJQJqZmZmZGUpAAAAAAACAR0CamZmZmZlGQGZmZmZmJklAZmZmZmZmR0AAAAAAAMBJQDMzMzMzM0dAMzMzMzPzRkCamZmZmZlFQJqZmZmZWUpAzczMzMwMSEAAAAAAAMBHQDMzMzMzM0dAmpmZmZkZSUAAAAAAAMBFQJqZmZmZ2UhAAAAAAAAASUCamZmZmRlLQAAAAAAAwEhAZmZmZmbmS0AAAAAAAMBGQDMzMzMzc0lAAAAAAACASUAzMzMzM7NJQAAAAAAAQElAzczMzMwMR0AAAAAAAABHQA==\"},\"shape\":[68],\"dtype\":\"float64\",\"order\":\"little\"}],[\"flipper_length_mm\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"A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AAAAAsK1AAAAAAACUsUAAAAAAALasQAAAAAAA6KxAAAAAAACkr0AAAAAAADawQAAAAAAAYrFAAAAAAACErEAAAAAAACCsQAAAAAAAvKtAAAAAAADIqUAAAAAAAMywQAAAAAAA3K5AAAAAAADcrkAAAAAAAFirQAAAAAAApK9AAAAAAACQqkAAAAAAAOisQAAAAAAA9KpAAAAAAADorEAAAAAAAGSpQAAAAAAAyKlAAAAAAACErEAAAAAAAGSpQAAAAAAA6KxAAAAAAADuq0AAAAAAAKimQAAAAAAAGq1AAAAAAAD6qUAAAAAAAHiuQAAAAAAA9KpAAAAAAAB+rUAAAAAAAJCqQAAAAAAAIKxAAAAAAAB4rkAAAAAAAMywQAAAAAAAsK1AAAAAAABAr0AAAAAAAFirQAAAAAAAtqxAAAAAAAAEsEAAAAAAANyuQAAAAAAAkKpAAAAAAABkqUAAAAAAADawQA==\"},\"shape\":[68],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1192\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1193\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1188\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"bill_length_mm\"},\"y\":{\"type\":\"field\",\"field\":\"flipper_length_mm\"},\"line_color\":{\"type\":\"value\",\"value\":\"#2ca02c\"},\"fill_color\":{\"type\":\"value\",\"value\":\"#2ca02c\"},\"hatch_color\":{\"type\":\"value\",\"value\":\"#2ca02c\"}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1189\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"bill_length_mm\"},\"y\":{\"type\":\"field\",\"field\":\"flipper_length_mm\"},\"line_color\":{\"type\":\"value\",\"value\":\"#2ca02c\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"fill_color\":{\"type\":\"value\",\"value\":\"#2ca02c\"},\"fill_alpha\":{\"type\":\"value\",\"value\":0.1},\"hatch_color\":{\"type\":\"value\",\"value\":\"#2ca02c\"},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.1}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1190\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"bill_length_mm\"},\"y\":{\"type\":\"field\",\"field\":\"flipper_length_mm\"},\"line_color\":{\"type\":\"value\",\"value\":\"#2ca02c\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"fill_color\":{\"type\":\"value\",\"value\":\"#2ca02c\"},\"fill_alpha\":{\"type\":\"value\",\"value\":0.2},\"hatch_color\":{\"type\":\"value\",\"value\":\"#2ca02c\"},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.2}}}}}],\"toolbar\":{\"type\":\"object\",\"name\":\"Toolbar\",\"id\":\"p1133\",\"attributes\":{\"tools\":[{\"type\":\"object\",\"name\":\"PanTool\",\"id\":\"p1146\"},{\"type\":\"object\",\"name\":\"WheelZoomTool\",\"id\":\"p1147\",\"attributes\":{\"renderers\":\"auto\"}},{\"type\":\"object\",\"name\":\"BoxZoomTool\",\"id\":\"p1148\",\"attributes\":{\"overlay\":{\"type\":\"object\",\"name\":\"BoxAnnotation\",\"id\":\"p1149\",\"attributes\":{\"syncable\":false,\"level\":\"overlay\",\"visible\":false,\"left\":{\"type\":\"number\",\"value\":\"nan\"},\"right\":{\"type\":\"number\",\"value\":\"nan\"},\"top\":{\"type\":\"number\",\"value\":\"nan\"},\"bottom\":{\"type\":\"number\",\"value\":\"nan\"},\"left_units\":\"canvas\",\"right_units\":\"canvas\",\"top_units\":\"canvas\",\"bottom_units\":\"canvas\",\"line_color\":\"black\",\"line_alpha\":1.0,\"line_width\":2,\"line_dash\":[4,4],\"fill_color\":\"lightgrey\",\"fill_alpha\":0.5}}}},{\"type\":\"object\",\"name\":\"SaveTool\",\"id\":\"p1154\"},{\"type\":\"object\",\"name\":\"ResetTool\",\"id\":\"p1155\"},{\"type\":\"object\",\"name\":\"HelpTool\",\"id\":\"p1156\"},{\"type\":\"object\",\"name\":\"HoverTool\",\"id\":\"p1157\",\"attributes\":{\"renderers\":\"auto\",\"tooltips\":[[\"bill depth\",\"@bill_depth_mm\"],[\"body mass\",\"@body_mass_g\"]]}}]}},\"toolbar_location\":\"above\",\"left\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1141\",\"attributes\":{\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1142\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1143\"},\"axis_label\":\"flipper length (mm)\",\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1144\"}}}],\"right\":[{\"type\":\"object\",\"name\":\"Legend\",\"id\":\"p1194\",\"attributes\":{\"location\":\"center\",\"click_policy\":\"hide\",\"items\":[{\"type\":\"object\",\"name\":\"LegendItem\",\"id\":\"p1195\",\"attributes\":{\"label\":{\"type\":\"value\",\"value\":\"Gentoo\"},\"renderers\":[{\"id\":\"p1167\"}]}},{\"type\":\"object\",\"name\":\"LegendItem\",\"id\":\"p1196\",\"attributes\":{\"label\":{\"type\":\"value\",\"value\":\"Adelie\"},\"renderers\":[{\"id\":\"p1179\"}]}},{\"type\":\"object\",\"name\":\"LegendItem\",\"id\":\"p1197\",\"attributes\":{\"label\":{\"type\":\"value\",\"value\":\"Chinstrap\"},\"renderers\":[{\"id\":\"p1191\"}]}}]}}],\"below\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1136\",\"attributes\":{\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1137\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1138\"},\"axis_label\":\"bill length (mm)\",\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1139\"}}}],\"center\":[{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1140\",\"attributes\":{\"axis\":{\"id\":\"p1136\"}}},{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1145\",\"attributes\":{\"dimension\":1,\"axis\":{\"id\":\"p1141\"}}}],\"frame_width\":300,\"frame_height\":300}}],\"defs\":[{\"type\":\"model\",\"name\":\"ReactiveHTML1\"},{\"type\":\"model\",\"name\":\"FlexBox1\",\"properties\":[{\"name\":\"align_content\",\"kind\":\"Any\",\"default\":\"flex-start\"},{\"name\":\"align_items\",\"kind\":\"Any\",\"default\":\"flex-start\"},{\"name\":\"flex_direction\",\"kind\":\"Any\",\"default\":\"row\"},{\"name\":\"flex_wrap\",\"kind\":\"Any\",\"default\":\"wrap\"},{\"name\":\"gap\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"justify_content\",\"kind\":\"Any\",\"default\":\"flex-start\"}]},{\"type\":\"model\",\"name\":\"FloatPanel1\",\"properties\":[{\"name\":\"config\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"contained\",\"kind\":\"Any\",\"default\":true},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"right-top\"},{\"name\":\"offsetx\",\"kind\":\"Any\",\"default\":null},{\"name\":\"offsety\",\"kind\":\"Any\",\"default\":null},{\"name\":\"theme\",\"kind\":\"Any\",\"default\":\"primary\"},{\"name\":\"status\",\"kind\":\"Any\",\"default\":\"normalized\"}]},{\"type\":\"model\",\"name\":\"GridStack1\",\"properties\":[{\"name\":\"mode\",\"kind\":\"Any\",\"default\":\"warn\"},{\"name\":\"ncols\",\"kind\":\"Any\",\"default\":null},{\"name\":\"nrows\",\"kind\":\"Any\",\"default\":null},{\"name\":\"allow_resize\",\"kind\":\"Any\",\"default\":true},{\"name\":\"allow_drag\",\"kind\":\"Any\",\"default\":true},{\"name\":\"state\",\"kind\":\"Any\",\"default\":[]}]},{\"type\":\"model\",\"name\":\"drag1\",\"properties\":[{\"name\":\"slider_width\",\"kind\":\"Any\",\"default\":5},{\"name\":\"slider_color\",\"kind\":\"Any\",\"default\":\"black\"},{\"name\":\"value\",\"kind\":\"Any\",\"default\":50}]},{\"type\":\"model\",\"name\":\"click1\",\"properties\":[{\"name\":\"terminal_output\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"debug_name\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"clears\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"FastWrapper1\",\"properties\":[{\"name\":\"object\",\"kind\":\"Any\",\"default\":null},{\"name\":\"style\",\"kind\":\"Any\",\"default\":null}]},{\"type\":\"model\",\"name\":\"NotificationAreaBase1\",\"properties\":[{\"name\":\"js_events\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"bottom-right\"},{\"name\":\"_clear\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"NotificationArea1\",\"properties\":[{\"name\":\"js_events\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"notifications\",\"kind\":\"Any\",\"default\":[]},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"bottom-right\"},{\"name\":\"_clear\",\"kind\":\"Any\",\"default\":0},{\"name\":\"types\",\"kind\":\"Any\",\"default\":[{\"type\":\"map\",\"entries\":[[\"type\",\"warning\"],[\"background\",\"#ffc107\"],[\"icon\",{\"type\":\"map\",\"entries\":[[\"className\",\"fas fa-exclamation-triangle\"],[\"tagName\",\"i\"],[\"color\",\"white\"]]}]]},{\"type\":\"map\",\"entries\":[[\"type\",\"info\"],[\"background\",\"#007bff\"],[\"icon\",{\"type\":\"map\",\"entries\":[[\"className\",\"fas fa-info-circle\"],[\"tagName\",\"i\"],[\"color\",\"white\"]]}]]}]}]},{\"type\":\"model\",\"name\":\"Notification\",\"properties\":[{\"name\":\"background\",\"kind\":\"Any\",\"default\":null},{\"name\":\"duration\",\"kind\":\"Any\",\"default\":3000},{\"name\":\"icon\",\"kind\":\"Any\",\"default\":null},{\"name\":\"message\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"notification_type\",\"kind\":\"Any\",\"default\":null},{\"name\":\"_destroyed\",\"kind\":\"Any\",\"default\":false}]},{\"type\":\"model\",\"name\":\"TemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"BootstrapTemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"TemplateEditor1\",\"properties\":[{\"name\":\"layout\",\"kind\":\"Any\",\"default\":[]}]},{\"type\":\"model\",\"name\":\"MaterialTemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"copy_to_clipboard1\",\"properties\":[{\"name\":\"fill\",\"kind\":\"Any\",\"default\":\"none\"},{\"name\":\"value\",\"kind\":\"Any\",\"default\":null}]}]}};\n", " const render_items = [{\"docid\":\"118611e7-2d72-4170-826a-557c937b8f9b\",\"roots\":{\"p1125\":\"a3f36a49-0617-42f6-a197-c6da5dd23a6c\"},\"root_ids\":[\"p1125\"]}];\n", " void root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", " }\n", " if (root.Bokeh !== undefined) {\n", " embed_document(root);\n", " } else {\n", " let attempts = 0;\n", " const 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": { "application/vnd.bokehjs_exec.v0+json": { "id": "p1125" } }, "output_type": "display_data" } ], "source": [ "# Create figure\n", "p = bokeh.plotting.figure(\n", " frame_width=300,\n", " frame_height=300,\n", " x_axis_label=\"bill length (mm)\",\n", " y_axis_label=\"flipper length (mm)\",\n", " toolbar_location=\"above\",\n", " tooltips=[('bill depth', '@bill_depth_mm'), ('body mass', '@body_mass_g')]\n", ")\n", "\n", "# Build legend as we populate glyphs\n", "legend_items = []\n", "for color, ((species,), sub_df) in zip(bokeh.palettes.Category10_3, df.group_by(\"species\")):\n", " glyph = p.scatter(\n", " source=sub_df.to_dict(), x=\"bill_length_mm\", y=\"flipper_length_mm\", color=color\n", " )\n", " legend_items.append((species, [glyph]))\n", "\n", "# Place legend\n", "legend = bokeh.models.Legend(items=legend_items, location=\"center\")\n", "p.add_layout(legend, \"right\")\n", "p.legend.click_policy = \"hide\"\n", "\n", "bokeh.io.show(p)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## An important note about tidiness\n", "\n", "It is important to note that there is more than one way to make a data set tidy. In the example of the Palmer penguin data set, we saw two legitimate ways of making the data frame tidy. In our preferred wide version, each row corresponded to a measurement of a single _penguin_, which had several variables associated with it. In the tall version, each row corresponded to a single _feature_ of a penguin.\n", "\n", "To demonstrate that the tall version is workable, but more cumbersome, we can make the same plots as above. First, we'll unpivot the data frame to make it tall. We needs to specify which columns as index columns for the unpivot because we want the `'penguin_id'` and `'species'` columns to remain in the tall data frame (which we did not have to do in the previous lesson)." ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "shape: (5, 4)
penguin_idspeciesvariablevalue
i64strstrf64
0"Gentoo""bill_depth_mm"16.3
0"Adelie""bill_depth_mm"18.5
0"Chinstrap""bill_depth_mm"18.3
1"Gentoo""bill_depth_mm"15.8
1"Adelie""bill_depth_mm"16.9
" ], "text/plain": [ "shape: (5, 4)\n", "┌────────────┬───────────┬───────────────┬───────┐\n", "│ penguin_id ┆ species ┆ variable ┆ value │\n", "│ --- ┆ --- ┆ --- ┆ --- │\n", "│ i64 ┆ str ┆ str ┆ f64 │\n", "╞════════════╪═══════════╪═══════════════╪═══════╡\n", "│ 0 ┆ Gentoo ┆ bill_depth_mm ┆ 16.3 │\n", "│ 0 ┆ Adelie ┆ bill_depth_mm ┆ 18.5 │\n", "│ 0 ┆ Chinstrap ┆ bill_depth_mm ┆ 18.3 │\n", "│ 1 ┆ Gentoo ┆ bill_depth_mm ┆ 15.8 │\n", "│ 1 ┆ Adelie ┆ bill_depth_mm ┆ 16.9 │\n", "└────────────┴───────────┴───────────────┴───────┘" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = df.unpivot(index=[\"penguin_id\", \"species\"])\n", "\n", "df.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Plotting the ECDFs is not really a problem with this form of the data frame. We just need to use a filter context to pull out the bill length rows." ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "(function(root) {\n", " function embed_document(root) {\n", " const docs_json = {\"104b9755-411b-498e-9f73-5125a59b58ed\":{\"version\":\"3.4.1\",\"title\":\"Bokeh Application\",\"roots\":[{\"type\":\"object\",\"name\":\"Figure\",\"id\":\"p1213\",\"attributes\":{\"x_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1214\"},\"y_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1215\"},\"x_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1222\"},\"y_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1223\"},\"title\":{\"type\":\"object\",\"name\":\"Title\",\"id\":\"p1220\"},\"renderers\":[{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1251\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1245\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1246\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1247\"},\"data\":{\"type\":\"map\",\"entries\":[[\"x\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"MzMzMzNzREAzMzMzM3NEQM3MzMzMTEVAzczMzMxMRUCamZmZmVlFQJqZmZmZWUVAZmZmZmZmRUBmZmZmZmZFQDMzMzMzc0VAMzMzMzNzRUCamZmZmZlFQJqZmZmZmUVAZmZmZmamRUBmZmZmZqZFQAAAAAAAwEVAAAAAAADARUAAAAAAAABGQAAAAAAAAEZAMzMzMzMzRkAzMzMzMzNGQAAAAAAAQEZAAAAAAABARkAAAAAAAEBGQAAAAAAAQEZAAAAAAABARkAAAAAAAEBGQDMzMzMzc0ZAMzMzMzNzRkCamZmZmZlGQJqZmZmZmUZAmpmZmZmZRkCamZmZmZlGQJqZmZmZmUZAmpmZmZmZRkBmZmZmZqZGQGZmZmZmpkZAAAAAAADARkAAAAAAAMBGQAAAAAAAwEZAAAAAAADARkAAAAAAAMBGQAAAAAAAwEZAmpmZmZnZRkCamZmZmdlGQGZmZmZm5kZAZmZmZmbmRkDNzMzMzAxHQM3MzMzMDEdAzczMzMwMR0DNzMzMzAxHQJqZmZmZGUdAmpmZmZkZR0CamZmZmRlHQJqZmZmZGUdAZmZmZmYmR0BmZmZmZiZHQDMzMzMzM0dAMzMzMzMzR0AAAAAAAEBHQAAAAAAAQEdAAAAAAABAR0AAAAAAAEBHQAAAAAAAQEdAAAAAAABAR0DNzMzMzExHQM3MzMzMTEdAZmZmZmZmR0BmZmZmZmZHQGZmZmZmZkdAZmZmZmZmR0CamZmZmZlHQJqZmZmZmUdAAAAAAADAR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pqWlpaWl7T8eHh4eHh7uPx4eHh4eHu4/l5aWlpaW7j+XlpaWlpbuPw8PDw8PD+8/Dw8PDw8P7z+Ih4eHh4fvP4iHh4eHh+8/AAAAAAAA8D8=\"},\"shape\":[136],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1252\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1253\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"p1248\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":\"#1f77b3\",\"line_width\":2}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"p1249\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":\"#1f77b3\",\"line_alpha\":0.1,\"line_width\":2}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"p1250\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":\"#1f77b3\",\"line_alpha\":0.2,\"line_width\":2}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1260\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1254\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1255\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1256\"},\"data\":{\"type\":\"map\"}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1261\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1262\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1257\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":40.9},\"y\":{\"type\":\"value\",\"value\":0},\"angle\":{\"type\":\"value\",\"value\":3.141592653589793},\"line_color\":{\"type\":\"value\",\"value\":\"#1f77b3\"},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1258\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":40.9},\"y\":{\"type\":\"value\",\"value\":0},\"angle\":{\"type\":\"value\",\"value\":3.141592653589793},\"line_color\":{\"type\":\"value\",\"value\":\"#1f77b3\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1259\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":40.9},\"y\":{\"type\":\"value\",\"value\":0},\"angle\":{\"type\":\"value\",\"value\":3.141592653589793},\"line_color\":{\"type\":\"value\",\"value\":\"#1f77b3\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"line_width\":{\"type\":\"value\",\"value\":2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1269\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1263\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1264\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1265\"},\"data\":{\"type\":\"map\"}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1270\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1271\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1266\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":55.9},\"y\":{\"type\":\"value\",\"value\":1},\"line_color\":{\"type\":\"value\",\"value\":\"#1f77b3\"},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1267\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":55.9},\"y\":{\"type\":\"value\",\"value\":1},\"line_color\":{\"type\":\"value\",\"value\":\"#1f77b3\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1268\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":55.9},\"y\":{\"type\":\"value\",\"value\":1},\"line_color\":{\"type\":\"value\",\"value\":\"#1f77b3\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"line_width\":{\"type\":\"value\",\"value\":2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1278\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1272\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1273\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1274\"},\"data\":{\"type\":\"map\",\"entries\":[[\"x\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAADAQEAAAAAAAMBAQAAAAAAAAEFAAAAAAAAAQUDNzMzMzAxBQM3MzMzMDEFAAAAAAABAQUAAAAAAAEBBQM3MzMzMTEFAzczMzMxMQUAAAAAAAIBBQAAAAAAAgEFAmpmZmZmZQUCamZmZmZlBQJqZmZmZ2UFAmpmZmZnZQUCamZmZmdlBQJqZmZmZ2UFAMzMzMzPzQUAzMzMzM/NBQAAAAAAAAEJAAAAAAAAAQkAAAAAAAABCQAAAAAAAAEJAmpmZmZkZQ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uI/WlpaWlpa4j/T0tLS0tLiP9PS0tLS0uI/S0tLS0tL4z9LS0tLS0vjP8TDw8PDw+M/xMPDw8PD4z88PDw8PDzkPzw8PDw8POQ/tbS0tLS05D+1tLS0tLTkPy0tLS0tLeU/LS0tLS0t5T+mpaWlpaXlP6alpaWlpeU/Hh4eHh4e5j8eHh4eHh7mP5eWlpaWluY/l5aWlpaW5j8PDw8PDw/nPw8PDw8PD+c/iIeHh4eH5z+Ih4eHh4fnPwAAAAAAAOg/AAAAAAAA6D94eHh4eHjoP3h4eHh4eOg/8fDw8PDw6D/x8PDw8PDoP2lpaWlpaek/aWlpaWlp6T/i4eHh4eHpP+Lh4eHh4ek/WlpaWlpa6j9aWlpaWlrqP9PS0tLS0uo/09LS0tLS6j9LS0tLS0vrP0tLS0tLS+s/xMPDw8PD6z/Ew8PDw8PrPzw8PDw8POw/PDw8PDw87D+1tLS0tLTsP7W0tLS0tOw/LS0tLS0t7T8tLS0tLS3tP6alpaWlpe0/pqWlpaWl7T8eHh4eHh7uPx4eHh4eHu4/l5aWlpaW7j+XlpaWlpbuPw8PDw8PD+8/Dw8PDw8P7z+Ih4eHh4fvP4iHh4eHh+8/AAAAAAAA8D8=\"},\"shape\":[136],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1279\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1280\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"p1275\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":\"#ff7e0e\",\"line_width\":2}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"p1276\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":\"#ff7e0e\",\"line_alpha\":0.1,\"line_width\":2}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"p1277\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":\"#ff7e0e\",\"line_alpha\":0.2,\"line_width\":2}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1287\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1281\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1282\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1283\"},\"data\":{\"type\":\"map\"}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1288\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1289\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1284\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":33.5},\"y\":{\"type\":\"value\",\"value\":0},\"angle\":{\"type\":\"value\",\"value\":3.141592653589793},\"line_color\":{\"type\":\"value\",\"value\":\"#ff7e0e\"},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1285\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":33.5},\"y\":{\"type\":\"value\",\"value\":0},\"angle\":{\"type\":\"value\",\"value\":3.141592653589793},\"line_color\":{\"type\":\"value\",\"value\":\"#ff7e0e\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1286\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":33.5},\"y\":{\"type\":\"value\",\"value\":0},\"angle\":{\"type\":\"value\",\"value\":3.141592653589793},\"line_color\":{\"type\":\"value\",\"value\":\"#ff7e0e\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"line_width\":{\"type\":\"value\",\"value\":2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1296\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1290\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1291\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1292\"},\"data\":{\"type\":\"map\"}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1297\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1298\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1293\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":46.0},\"y\":{\"type\":\"value\",\"value\":1},\"line_color\":{\"type\":\"value\",\"value\":\"#ff7e0e\"},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1294\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":46.0},\"y\":{\"type\":\"value\",\"value\":1},\"line_color\":{\"type\":\"value\",\"value\":\"#ff7e0e\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1295\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":46.0},\"y\":{\"type\":\"value\",\"value\":1},\"line_color\":{\"type\":\"value\",\"value\":\"#ff7e0e\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"line_width\":{\"type\":\"value\",\"value\":2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1305\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1299\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1300\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1301\"},\"data\":{\"type\":\"map\",\"entries\":[[\"x\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"MzMzMzNzREAzMzMzM3NEQDMzMzMzM0VAMzMzMzMzRUAAAAAAAEBFQAAAAAAAQEVAAAAAAABARUAAAAAAAEBFQJqZmZmZmUVAmpmZmZmZRUAAAAAAAMBFQAAAAAAAwEVAmpmZmZmZRkCamZmZmZlGQJqZmZmZmUZAmpmZmZmZRkAzMzMzM7NGQDMzMzMzs0ZAAAAAAADARkAAAAAAAMBGQM3MzMzMzEZAzczMzMzMRkCamZmZmdlGQJqZmZmZ2UZAmpmZmZnZRkCamZmZmdlGQDMzMzMz80ZAMzMzMzPzRkAAAAAAAABHQAAAAAAAAEdAzczMzMwMR0DNzMzMzAxHQJqZmZmZGUdAmpmZmZkZR0AzMzMzMzNHQDMzMzMzM0dAMzMzMzMzR0AzMzMzMzNHQAAAAAAAQEdAAAAAAABAR0DNzMzMzExHQM3MzMzMTEdAmpmZmZlZR0CamZmZmVlHQGZmZmZmZkdAZmZmZmZmR0AzMzMzM3NHQDMzMzMzc0dAAAAAAACAR0AAAAAAAIBHQAAAAAAAwEdAAAAAAADAR0DNzMzMzMxHQM3MzMzMzEdAzczMzMwMSEDNzMzMzAxIQAAAAAAAQEhAAAAAAABASEAAAAAAAIBIQAAAAAAAgEhAAAAAAACASEAAAAAAAIBIQJqZmZmZmUhAmpmZmZmZSEBmZmZmZqZIQGZmZmZmpkhAAAAAAADASEAAAAAAAMBIQM3MzMzMzEhAzczMzMzMSECamZmZmdlIQJqZmZmZ2UhAZmZmZmbmSEBmZmZmZuZIQA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eHh4eHh7uPx4eHh4eHu4/l5aWlpaW7j+XlpaWlpbuPw8PDw8PD+8/Dw8PDw8P7z+Ih4eHh4fvP4iHh4eHh+8/AAAAAAAA8D8=\"},\"shape\":[136],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1306\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1307\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"p1302\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":\"#2ba02b\",\"line_width\":2}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"p1303\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":\"#2ba02b\",\"line_alpha\":0.1,\"line_width\":2}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Line\",\"id\":\"p1304\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":\"#2ba02b\",\"line_alpha\":0.2,\"line_width\":2}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1314\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1308\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1309\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1310\"},\"data\":{\"type\":\"map\"}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1315\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1316\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1311\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":40.9},\"y\":{\"type\":\"value\",\"value\":0},\"angle\":{\"type\":\"value\",\"value\":3.141592653589793},\"line_color\":{\"type\":\"value\",\"value\":\"#2ba02b\"},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1312\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":40.9},\"y\":{\"type\":\"value\",\"value\":0},\"angle\":{\"type\":\"value\",\"value\":3.141592653589793},\"line_color\":{\"type\":\"value\",\"value\":\"#2ba02b\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1313\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":40.9},\"y\":{\"type\":\"value\",\"value\":0},\"angle\":{\"type\":\"value\",\"value\":3.141592653589793},\"line_color\":{\"type\":\"value\",\"value\":\"#2ba02b\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"line_width\":{\"type\":\"value\",\"value\":2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1323\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1317\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1318\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1319\"},\"data\":{\"type\":\"map\"}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1324\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1325\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1320\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":58.0},\"y\":{\"type\":\"value\",\"value\":1},\"line_color\":{\"type\":\"value\",\"value\":\"#2ba02b\"},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1321\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":58.0},\"y\":{\"type\":\"value\",\"value\":1},\"line_color\":{\"type\":\"value\",\"value\":\"#2ba02b\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"line_width\":{\"type\":\"value\",\"value\":2}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Ray\",\"id\":\"p1322\",\"attributes\":{\"x\":{\"type\":\"value\",\"value\":58.0},\"y\":{\"type\":\"value\",\"value\":1},\"line_color\":{\"type\":\"value\",\"value\":\"#2ba02b\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"line_width\":{\"type\":\"value\",\"value\":2}}}}}],\"toolbar\":{\"type\":\"object\",\"name\":\"Toolbar\",\"id\":\"p1221\",\"attributes\":{\"tools\":[{\"type\":\"object\",\"name\":\"PanTool\",\"id\":\"p1234\"},{\"type\":\"object\",\"name\":\"WheelZoomTool\",\"id\":\"p1235\",\"attributes\":{\"renderers\":\"auto\"}},{\"type\":\"object\",\"name\":\"BoxZoomTool\",\"id\":\"p1236\",\"attributes\":{\"overlay\":{\"type\":\"object\",\"name\":\"BoxAnnotation\",\"id\":\"p1237\",\"attributes\":{\"syncable\":false,\"level\":\"overlay\",\"visible\":false,\"left\":{\"type\":\"number\",\"value\":\"nan\"},\"right\":{\"type\":\"number\",\"value\":\"nan\"},\"top\":{\"type\":\"number\",\"value\":\"nan\"},\"bottom\":{\"type\":\"number\",\"value\":\"nan\"},\"left_units\":\"canvas\",\"right_units\":\"canvas\",\"top_units\":\"canvas\",\"bottom_units\":\"canvas\",\"line_color\":\"black\",\"line_alpha\":1.0,\"line_width\":2,\"line_dash\":[4,4],\"fill_color\":\"lightgrey\",\"fill_alpha\":0.5}}}},{\"type\":\"object\",\"name\":\"SaveTool\",\"id\":\"p1242\"},{\"type\":\"object\",\"name\":\"ResetTool\",\"id\":\"p1243\"},{\"type\":\"object\",\"name\":\"HelpTool\",\"id\":\"p1244\"}]}},\"toolbar_location\":\"above\",\"left\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1229\",\"attributes\":{\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1230\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1231\"},\"axis_label\":\"ECDF\",\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1232\"}}}],\"right\":[{\"type\":\"object\",\"name\":\"Legend\",\"id\":\"p1326\",\"attributes\":{\"location\":\"center\",\"click_policy\":\"hide\",\"items\":[{\"type\":\"object\",\"name\":\"LegendItem\",\"id\":\"p1327\",\"attributes\":{\"label\":{\"type\":\"value\",\"value\":\"Gentoo\"},\"renderers\":[{\"id\":\"p1251\"},{\"id\":\"p1269\"},{\"id\":\"p1260\"}]}},{\"type\":\"object\",\"name\":\"LegendItem\",\"id\":\"p1328\",\"attributes\":{\"label\":{\"type\":\"value\",\"value\":\"Adelie\"},\"renderers\":[{\"id\":\"p1278\"},{\"id\":\"p1296\"},{\"id\":\"p1287\"}]}},{\"type\":\"object\",\"name\":\"LegendItem\",\"id\":\"p1329\",\"attributes\":{\"label\":{\"type\":\"value\",\"value\":\"Chinstrap\"},\"renderers\":[{\"id\":\"p1305\"},{\"id\":\"p1323\"},{\"id\":\"p1314\"}]}}]}}],\"below\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1224\",\"attributes\":{\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1225\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1226\"},\"axis_label\":\"bill length (mm)\",\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1227\"}}}],\"center\":[{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1228\",\"attributes\":{\"axis\":{\"id\":\"p1224\"}}},{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1233\",\"attributes\":{\"dimension\":1,\"axis\":{\"id\":\"p1229\"}}}],\"frame_width\":400,\"frame_height\":275}}],\"defs\":[{\"type\":\"model\",\"name\":\"ReactiveHTML1\"},{\"type\":\"model\",\"name\":\"FlexBox1\",\"properties\":[{\"name\":\"align_content\",\"kind\":\"Any\",\"default\":\"flex-start\"},{\"name\":\"align_items\",\"kind\":\"Any\",\"default\":\"flex-start\"},{\"name\":\"flex_direction\",\"kind\":\"Any\",\"default\":\"row\"},{\"name\":\"flex_wrap\",\"kind\":\"Any\",\"default\":\"wrap\"},{\"name\":\"gap\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"justify_content\",\"kind\":\"Any\",\"default\":\"flex-start\"}]},{\"type\":\"model\",\"name\":\"FloatPanel1\",\"properties\":[{\"name\":\"config\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"contained\",\"kind\":\"Any\",\"default\":true},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"right-top\"},{\"name\":\"offsetx\",\"kind\":\"Any\",\"default\":null},{\"name\":\"offsety\",\"kind\":\"Any\",\"default\":null},{\"name\":\"theme\",\"kind\":\"Any\",\"default\":\"primary\"},{\"name\":\"status\",\"kind\":\"Any\",\"default\":\"normalized\"}]},{\"type\":\"model\",\"name\":\"GridStack1\",\"properties\":[{\"name\":\"mode\",\"kind\":\"Any\",\"default\":\"warn\"},{\"name\":\"ncols\",\"kind\":\"Any\",\"default\":null},{\"name\":\"nrows\",\"kind\":\"Any\",\"default\":null},{\"name\":\"allow_resize\",\"kind\":\"Any\",\"default\":true},{\"name\":\"allow_drag\",\"kind\":\"Any\",\"default\":true},{\"name\":\"state\",\"kind\":\"Any\",\"default\":[]}]},{\"type\":\"model\",\"name\":\"drag1\",\"properties\":[{\"name\":\"slider_width\",\"kind\":\"Any\",\"default\":5},{\"name\":\"slider_color\",\"kind\":\"Any\",\"default\":\"black\"},{\"name\":\"value\",\"kind\":\"Any\",\"default\":50}]},{\"type\":\"model\",\"name\":\"click1\",\"properties\":[{\"name\":\"terminal_output\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"debug_name\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"clears\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"FastWrapper1\",\"properties\":[{\"name\":\"object\",\"kind\":\"Any\",\"default\":null},{\"name\":\"style\",\"kind\":\"Any\",\"default\":null}]},{\"type\":\"model\",\"name\":\"NotificationAreaBase1\",\"properties\":[{\"name\":\"js_events\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"bottom-right\"},{\"name\":\"_clear\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"NotificationArea1\",\"properties\":[{\"name\":\"js_events\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"notifications\",\"kind\":\"Any\",\"default\":[]},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"bottom-right\"},{\"name\":\"_clear\",\"kind\":\"Any\",\"default\":0},{\"name\":\"types\",\"kind\":\"Any\",\"default\":[{\"type\":\"map\",\"entries\":[[\"type\",\"warning\"],[\"background\",\"#ffc107\"],[\"icon\",{\"type\":\"map\",\"entries\":[[\"className\",\"fas fa-exclamation-triangle\"],[\"tagName\",\"i\"],[\"color\",\"white\"]]}]]},{\"type\":\"map\",\"entries\":[[\"type\",\"info\"],[\"background\",\"#007bff\"],[\"icon\",{\"type\":\"map\",\"entries\":[[\"className\",\"fas fa-info-circle\"],[\"tagName\",\"i\"],[\"color\",\"white\"]]}]]}]}]},{\"type\":\"model\",\"name\":\"Notification\",\"properties\":[{\"name\":\"background\",\"kind\":\"Any\",\"default\":null},{\"name\":\"duration\",\"kind\":\"Any\",\"default\":3000},{\"name\":\"icon\",\"kind\":\"Any\",\"default\":null},{\"name\":\"message\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"notification_type\",\"kind\":\"Any\",\"default\":null},{\"name\":\"_destroyed\",\"kind\":\"Any\",\"default\":false}]},{\"type\":\"model\",\"name\":\"TemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"BootstrapTemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"TemplateEditor1\",\"properties\":[{\"name\":\"layout\",\"kind\":\"Any\",\"default\":[]}]},{\"type\":\"model\",\"name\":\"MaterialTemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"copy_to_clipboard1\",\"properties\":[{\"name\":\"fill\",\"kind\":\"Any\",\"default\":\"none\"},{\"name\":\"value\",\"kind\":\"Any\",\"default\":null}]}]}};\n", " const render_items = [{\"docid\":\"104b9755-411b-498e-9f73-5125a59b58ed\",\"roots\":{\"p1213\":\"c37d44ec-9f25-4e16-83e5-4a57b9d757bc\"},\"root_ids\":[\"p1213\"]}];\n", " void root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", " }\n", " if (root.Bokeh !== undefined) {\n", " embed_document(root);\n", " } else {\n", " let attempts = 0;\n", " const 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": { "application/vnd.bokehjs_exec.v0+json": { "id": "p1213" } }, "output_type": "display_data" } ], "source": [ "bokeh.io.show(\n", " iqplot.ecdf(\n", " data=df.filter(pl.col('variable') == 'bill_length_mm'),\n", " q=\"value\",\n", " cats=\"species\",\n", " frame_width=400,\n", " x_axis_label=\"bill length (mm)\",\n", " )\n", ")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Making the scatter plot, however, is much more difficult and involves a lot of filtering by hand." ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "(function(root) {\n", " function embed_document(root) {\n", " const docs_json = {\"d912903f-dfdb-4f5b-b37d-940ac4ca2252\":{\"version\":\"3.4.1\",\"title\":\"Bokeh Application\",\"roots\":[{\"type\":\"object\",\"name\":\"Figure\",\"id\":\"p1336\",\"attributes\":{\"x_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1337\"},\"y_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1338\"},\"x_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1345\"},\"y_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1346\"},\"title\":{\"type\":\"object\",\"name\":\"Title\",\"id\":\"p1343\"},\"renderers\":[{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1374\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1368\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1369\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1370\"},\"data\":{\"type\":\"map\",\"entries\":[[\"x\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"ZmZmZmZmQkAAAAAAAIBCQAAAAAAAAEVAmpmZmZlZRUCamZmZmdlBQGZmZmZm5kNAZmZmZmZmREDNzMzMzExCQM3MzMzMDEFAZmZmZmYmRECamZmZmdlBQM3MzMzMTEFAzczMzMxMREBmZmZmZqZCQAAAAAAAwEJAzczMzMyMREAAAAAAAABFQJqZmZmZGUJAzczMzMzMQ0CamZmZmRlCQM3MzMzMDENAZmZmZmbmQkBmZmZmZuZCQDMzMzMz80JAAAAAAADARECamZmZmdlCQAAAAAAAwENAzczMzMwMQ0AzMzMzM3NDQDMzMzMz80FAZmZmZmYmQkAAAAAAAABHQM3MzMzMjERAzczMzMzMQkDNzMzMzIxEQJqZmZmZmUVAZmZmZmamQkCamZmZmRlEQJqZmZmZWUJAAAAAAADAQEAAAAAAAIBBQAAAAAAAgEJAAAAAAABAQkAzMzMzM3NEQJqZmZmZmUVAzczMzMwMRkAzMzMzMzNCQGZmZmZm5kJAAAAAAAAAQUDNzMzMzMxDQAAAAAAAAEJAAAAAAAAAQkBmZmZmZqZCQAAAAAAAQEJAAAAAAADAQkCamZmZmZlCQJqZmZmZGUJAMzMzMzNzQ0AAAAAAAIBDQAAAAAAAQEFAMzMzMzMzQkDNzMzMzAxDQGZmZmZmZkVAzczMzMyMREDNzMzMzAxEQAAAAAAAQERAZmZmZmbmRkCamZmZmZlBQA==\"},\"shape\":[68],\"dtype\":\"float64\",\"order\":\"little\"}],[\"y\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAAgaEAAAAAAACBnQAAAAAAAAGlAAAAAAACAaEAAAAAAAEBpQAAAAAAAAGdAAAAAAABgaEAAAAAAAABnQAAAAAAAIGhAAAAAAABgaEAAAAAAACBnQAAAAAAAoGdAAAAAAADgaEAAAAAAAOBnQAAAAAAA4GhAAAAAAACAZ0AAAAAAAMBnQAAAAAAAYGdAAAAAAADAZ0AAAAAAAGBnQAAAAAAAoGZAAAAAAAAgaEAAAAAAAEBnQAAAAAAAgGVAAAAAAABgaEAAAAAAAMBoQAAAAAAAgGdAAAAAAADAaEAAAAAAAKBmQAAAAAAAwGdAAAAAAADAZ0AAAAAAAEBoQAAAAAAAwGZAAAAAAABAaEAAAAAAAABoQAAAAAAAoGhAAAAAAAAAaEAAAAAAAABmQAAAAAAAIGhAAAAAAADAZ0AAAAAAAABoQAAAAAAAIGdAAAAAAACgZkAAAAAAAOBnQAAAAAAAAGhAAAAAAABAakAAAAAAAGBoQAAAAAAAgGZAAAAAAAAgZ0AAAAAAAOBnQAAAAAAAYGdAAAAAAADAZ0AAAAAAAOBoQAAAAAAAwGZAAAAAAABgZkAAAAAAAEBmQAAAAAAAYGdAAAAAAADAZ0AAAAAAACBnQAAAAAAAYGdAAAAAAAAAZ0AAAAAAAGBnQAAAAAAAYGhAAAAAAACgZ0AAAAAAAIBnQAAAAAAAYGdAAAAAAACgaEAAAAAAAEBnQA==\"},\"shape\":[68],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1375\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1376\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1371\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":{\"type\":\"value\",\"value\":\"#1f77b4\"},\"fill_color\":{\"type\":\"value\",\"value\":\"#1f77b4\"},\"hatch_color\":{\"type\":\"value\",\"value\":\"#1f77b4\"}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1372\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":{\"type\":\"value\",\"value\":\"#1f77b4\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"fill_color\":{\"type\":\"value\",\"value\":\"#1f77b4\"},\"fill_alpha\":{\"type\":\"value\",\"value\":0.1},\"hatch_color\":{\"type\":\"value\",\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.1}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1373\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":{\"type\":\"value\",\"value\":\"#1f77b4\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"fill_color\":{\"type\":\"value\",\"value\":\"#1f77b4\"},\"fill_alpha\":{\"type\":\"value\",\"value\":0.2},\"hatch_color\":{\"type\":\"value\",\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1383\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1377\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1378\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1379\"},\"data\":{\"type\":\"map\",\"entries\":[[\"x\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"MzMzMzMzSEBmZmZmZiZHQAAAAAAAwEdAmpmZmZlZSECamZmZmVlIQM3MzMzMzEhAZmZmZmamSECamZmZmZlIQAAAAAAAwEZAZmZmZmZmSEAzMzMzMzNHQM3MzMzMTEhAAAAAAABAR0BmZmZmZmZJQJqZmZmZ2UZAAAAAAAAASUCamZmZmVlFQDMzMzMzc0ZAAAAAAADASECamZmZmZlGQAAAAAAAAElAMzMzMzNzREAzMzMzM7NKQM3MzMzMDElAzczMzMyMSUAAAAAAAIBIQDMzMzMzc0VAAAAAAABASUAAAAAAAABJQAAAAAAA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GpAAAAAAAAAakAAAAAAAGBqQAAAAAAAIGpAAAAAAACgakAAAAAAAIBsQAAAAAAAgGxAAAAAAAAga0AAAAAAAEBrQAAAAAAAoGtAAAAAAACgakAAAAAAAOBqQAAAAAAAgGxAAAAAAAAga0AAAAAAAEBqQA==\"},\"shape\":[68],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1384\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1385\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1380\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":{\"type\":\"value\",\"value\":\"#ff7f0e\"},\"fill_color\":{\"type\":\"value\",\"value\":\"#ff7f0e\"},\"hatch_color\":{\"type\":\"value\",\"value\":\"#ff7f0e\"}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1381\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":{\"type\":\"value\",\"value\":\"#ff7f0e\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"fill_color\":{\"type\":\"value\",\"value\":\"#ff7f0e\"},\"fill_alpha\":{\"type\":\"value\",\"value\":0.1},\"hatch_color\":{\"type\":\"value\",\"value\":\"#ff7f0e\"},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.1}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1382\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":{\"type\":\"value\",\"value\":\"#ff7f0e\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"fill_color\":{\"type\":\"value\",\"value\":\"#ff7f0e\"},\"fill_alpha\":{\"type\":\"value\",\"value\":0.2},\"hatch_color\":{\"type\":\"value\",\"value\":\"#ff7f0e\"},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1392\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1386\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1387\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1388\"},\"data\":{\"type\":\"map\",\"entries\":[[\"x\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"zczMzMzMR0AAAAAAAEBFQDMzMzMzc0RAZmZmZmZmSkAzMzMzM7NGQM3MzMzMzEhAAAAAAABASECamZmZmZlIQGZmZmZmZklAMzMzMzPzSUAAAAAAAABKQAAAAAAAAEpAzczMzMzMRkCamZmZmdlGQDMzMzMzc0dAmpmZmZnZRkBmZmZmZqZJQGZmZmZmpkhAmpmZmZkZSUBmZmZmZqZJQM3MzMzMTElAAAAAAABARUCamZmZmdlJQM3MzMzMTEdAAAAAAADASkBmZmZmZuZIQAAAAAAAAE1AmpmZmZlZSUAAAAAAAABKQGZmZmZmZklAmpmZmZkZR0AzMzMzMzNFQDMzMzMzc0lAmpmZmZlZR0AAAAAAAIBIQJqZmZmZmUZAAAAAAACASEAAAAAAAEBHQAAAAAAAQElAzczMzMwMSUBmZmZmZqZJQJqZmZmZGUpAAAAAAACAR0CamZmZmZlGQGZmZmZmJklAZmZmZmZmR0AAAAAAAMBJQDMzMzMzM0dAMzMzMzPzRkCamZmZmZlFQJqZmZmZWUpAzczMzMwMSEAAAAAAAMBHQDMzMzMzM0dAmpmZmZkZSUAAAAAAAMBFQJqZmZmZ2UhAAAAAAAAASUCamZmZmRlLQAAAAAAAwEhAZmZmZmbmS0AAAAAAAMBGQDMzMzMzc0lAAAAAAACASUAzMzMzM7NJQAAAAAAAQElAzczMzMwMR0AAAAAAAABHQA==\"},\"shape\":[68],\"dtype\":\"float64\",\"order\":\"little\"}],[\"y\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAABgaEAAAAAAAGBnQAAAAAAAYGdAAAAAAACgaUAAAAAAAIBnQAAAAAAAIGhAAAAAAADgZ0AAAAAAAGBoQAAAAAAAQGpAAAAAAADAaUAAAAAAACBpQAAAAAAAQGpAAAAAAABAaEAAAAAAACBoQAAAAAAAAGhAAAAAAABgaEAAAAAAACBoQAAAAAAAYGlAAAAAAABAaUAAAAAAAKBoQAAAAAAAIGhAAAAAAABgZ0AAAAAAAEBoQAAAAAAAIGhAAAAAAACgaUAAAAAAAMBoQAAAAAAAoGZAAAAAAABgaUAAAAAAAKBoQAAAAAAAIGlAAAAAAABgZ0AAAAAAAKBmQAAAAAAAgGhAAAAAAABgaEAAAAAAAIBqQAAAAAAAwGhAAAAAAABAakAAAAAAAABoQAAAAAAAIGlAAAAAAADAZ0AAAAAAAMBoQAAAAAAAoGhAAAAAAAAgZ0AAAAAAAOBnQAAAAAAAoGhAAAAAAACgZ0AAAAAAAGBnQAAAAAAA4GdAAAAAAADAZ0AAAAAAAGBnQAAAAAAAoGhAAAAAAADgaEAAAAAAAOBoQAAAAAAAwGdAAAAAAADAaEAAAAAAAEBpQAAAAAAAYGhAAAAAAACAaEAAAAAAACBpQAAAAAAAAGlAAAAAAADgaUAAAAAAAIBoQAAAAAAAgGhAAAAAAABgaUAAAAAAACBpQAAAAAAAAGlAAAAAAABAZkAAAAAAAGBoQA==\"},\"shape\":[68],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1393\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1394\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1389\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":{\"type\":\"value\",\"value\":\"#2ca02c\"},\"fill_color\":{\"type\":\"value\",\"value\":\"#2ca02c\"},\"hatch_color\":{\"type\":\"value\",\"value\":\"#2ca02c\"}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1390\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":{\"type\":\"value\",\"value\":\"#2ca02c\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"fill_color\":{\"type\":\"value\",\"value\":\"#2ca02c\"},\"fill_alpha\":{\"type\":\"value\",\"value\":0.1},\"hatch_color\":{\"type\":\"value\",\"value\":\"#2ca02c\"},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.1}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1391\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"x\"},\"y\":{\"type\":\"field\",\"field\":\"y\"},\"line_color\":{\"type\":\"value\",\"value\":\"#2ca02c\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"fill_color\":{\"type\":\"value\",\"value\":\"#2ca02c\"},\"fill_alpha\":{\"type\":\"value\",\"value\":0.2},\"hatch_color\":{\"type\":\"value\",\"value\":\"#2ca02c\"},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.2}}}}}],\"toolbar\":{\"type\":\"object\",\"name\":\"Toolbar\",\"id\":\"p1344\",\"attributes\":{\"tools\":[{\"type\":\"object\",\"name\":\"PanTool\",\"id\":\"p1357\"},{\"type\":\"object\",\"name\":\"WheelZoomTool\",\"id\":\"p1358\",\"attributes\":{\"renderers\":\"auto\"}},{\"type\":\"object\",\"name\":\"BoxZoomTool\",\"id\":\"p1359\",\"attributes\":{\"overlay\":{\"type\":\"object\",\"name\":\"BoxAnnotation\",\"id\":\"p1360\",\"attributes\":{\"syncable\":false,\"level\":\"overlay\",\"visible\":false,\"left\":{\"type\":\"number\",\"value\":\"nan\"},\"right\":{\"type\":\"number\",\"value\":\"nan\"},\"top\":{\"type\":\"number\",\"value\":\"nan\"},\"bottom\":{\"type\":\"number\",\"value\":\"nan\"},\"left_units\":\"canvas\",\"right_units\":\"canvas\",\"top_units\":\"canvas\",\"bottom_units\":\"canvas\",\"line_color\":\"black\",\"line_alpha\":1.0,\"line_width\":2,\"line_dash\":[4,4],\"fill_color\":\"lightgrey\",\"fill_alpha\":0.5}}}},{\"type\":\"object\",\"name\":\"SaveTool\",\"id\":\"p1365\"},{\"type\":\"object\",\"name\":\"ResetTool\",\"id\":\"p1366\"},{\"type\":\"object\",\"name\":\"HelpTool\",\"id\":\"p1367\"}]}},\"toolbar_location\":\"above\",\"left\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1352\",\"attributes\":{\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1353\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1354\"},\"axis_label\":\"flipper length (mm)\",\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1355\"}}}],\"right\":[{\"type\":\"object\",\"name\":\"Legend\",\"id\":\"p1395\",\"attributes\":{\"location\":\"center\",\"click_policy\":\"hide\",\"items\":[{\"type\":\"object\",\"name\":\"LegendItem\",\"id\":\"p1396\",\"attributes\":{\"label\":{\"type\":\"value\",\"value\":\"Adelie\"},\"renderers\":[{\"id\":\"p1374\"}]}},{\"type\":\"object\",\"name\":\"LegendItem\",\"id\":\"p1397\",\"attributes\":{\"label\":{\"type\":\"value\",\"value\":\"Gentoo\"},\"renderers\":[{\"id\":\"p1383\"}]}},{\"type\":\"object\",\"name\":\"LegendItem\",\"id\":\"p1398\",\"attributes\":{\"label\":{\"type\":\"value\",\"value\":\"Chinstrap\"},\"renderers\":[{\"id\":\"p1392\"}]}}]}}],\"below\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1347\",\"attributes\":{\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1348\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1349\"},\"axis_label\":\"bill length (mm)\",\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1350\"}}}],\"center\":[{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1351\",\"attributes\":{\"axis\":{\"id\":\"p1347\"}}},{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1356\",\"attributes\":{\"dimension\":1,\"axis\":{\"id\":\"p1352\"}}}],\"frame_width\":300,\"frame_height\":300}}],\"defs\":[{\"type\":\"model\",\"name\":\"ReactiveHTML1\"},{\"type\":\"model\",\"name\":\"FlexBox1\",\"properties\":[{\"name\":\"align_content\",\"kind\":\"Any\",\"default\":\"flex-start\"},{\"name\":\"align_items\",\"kind\":\"Any\",\"default\":\"flex-start\"},{\"name\":\"flex_direction\",\"kind\":\"Any\",\"default\":\"row\"},{\"name\":\"flex_wrap\",\"kind\":\"Any\",\"default\":\"wrap\"},{\"name\":\"gap\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"justify_content\",\"kind\":\"Any\",\"default\":\"flex-start\"}]},{\"type\":\"model\",\"name\":\"FloatPanel1\",\"properties\":[{\"name\":\"config\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"contained\",\"kind\":\"Any\",\"default\":true},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"right-top\"},{\"name\":\"offsetx\",\"kind\":\"Any\",\"default\":null},{\"name\":\"offsety\",\"kind\":\"Any\",\"default\":null},{\"name\":\"theme\",\"kind\":\"Any\",\"default\":\"primary\"},{\"name\":\"status\",\"kind\":\"Any\",\"default\":\"normalized\"}]},{\"type\":\"model\",\"name\":\"GridStack1\",\"properties\":[{\"name\":\"mode\",\"kind\":\"Any\",\"default\":\"warn\"},{\"name\":\"ncols\",\"kind\":\"Any\",\"default\":null},{\"name\":\"nrows\",\"kind\":\"Any\",\"default\":null},{\"name\":\"allow_resize\",\"kind\":\"Any\",\"default\":true},{\"name\":\"allow_drag\",\"kind\":\"Any\",\"default\":true},{\"name\":\"state\",\"kind\":\"Any\",\"default\":[]}]},{\"type\":\"model\",\"name\":\"drag1\",\"properties\":[{\"name\":\"slider_width\",\"kind\":\"Any\",\"default\":5},{\"name\":\"slider_color\",\"kind\":\"Any\",\"default\":\"black\"},{\"name\":\"value\",\"kind\":\"Any\",\"default\":50}]},{\"type\":\"model\",\"name\":\"click1\",\"properties\":[{\"name\":\"terminal_output\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"debug_name\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"clears\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"FastWrapper1\",\"properties\":[{\"name\":\"object\",\"kind\":\"Any\",\"default\":null},{\"name\":\"style\",\"kind\":\"Any\",\"default\":null}]},{\"type\":\"model\",\"name\":\"NotificationAreaBase1\",\"properties\":[{\"name\":\"js_events\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"bottom-right\"},{\"name\":\"_clear\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"NotificationArea1\",\"properties\":[{\"name\":\"js_events\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"notifications\",\"kind\":\"Any\",\"default\":[]},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"bottom-right\"},{\"name\":\"_clear\",\"kind\":\"Any\",\"default\":0},{\"name\":\"types\",\"kind\":\"Any\",\"default\":[{\"type\":\"map\",\"entries\":[[\"type\",\"warning\"],[\"background\",\"#ffc107\"],[\"icon\",{\"type\":\"map\",\"entries\":[[\"className\",\"fas fa-exclamation-triangle\"],[\"tagName\",\"i\"],[\"color\",\"white\"]]}]]},{\"type\":\"map\",\"entries\":[[\"type\",\"info\"],[\"background\",\"#007bff\"],[\"icon\",{\"type\":\"map\",\"entries\":[[\"className\",\"fas fa-info-circle\"],[\"tagName\",\"i\"],[\"color\",\"white\"]]}]]}]}]},{\"type\":\"model\",\"name\":\"Notification\",\"properties\":[{\"name\":\"background\",\"kind\":\"Any\",\"default\":null},{\"name\":\"duration\",\"kind\":\"Any\",\"default\":3000},{\"name\":\"icon\",\"kind\":\"Any\",\"default\":null},{\"name\":\"message\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"notification_type\",\"kind\":\"Any\",\"default\":null},{\"name\":\"_destroyed\",\"kind\":\"Any\",\"default\":false}]},{\"type\":\"model\",\"name\":\"TemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"BootstrapTemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"TemplateEditor1\",\"properties\":[{\"name\":\"layout\",\"kind\":\"Any\",\"default\":[]}]},{\"type\":\"model\",\"name\":\"MaterialTemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"copy_to_clipboard1\",\"properties\":[{\"name\":\"fill\",\"kind\":\"Any\",\"default\":\"none\"},{\"name\":\"value\",\"kind\":\"Any\",\"default\":null}]}]}};\n", " const render_items = [{\"docid\":\"d912903f-dfdb-4f5b-b37d-940ac4ca2252\",\"roots\":{\"p1336\":\"bc166ba3-dc70-4bdc-8f13-25cd679fd693\"},\"root_ids\":[\"p1336\"]}];\n", " void root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", " }\n", " if (root.Bokeh !== undefined) {\n", " embed_document(root);\n", " } else {\n", " let attempts = 0;\n", " const 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": { "application/vnd.bokehjs_exec.v0+json": { "id": "p1336" } }, "output_type": "display_data" } ], "source": [ "# Set up figure\n", "p = bokeh.plotting.figure(\n", " frame_width=300,\n", " frame_height=300,\n", " x_axis_label=\"bill length (mm)\",\n", " y_axis_label=\"flipper length (mm)\",\n", " toolbar_location=\"above\",\n", ")\n", "\n", "# Expressions for filtering\n", "bill_length = pl.col('variable') == \"bill_length_mm\"\n", "flipper_length = pl.col('variable') == \"flipper_length_mm\"\n", "\n", "# Build legend as we populate glyphs\n", "legend_items = []\n", "for color, ((species,), sub_df) in zip(bokeh.palettes.Category10_3, df.group_by('species')):\n", " # Slice out bill and flipper lengths for species\n", " bill = sub_df.filter(bill_length).get_column('value').to_numpy()\n", " flipper = sub_df.filter(flipper_length).get_column('value').to_numpy()\n", " \n", " # Populate glyph\n", " glyph = p.scatter(bill, flipper, color=color)\n", " legend_items.append((species, [glyph]))\n", "\n", "# Build and place legend\n", "legend = bokeh.models.Legend(items=legend_items, location=\"center\")\n", "p.add_layout(legend, \"right\")\n", "p.legend.click_policy = \"hide\"\n", "\n", "bokeh.io.show(p)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This works fine, but is more cumbersome. Importantly, we could not use a column data source in the plot to enable display of more data upon hover. The moral of the story is that you should tidy your data, but you should think carefully about in what way you want your data to be tidy." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Computing environment" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Python implementation: CPython\n", "Python version : 3.12.4\n", "IPython version : 8.25.0\n", "\n", "numpy : 1.26.4\n", "pandas : 2.2.2\n", "bokeh : 3.4.1\n", "iqplot : 0.3.7\n", "jupyterlab: 4.0.13\n", "\n" ] } ], "source": [ "%load_ext watermark\n", "%watermark -v -p numpy,pandas,bokeh,iqplot,jupyterlab" ] } ], "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.12.4" } }, "nbformat": 4, "nbformat_minor": 4 }