Created
September 26, 2016 16:37
-
-
Save ICBacon/9b8820976a099c4bb7bf464727c05015 to your computer and use it in GitHub Desktop.
Bokeh Plots in a Jupyter Notebook Using Iris Flower Data from Tony
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "cells": [ | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "> Do you actually know what Fisher's Iris flowers look like?" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "Click on point the plot to learn a bit more." | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 21, | |
| "metadata": { | |
| "collapsed": false | |
| }, | |
| "outputs": [], | |
| "source": [ | |
| "import bokeh\n", | |
| "from bokeh.charts import Scatter, vplot, output_server, output_notebook, show #cursession\n", | |
| "from bokeh.sampledata import iris\n", | |
| "from IPython.display import Javascript\n", | |
| "import json\n", | |
| "import pandas" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": null, | |
| "metadata": { | |
| "collapsed": true | |
| }, | |
| "outputs": [], | |
| "source": [] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 12, | |
| "metadata": { | |
| "collapsed": false | |
| }, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/html": [ | |
| "\n", | |
| " <div class=\"bk-root\">\n", | |
| " <a href=\"http://bokeh.pydata.org\" target=\"_blank\" class=\"bk-logo bk-logo-small bk-logo-notebook\"></a>\n", | |
| " <span id=\"20e29250-5c22-40c2-a7cb-99fa41aaeb36\">Loading BokehJS ...</span>\n", | |
| " </div>" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "application/javascript": [ | |
| "\n", | |
| "(function(global) {\n", | |
| " function now() {\n", | |
| " return new Date();\n", | |
| " }\n", | |
| "\n", | |
| " var force = \"1\";\n", | |
| "\n", | |
| " if (typeof (window._bokeh_onload_callbacks) === \"undefined\" || force !== \"\") {\n", | |
| " window._bokeh_onload_callbacks = [];\n", | |
| " window._bokeh_is_loading = undefined;\n", | |
| " }\n", | |
| "\n", | |
| "\n", | |
| " \n", | |
| " if (typeof (window._bokeh_timeout) === \"undefined\" || force !== \"\") {\n", | |
| " window._bokeh_timeout = Date.now() + 5000;\n", | |
| " window._bokeh_failed_load = false;\n", | |
| " }\n", | |
| "\n", | |
| " var NB_LOAD_WARNING = {'data': {'text/html':\n", | |
| " \"<div style='background-color: #fdd'>\\n\"+\n", | |
| " \"<p>\\n\"+\n", | |
| " \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n", | |
| " \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n", | |
| " \"</p>\\n\"+\n", | |
| " \"<ul>\\n\"+\n", | |
| " \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n", | |
| " \"<li>use INLINE resources instead, as so:</li>\\n\"+\n", | |
| " \"</ul>\\n\"+\n", | |
| " \"<code>\\n\"+\n", | |
| " \"from bokeh.resources import INLINE\\n\"+\n", | |
| " \"output_notebook(resources=INLINE)\\n\"+\n", | |
| " \"</code>\\n\"+\n", | |
| " \"</div>\"}};\n", | |
| "\n", | |
| " function display_loaded() {\n", | |
| " if (window.Bokeh !== undefined) {\n", | |
| " Bokeh.$(\"#20e29250-5c22-40c2-a7cb-99fa41aaeb36\").text(\"BokehJS successfully loaded.\");\n", | |
| " } else if (Date.now() < window._bokeh_timeout) {\n", | |
| " setTimeout(display_loaded, 100)\n", | |
| " }\n", | |
| " }\n", | |
| "\n", | |
| " function run_callbacks() {\n", | |
| " window._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n", | |
| " delete window._bokeh_onload_callbacks\n", | |
| " console.info(\"Bokeh: all callbacks have finished\");\n", | |
| " }\n", | |
| "\n", | |
| " function load_libs(js_urls, callback) {\n", | |
| " window._bokeh_onload_callbacks.push(callback);\n", | |
| " if (window._bokeh_is_loading > 0) {\n", | |
| " console.log(\"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.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n", | |
| " window._bokeh_is_loading = js_urls.length;\n", | |
| " for (var i = 0; i < js_urls.length; i++) {\n", | |
| " var url = js_urls[i];\n", | |
| " var s = document.createElement('script');\n", | |
| " s.src = url;\n", | |
| " s.async = false;\n", | |
| " s.onreadystatechange = s.onload = function() {\n", | |
| " window._bokeh_is_loading--;\n", | |
| " if (window._bokeh_is_loading === 0) {\n", | |
| " console.log(\"Bokeh: all BokehJS libraries loaded\");\n", | |
| " run_callbacks()\n", | |
| " }\n", | |
| " };\n", | |
| " s.onerror = function() {\n", | |
| " console.warn(\"failed to load library \" + url);\n", | |
| " };\n", | |
| " console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", | |
| " document.getElementsByTagName(\"head\")[0].appendChild(s);\n", | |
| " }\n", | |
| " };var element = document.getElementById(\"20e29250-5c22-40c2-a7cb-99fa41aaeb36\");\n", | |
| " if (element == null) {\n", | |
| " console.log(\"Bokeh: ERROR: autoload.js configured with elementid '20e29250-5c22-40c2-a7cb-99fa41aaeb36' but no matching script tag was found. \")\n", | |
| " return false;\n", | |
| " }\n", | |
| "\n", | |
| " var js_urls = ['https://cdn.pydata.org/bokeh/release/bokeh-0.12.2.min.js', 'https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.2.min.js', 'https://cdn.pydata.org/bokeh/release/bokeh-compiler-0.12.2.min.js'];\n", | |
| "\n", | |
| " var inline_js = [\n", | |
| " function(Bokeh) {\n", | |
| " Bokeh.set_log_level(\"info\");\n", | |
| " },\n", | |
| " \n", | |
| " function(Bokeh) {\n", | |
| " \n", | |
| " Bokeh.$(\"#20e29250-5c22-40c2-a7cb-99fa41aaeb36\").text(\"BokehJS is loading...\");\n", | |
| " },\n", | |
| " function(Bokeh) {\n", | |
| " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.12.2.min.css\");\n", | |
| " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.12.2.min.css\");\n", | |
| " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.2.min.css\");\n", | |
| " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.2.min.css\");\n", | |
| " }\n", | |
| " ];\n", | |
| "\n", | |
| " function run_inline_js() {\n", | |
| " \n", | |
| " if ((window.Bokeh !== undefined) || (force === \"1\")) {\n", | |
| " for (var i = 0; i < inline_js.length; i++) {\n", | |
| " inline_js[i](window.Bokeh);\n", | |
| " }if (force === \"1\") {\n", | |
| " display_loaded();\n", | |
| " }} else if (Date.now() < window._bokeh_timeout) {\n", | |
| " setTimeout(run_inline_js, 100);\n", | |
| " } else if (!window._bokeh_failed_load) {\n", | |
| " console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n", | |
| " window._bokeh_failed_load = true;\n", | |
| " } else if (!force) {\n", | |
| " var cell = $(\"#20e29250-5c22-40c2-a7cb-99fa41aaeb36\").parents('.cell').data().cell;\n", | |
| " cell.output_area.append_execute_result(NB_LOAD_WARNING)\n", | |
| " }\n", | |
| "\n", | |
| " }\n", | |
| "\n", | |
| " if (window._bokeh_is_loading === 0) {\n", | |
| " console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n", | |
| " run_inline_js();\n", | |
| " } else {\n", | |
| " load_libs(js_urls, function() {\n", | |
| " console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n", | |
| " run_inline_js();\n", | |
| " });\n", | |
| " }\n", | |
| "}(this));" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| } | |
| ], | |
| "source": [ | |
| "df = iris.flowers\n", | |
| "#output_server('update')\n", | |
| "output_notebook()\n", | |
| "gb = df.groupby('species').describe()" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "> Store the groupby tables for later" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 15, | |
| "metadata": { | |
| "collapsed": false | |
| }, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "application/javascript": [ | |
| "window.tables = {\"versicolor\": \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n <thead>\\n <tr style=\\\"text-align: right;\\\">\\n <th></th>\\n <th></th>\\n <th>petal_length</th>\\n <th>petal_width</th>\\n <th>sepal_length</th>\\n <th>sepal_width</th>\\n </tr>\\n <tr>\\n <th>species</th>\\n <th></th>\\n <th></th>\\n <th></th>\\n <th></th>\\n <th></th>\\n </tr>\\n </thead>\\n <tbody>\\n <tr>\\n <th rowspan=\\\"8\\\" valign=\\\"top\\\">versicolor</th>\\n <th>count</th>\\n <td>50.000000</td>\\n <td>50.000000</td>\\n <td>50.000000</td>\\n <td>50.000000</td>\\n </tr>\\n <tr>\\n <th>mean</th>\\n <td>4.260000</td>\\n <td>1.326000</td>\\n <td>5.936000</td>\\n <td>2.770000</td>\\n </tr>\\n <tr>\\n <th>std</th>\\n <td>0.469911</td>\\n <td>0.197753</td>\\n <td>0.516171</td>\\n <td>0.313798</td>\\n </tr>\\n <tr>\\n <th>min</th>\\n <td>3.000000</td>\\n <td>1.000000</td>\\n <td>4.900000</td>\\n <td>2.000000</td>\\n </tr>\\n <tr>\\n <th>25%</th>\\n <td>4.000000</td>\\n <td>1.200000</td>\\n <td>5.600000</td>\\n <td>2.525000</td>\\n </tr>\\n <tr>\\n <th>50%</th>\\n <td>4.350000</td>\\n <td>1.300000</td>\\n <td>5.900000</td>\\n <td>2.800000</td>\\n </tr>\\n <tr>\\n <th>75%</th>\\n <td>4.600000</td>\\n <td>1.500000</td>\\n <td>6.300000</td>\\n <td>3.000000</td>\\n </tr>\\n <tr>\\n <th>max</th>\\n <td>5.100000</td>\\n <td>1.800000</td>\\n <td>7.000000</td>\\n <td>3.400000</td>\\n </tr>\\n </tbody>\\n</table>\", \"virginica\": \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n <thead>\\n <tr style=\\\"text-align: right;\\\">\\n <th></th>\\n <th></th>\\n <th>petal_length</th>\\n <th>petal_width</th>\\n <th>sepal_length</th>\\n <th>sepal_width</th>\\n </tr>\\n <tr>\\n <th>species</th>\\n <th></th>\\n <th></th>\\n <th></th>\\n <th></th>\\n <th></th>\\n </tr>\\n </thead>\\n <tbody>\\n <tr>\\n <th rowspan=\\\"8\\\" valign=\\\"top\\\">virginica</th>\\n <th>count</th>\\n <td>50.000000</td>\\n <td>50.00000</td>\\n <td>50.00000</td>\\n <td>50.000000</td>\\n </tr>\\n <tr>\\n <th>mean</th>\\n <td>5.552000</td>\\n <td>2.02600</td>\\n <td>6.58800</td>\\n <td>2.974000</td>\\n </tr>\\n <tr>\\n <th>std</th>\\n <td>0.551895</td>\\n <td>0.27465</td>\\n <td>0.63588</td>\\n <td>0.322497</td>\\n </tr>\\n <tr>\\n <th>min</th>\\n <td>4.500000</td>\\n <td>1.40000</td>\\n <td>4.90000</td>\\n <td>2.200000</td>\\n </tr>\\n <tr>\\n <th>25%</th>\\n <td>5.100000</td>\\n <td>1.80000</td>\\n <td>6.22500</td>\\n <td>2.800000</td>\\n </tr>\\n <tr>\\n <th>50%</th>\\n <td>5.550000</td>\\n <td>2.00000</td>\\n <td>6.50000</td>\\n <td>3.000000</td>\\n </tr>\\n <tr>\\n <th>75%</th>\\n <td>5.875000</td>\\n <td>2.30000</td>\\n <td>6.90000</td>\\n <td>3.175000</td>\\n </tr>\\n <tr>\\n <th>max</th>\\n <td>6.900000</td>\\n <td>2.50000</td>\\n <td>7.90000</td>\\n <td>3.800000</td>\\n </tr>\\n </tbody>\\n</table>\", \"setosa\": \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n <thead>\\n <tr style=\\\"text-align: right;\\\">\\n <th></th>\\n <th></th>\\n <th>petal_length</th>\\n <th>petal_width</th>\\n <th>sepal_length</th>\\n <th>sepal_width</th>\\n </tr>\\n <tr>\\n <th>species</th>\\n <th></th>\\n <th></th>\\n <th></th>\\n <th></th>\\n <th></th>\\n </tr>\\n </thead>\\n <tbody>\\n <tr>\\n <th rowspan=\\\"8\\\" valign=\\\"top\\\">setosa</th>\\n <th>count</th>\\n <td>50.000000</td>\\n <td>50.000000</td>\\n <td>50.00000</td>\\n <td>50.000000</td>\\n </tr>\\n <tr>\\n <th>mean</th>\\n <td>1.462000</td>\\n <td>0.246000</td>\\n <td>5.00600</td>\\n <td>3.428000</td>\\n </tr>\\n <tr>\\n <th>std</th>\\n <td>0.173664</td>\\n <td>0.105386</td>\\n <td>0.35249</td>\\n <td>0.379064</td>\\n </tr>\\n <tr>\\n <th>min</th>\\n <td>1.000000</td>\\n <td>0.100000</td>\\n <td>4.30000</td>\\n <td>2.300000</td>\\n </tr>\\n <tr>\\n <th>25%</th>\\n <td>1.400000</td>\\n <td>0.200000</td>\\n <td>4.80000</td>\\n <td>3.200000</td>\\n </tr>\\n <tr>\\n <th>50%</th>\\n <td>1.500000</td>\\n <td>0.200000</td>\\n <td>5.00000</td>\\n <td>3.400000</td>\\n </tr>\\n <tr>\\n <th>75%</th>\\n <td>1.575000</td>\\n <td>0.300000</td>\\n <td>5.20000</td>\\n <td>3.675000</td>\\n </tr>\\n <tr>\\n <th>max</th>\\n <td>1.900000</td>\\n <td>0.600000</td>\\n <td>5.80000</td>\\n <td>4.400000</td>\\n </tr>\\n </tbody>\\n</table>\"}" | |
| ], | |
| "text/plain": [ | |
| "<IPython.core.display.Javascript object>" | |
| ] | |
| }, | |
| "execution_count": 15, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "# Store the dataframe tables in the Javascript console\n", | |
| "js_data = {}\n", | |
| "for species in gb.index.get_level_values('species').unique():\n", | |
| " js_data[species] = gb.loc[[species]].to_html()\n", | |
| "Javascript( 'window.tables = '+json.dumps(js_data) )" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "> High-level charts are cool" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 16, | |
| "metadata": { | |
| "collapsed": true | |
| }, | |
| "outputs": [], | |
| "source": [ | |
| "p = Scatter( df, x='sepal_length', y='petal_width', color='species',legend='top_right')\n", | |
| "p.add_tools( bokeh.models.TapTool() )" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "> Recover species names from the legend" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "## Create a callback that" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "- Updates dom elements\n", | |
| "- Shows groupby table for each species." | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 17, | |
| "metadata": { | |
| "collapsed": true | |
| }, | |
| "outputs": [], | |
| "source": [ | |
| "legend = p.select(dict(type=bokeh.models.Legend))[0]\n", | |
| "for species in legend.legends:\n", | |
| " source = species[1][0].data_source\n", | |
| " source.name = species[0]\n", | |
| " source.callback = bokeh.models.CustomJS(\n", | |
| " args=dict(source=source),\n", | |
| " code=\"\"\"window['a'] = cb_obj; \n", | |
| " cb_obj.get('selected')['1d'].indices;\n", | |
| " name = cb_obj.get('name');\n", | |
| " Bokeh.$('.species-name').text(name);\n", | |
| " Bokeh.$('#iris-src').attr('src', images[name]);\n", | |
| " Bokeh.$('#table-toggle').html(tables[name]);\n", | |
| " Bokeh.$('#table-toggle').css('background','white')\n", | |
| " \"\"\".format(species=species[0]))" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "> Click on a point to view more information about a species of iris flower" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 18, | |
| "metadata": { | |
| "collapsed": false | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "stderr", | |
| "output_type": "stream", | |
| "text": [ | |
| "C:\\Users\\ianba\\Anaconda3\\lib\\site-packages\\ipykernel\\__main__.py:1: BokehDeprecationWarning: bokeh.io.vplot was deprecated in Bokeh 0.12.0; please use bokeh.models.layouts.Column instead\n", | |
| " if __name__ == '__main__':\n" | |
| ] | |
| }, | |
| { | |
| "data": { | |
| "text/html": [ | |
| "\n", | |
| "\n", | |
| " <div class=\"bk-root\">\n", | |
| " <div class=\"plotdiv\" id=\"477675d2-094b-4420-9c2b-e48aa5db1a37\"></div>\n", | |
| " </div>\n", | |
| "<script type=\"text/javascript\">\n", | |
| " \n", | |
| " (function(global) {\n", | |
| " function now() {\n", | |
| " return new Date();\n", | |
| " }\n", | |
| " \n", | |
| " var force = \"\";\n", | |
| " \n", | |
| " if (typeof (window._bokeh_onload_callbacks) === \"undefined\" || force !== \"\") {\n", | |
| " window._bokeh_onload_callbacks = [];\n", | |
| " window._bokeh_is_loading = undefined;\n", | |
| " }\n", | |
| " \n", | |
| " \n", | |
| " \n", | |
| " if (typeof (window._bokeh_timeout) === \"undefined\" || force !== \"\") {\n", | |
| " window._bokeh_timeout = Date.now() + 0;\n", | |
| " window._bokeh_failed_load = false;\n", | |
| " }\n", | |
| " \n", | |
| " var NB_LOAD_WARNING = {'data': {'text/html':\n", | |
| " \"<div style='background-color: #fdd'>\\n\"+\n", | |
| " \"<p>\\n\"+\n", | |
| " \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n", | |
| " \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n", | |
| " \"</p>\\n\"+\n", | |
| " \"<ul>\\n\"+\n", | |
| " \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n", | |
| " \"<li>use INLINE resources instead, as so:</li>\\n\"+\n", | |
| " \"</ul>\\n\"+\n", | |
| " \"<code>\\n\"+\n", | |
| " \"from bokeh.resources import INLINE\\n\"+\n", | |
| " \"output_notebook(resources=INLINE)\\n\"+\n", | |
| " \"</code>\\n\"+\n", | |
| " \"</div>\"}};\n", | |
| " \n", | |
| " function display_loaded() {\n", | |
| " if (window.Bokeh !== undefined) {\n", | |
| " Bokeh.$(\"#477675d2-094b-4420-9c2b-e48aa5db1a37\").text(\"BokehJS successfully loaded.\");\n", | |
| " } else if (Date.now() < window._bokeh_timeout) {\n", | |
| " setTimeout(display_loaded, 100)\n", | |
| " }\n", | |
| " }\n", | |
| " \n", | |
| " function run_callbacks() {\n", | |
| " window._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n", | |
| " delete window._bokeh_onload_callbacks\n", | |
| " console.info(\"Bokeh: all callbacks have finished\");\n", | |
| " }\n", | |
| " \n", | |
| " function load_libs(js_urls, callback) {\n", | |
| " window._bokeh_onload_callbacks.push(callback);\n", | |
| " if (window._bokeh_is_loading > 0) {\n", | |
| " console.log(\"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.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n", | |
| " window._bokeh_is_loading = js_urls.length;\n", | |
| " for (var i = 0; i < js_urls.length; i++) {\n", | |
| " var url = js_urls[i];\n", | |
| " var s = document.createElement('script');\n", | |
| " s.src = url;\n", | |
| " s.async = false;\n", | |
| " s.onreadystatechange = s.onload = function() {\n", | |
| " window._bokeh_is_loading--;\n", | |
| " if (window._bokeh_is_loading === 0) {\n", | |
| " console.log(\"Bokeh: all BokehJS libraries loaded\");\n", | |
| " run_callbacks()\n", | |
| " }\n", | |
| " };\n", | |
| " s.onerror = function() {\n", | |
| " console.warn(\"failed to load library \" + url);\n", | |
| " };\n", | |
| " console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", | |
| " document.getElementsByTagName(\"head\")[0].appendChild(s);\n", | |
| " }\n", | |
| " };var element = document.getElementById(\"477675d2-094b-4420-9c2b-e48aa5db1a37\");\n", | |
| " if (element == null) {\n", | |
| " console.log(\"Bokeh: ERROR: autoload.js configured with elementid '477675d2-094b-4420-9c2b-e48aa5db1a37' but no matching script tag was found. \")\n", | |
| " return false;\n", | |
| " }\n", | |
| " \n", | |
| " var js_urls = [];\n", | |
| " \n", | |
| " var inline_js = [\n", | |
| " function(Bokeh) {\n", | |
| " Bokeh.$(function() {\n", | |
| " var docs_json = {\"6ff8d27c-19a2-4342-b397-5d48f0222fdd\":{\"roots\":{\"references\":[{\"attributes\":{\"plot\":null,\"text\":null},\"id\":\"ecc44526-b2f2-4e43-a1e4-1c23c36a2c1c\",\"type\":\"Title\"},{\"attributes\":{\"args\":{\"source\":{\"id\":\"09bdb366-3489-49b9-8115-754ec2a2c3be\",\"type\":\"ColumnDataSource\"}},\"code\":\"window['a'] = cb_obj; \\n cb_obj.get('selected')['1d'].indices;\\n name = cb_obj.get('name');\\n Bokeh.$('.species-name').text(name);\\n Bokeh.$('#iris-src').attr('src', images[name]);\\n Bokeh.$('#table-toggle').html(tables[name]);\\n Bokeh.$('#table-toggle').css('background','white')\\n \"},\"id\":\"f86c95fd-7246-45f9-9003-0ed88be2cb97\",\"type\":\"CustomJS\"},{\"attributes\":{\"plot\":{\"id\":\"c092924a-b0e5-4de8-aa28-04d4be1134c1\",\"subtype\":\"Chart\",\"type\":\"Plot\"}},\"id\":\"942abaa5-a46c-4434-b11d-daaa305020c8\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"plot\":{\"id\":\"c092924a-b0e5-4de8-aa28-04d4be1134c1\",\"subtype\":\"Chart\",\"type\":\"Plot\"}},\"id\":\"d15423ad-5db2-4e45-aaee-8a80579732b9\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"691a6067-2fe4-481d-b86b-b97b35d872a8\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"5397d74b-b065-4ea9-869e-f30b5692b80a\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"data_source\":{\"id\":\"8d126914-c58d-449f-9c02-567fec82154a\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"f055fbe4-8198-4a24-a4f5-587db23e8f12\",\"type\":\"Circle\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"246ad92d-e497-44fc-9252-c3c653021c3c\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"callback\":null,\"end\":8.26,\"start\":3.9399999999999995},\"id\":\"674bdddc-a560-4058-81ab-9eb57e38fc6e\",\"type\":\"Range1d\"},{\"attributes\":{\"args\":{\"source\":{\"id\":\"8d126914-c58d-449f-9c02-567fec82154a\",\"type\":\"ColumnDataSource\"}},\"code\":\"window['a'] = cb_obj; \\n cb_obj.get('selected')['1d'].indices;\\n name = cb_obj.get('name');\\n Bokeh.$('.species-name').text(name);\\n Bokeh.$('#iris-src').attr('src', images[name]);\\n Bokeh.$('#table-toggle').html(tables[name]);\\n Bokeh.$('#table-toggle').css('background','white')\\n \"},\"id\":\"83c442a9-6019-40b8-bb3d-2e3ea9104d41\",\"type\":\"CustomJS\"},{\"attributes\":{\"plot\":{\"id\":\"c092924a-b0e5-4de8-aa28-04d4be1134c1\",\"subtype\":\"Chart\",\"type\":\"Plot\"}},\"id\":\"c3c4f7c8-facc-444b-a5fb-392e00b641e5\",\"type\":\"PanTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.7},\"fill_color\":{\"value\":\"#407ee7\"},\"line_color\":{\"value\":\"#407ee7\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x_values\"},\"y\":{\"field\":\"y_values\"}},\"id\":\"e545f879-c6e6-46b8-858d-9c64ed39fcc9\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"357d1cb0-e99f-4210-93af-0abf39a5f3d3\",\"type\":\"BasicTicker\"},{\"attributes\":{\"overlay\":{\"id\":\"6cdf5597-ef58-4692-b694-fd556ee91b32\",\"type\":\"BoxAnnotation\"},\"plot\":{\"id\":\"c092924a-b0e5-4de8-aa28-04d4be1134c1\",\"subtype\":\"Chart\",\"type\":\"Plot\"}},\"id\":\"6125788d-40ec-4d53-b244-5ed17d53ef71\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"args\":{\"source\":{\"id\":\"18d29ad9-2074-4f4c-9682-472d1dafad6e\",\"type\":\"ColumnDataSource\"}},\"code\":\"window['a'] = cb_obj; \\n cb_obj.get('selected')['1d'].indices;\\n name = cb_obj.get('name');\\n Bokeh.$('.species-name').text(name);\\n Bokeh.$('#iris-src').attr('src', images[name]);\\n Bokeh.$('#table-toggle').html(tables[name]);\\n Bokeh.$('#table-toggle').css('background','white')\\n \"},\"id\":\"d6a1a99d-ea32-495f-b3ab-126813e12095\",\"type\":\"CustomJS\"},{\"attributes\":{\"plot\":{\"id\":\"c092924a-b0e5-4de8-aa28-04d4be1134c1\",\"subtype\":\"Chart\",\"type\":\"Plot\"}},\"id\":\"eb86b394-cefa-4d59-a4dc-6dac8ceef91e\",\"type\":\"ResetTool\"},{\"attributes\":{\"callback\":{\"id\":\"f86c95fd-7246-45f9-9003-0ed88be2cb97\",\"type\":\"CustomJS\"},\"column_names\":[\"y_values\",\"x_values\"],\"data\":{\"chart_index\":[{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"},{\"species\":\"setosa\"}],\"species\":[\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\",\"setosa\"],\"x_values\":[5.1,4.9,4.7,4.6,5.0,5.4,4.6,5.0,4.4,4.9,5.4,4.8,4.8,4.3,5.8,5.7,5.4,5.1,5.7,5.1,5.4,5.1,4.6,5.1,4.8,5.0,5.0,5.2,5.2,4.7,4.8,5.4,5.2,5.5,4.9,5.0,5.5,4.9,4.4,5.1,5.0,4.5,4.4,5.0,5.1,4.8,5.1,4.6,5.3,5.0],\"y_values\":[0.2,0.2,0.2,0.2,0.2,0.4,0.3,0.2,0.2,0.1,0.2,0.2,0.1,0.1,0.2,0.4,0.4,0.3,0.3,0.3,0.2,0.4,0.2,0.5,0.2,0.2,0.4,0.2,0.2,0.2,0.2,0.4,0.1,0.2,0.2,0.2,0.2,0.1,0.2,0.2,0.3,0.3,0.2,0.6,0.4,0.3,0.2,0.2,0.2,0.2]},\"name\":\"setosa\"},\"id\":\"09bdb366-3489-49b9-8115-754ec2a2c3be\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"c092924a-b0e5-4de8-aa28-04d4be1134c1\",\"subtype\":\"Chart\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"691a6067-2fe4-481d-b86b-b97b35d872a8\",\"type\":\"BasicTicker\"}},\"id\":\"f14126b5-da29-41e4-bbcc-18260a964ac1\",\"type\":\"Grid\"},{\"attributes\":{\"callback\":null,\"end\":2.74,\"start\":-0.13999999999999999},\"id\":\"a24cdfd5-2b7b-46f3-af22-8037fb6a5244\",\"type\":\"Range1d\"},{\"attributes\":{\"children\":[{\"id\":\"c092924a-b0e5-4de8-aa28-04d4be1134c1\",\"subtype\":\"Chart\",\"type\":\"Plot\"}]},\"id\":\"3cd0277c-8b8a-40b0-a8e8-dbf07c3986f3\",\"type\":\"Column\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"6cdf5597-ef58-4692-b694-fd556ee91b32\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"data_source\":{\"id\":\"09bdb366-3489-49b9-8115-754ec2a2c3be\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"cb584db0-d616-4174-ae07-7142efe22fee\",\"type\":\"Circle\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"1fcc1f8c-abec-4823-b7b5-a216777407ab\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"axis_label\":\"petal_width\",\"formatter\":{\"id\":\"9d1d693e-65c9-49a6-ac9a-7ddc9503bc59\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"c092924a-b0e5-4de8-aa28-04d4be1134c1\",\"subtype\":\"Chart\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"691a6067-2fe4-481d-b86b-b97b35d872a8\",\"type\":\"BasicTicker\"}},\"id\":\"8f95c946-27a0-4bad-a31e-2a9f13e6847f\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis_label\":\"sepal_length\",\"formatter\":{\"id\":\"5397d74b-b065-4ea9-869e-f30b5692b80a\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"c092924a-b0e5-4de8-aa28-04d4be1134c1\",\"subtype\":\"Chart\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"357d1cb0-e99f-4210-93af-0abf39a5f3d3\",\"type\":\"BasicTicker\"}},\"id\":\"4ae5b067-92e4-4f01-b1fc-98f4ad843cff\",\"type\":\"LinearAxis\"},{\"attributes\":{\"below\":[{\"id\":\"4ae5b067-92e4-4f01-b1fc-98f4ad843cff\",\"type\":\"LinearAxis\"}],\"left\":[{\"id\":\"8f95c946-27a0-4bad-a31e-2a9f13e6847f\",\"type\":\"LinearAxis\"}],\"renderers\":[{\"id\":\"6cdf5597-ef58-4692-b694-fd556ee91b32\",\"type\":\"BoxAnnotation\"},{\"id\":\"1fcc1f8c-abec-4823-b7b5-a216777407ab\",\"type\":\"GlyphRenderer\"},{\"id\":\"246ad92d-e497-44fc-9252-c3c653021c3c\",\"type\":\"GlyphRenderer\"},{\"id\":\"590132b8-6681-4f52-8939-4f046bc3b26a\",\"type\":\"GlyphRenderer\"},{\"id\":\"09bffd82-a6ce-46f9-b186-7371b86b6a90\",\"type\":\"Legend\"},{\"id\":\"4ae5b067-92e4-4f01-b1fc-98f4ad843cff\",\"type\":\"LinearAxis\"},{\"id\":\"8f95c946-27a0-4bad-a31e-2a9f13e6847f\",\"type\":\"LinearAxis\"},{\"id\":\"c53123c3-8465-4d92-adb0-93a684dc0b1d\",\"type\":\"Grid\"},{\"id\":\"f14126b5-da29-41e4-bbcc-18260a964ac1\",\"type\":\"Grid\"}],\"title\":{\"id\":\"ecc44526-b2f2-4e43-a1e4-1c23c36a2c1c\",\"type\":\"Title\"},\"tool_events\":{\"id\":\"e7450c88-888b-4937-87e5-5f4713d03905\",\"type\":\"ToolEvents\"},\"toolbar\":{\"id\":\"6956a22e-8318-4bfc-aa2a-cd254ff13f25\",\"type\":\"Toolbar\"},\"x_mapper_type\":\"auto\",\"x_range\":{\"id\":\"674bdddc-a560-4058-81ab-9eb57e38fc6e\",\"type\":\"Range1d\"},\"y_mapper_type\":\"auto\",\"y_range\":{\"id\":\"a24cdfd5-2b7b-46f3-af22-8037fb6a5244\",\"type\":\"Range1d\"}},\"id\":\"c092924a-b0e5-4de8-aa28-04d4be1134c1\",\"subtype\":\"Chart\",\"type\":\"Plot\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.7},\"fill_color\":{\"value\":\"#5ab738\"},\"line_color\":{\"value\":\"#5ab738\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x_values\"},\"y\":{\"field\":\"y_values\"}},\"id\":\"f055fbe4-8198-4a24-a4f5-587db23e8f12\",\"type\":\"Circle\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"c3c4f7c8-facc-444b-a5fb-392e00b641e5\",\"type\":\"PanTool\"},{\"id\":\"942abaa5-a46c-4434-b11d-daaa305020c8\",\"type\":\"WheelZoomTool\"},{\"id\":\"6125788d-40ec-4d53-b244-5ed17d53ef71\",\"type\":\"BoxZoomTool\"},{\"id\":\"d15423ad-5db2-4e45-aaee-8a80579732b9\",\"type\":\"SaveTool\"},{\"id\":\"eb86b394-cefa-4d59-a4dc-6dac8ceef91e\",\"type\":\"ResetTool\"},{\"id\":\"f0cce5b0-2591-490f-8169-7aac552e1267\",\"type\":\"HelpTool\"},{\"id\":\"6a10b994-feee-4a02-8ea1-56819522e102\",\"type\":\"TapTool\"}]},\"id\":\"6956a22e-8318-4bfc-aa2a-cd254ff13f25\",\"type\":\"Toolbar\"},{\"attributes\":{\"callback\":{\"id\":\"83c442a9-6019-40b8-bb3d-2e3ea9104d41\",\"type\":\"CustomJS\"},\"column_names\":[\"y_values\",\"x_values\"],\"data\":{\"chart_index\":[{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"},{\"species\":\"versicolor\"}],\"species\":[\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\",\"versicolor\"],\"x_values\":[7.0,6.4,6.9,5.5,6.5,5.7,6.3,4.9,6.6,5.2,5.0,5.9,6.0,6.1,5.6,6.7,5.6,5.8,6.2,5.6,5.9,6.1,6.3,6.1,6.4,6.6,6.8,6.7,6.0,5.7,5.5,5.5,5.8,6.0,5.4,6.0,6.7,6.3,5.6,5.5,5.5,6.1,5.8,5.0,5.6,5.7,5.7,6.2,5.1,5.7],\"y_values\":[1.4,1.5,1.5,1.3,1.5,1.3,1.6,1.0,1.3,1.4,1.0,1.5,1.0,1.4,1.3,1.4,1.5,1.0,1.5,1.1,1.8,1.3,1.5,1.2,1.3,1.4,1.4,1.7,1.5,1.0,1.1,1.0,1.2,1.6,1.5,1.6,1.5,1.3,1.3,1.3,1.2,1.4,1.2,1.0,1.3,1.2,1.3,1.3,1.1,1.3]},\"name\":\"versicolor\"},\"id\":\"8d126914-c58d-449f-9c02-567fec82154a\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"plot\":{\"id\":\"c092924a-b0e5-4de8-aa28-04d4be1134c1\",\"subtype\":\"Chart\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"357d1cb0-e99f-4210-93af-0abf39a5f3d3\",\"type\":\"BasicTicker\"}},\"id\":\"c53123c3-8465-4d92-adb0-93a684dc0b1d\",\"type\":\"Grid\"},{\"attributes\":{\"legends\":[[\"setosa\",[{\"id\":\"1fcc1f8c-abec-4823-b7b5-a216777407ab\",\"type\":\"GlyphRenderer\"}]],[\"versicolor\",[{\"id\":\"246ad92d-e497-44fc-9252-c3c653021c3c\",\"type\":\"GlyphRenderer\"}]],[\"virginica\",[{\"id\":\"590132b8-6681-4f52-8939-4f046bc3b26a\",\"type\":\"GlyphRenderer\"}]]],\"plot\":{\"id\":\"c092924a-b0e5-4de8-aa28-04d4be1134c1\",\"subtype\":\"Chart\",\"type\":\"Plot\"}},\"id\":\"09bffd82-a6ce-46f9-b186-7371b86b6a90\",\"type\":\"Legend\"},{\"attributes\":{\"data_source\":{\"id\":\"18d29ad9-2074-4f4c-9682-472d1dafad6e\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"e545f879-c6e6-46b8-858d-9c64ed39fcc9\",\"type\":\"Circle\"},\"hover_glyph\":null,\"nonselection_glyph\":null,\"selection_glyph\":null},\"id\":\"590132b8-6681-4f52-8939-4f046bc3b26a\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.7},\"fill_color\":{\"value\":\"#f22c40\"},\"line_color\":{\"value\":\"#f22c40\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x_values\"},\"y\":{\"field\":\"y_values\"}},\"id\":\"cb584db0-d616-4174-ae07-7142efe22fee\",\"type\":\"Circle\"},{\"attributes\":{\"plot\":{\"id\":\"c092924a-b0e5-4de8-aa28-04d4be1134c1\",\"subtype\":\"Chart\",\"type\":\"Plot\"}},\"id\":\"f0cce5b0-2591-490f-8169-7aac552e1267\",\"type\":\"HelpTool\"},{\"attributes\":{\"callback\":{\"id\":\"d6a1a99d-ea32-495f-b3ab-126813e12095\",\"type\":\"CustomJS\"},\"column_names\":[\"y_values\",\"x_values\"],\"data\":{\"chart_index\":[{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"},{\"species\":\"virginica\"}],\"species\":[\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\",\"virginica\"],\"x_values\":[6.3,5.8,7.1,6.3,6.5,7.6,4.9,7.3,6.7,7.2,6.5,6.4,6.8,5.7,5.8,6.4,6.5,7.7,7.7,6.0,6.9,5.6,7.7,6.3,6.7,7.2,6.2,6.1,6.4,7.2,7.4,7.9,6.4,6.3,6.1,7.7,6.3,6.4,6.0,6.9,6.7,6.9,5.8,6.8,6.7,6.7,6.3,6.5,6.2,5.9],\"y_values\":[2.5,1.9,2.1,1.8,2.2,2.1,1.7,1.8,1.8,2.5,2.0,1.9,2.1,2.0,2.4,2.3,1.8,2.2,2.3,1.5,2.3,2.0,2.0,1.8,2.1,1.8,1.8,1.8,2.1,1.6,1.9,2.0,2.2,1.5,1.4,2.3,2.4,1.8,1.8,2.1,2.4,2.3,1.9,2.3,2.5,2.3,1.9,2.0,2.3,1.8]},\"name\":\"virginica\"},\"id\":\"18d29ad9-2074-4f4c-9682-472d1dafad6e\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null,\"plot\":{\"id\":\"c092924a-b0e5-4de8-aa28-04d4be1134c1\",\"subtype\":\"Chart\",\"type\":\"Plot\"}},\"id\":\"6a10b994-feee-4a02-8ea1-56819522e102\",\"type\":\"TapTool\"},{\"attributes\":{},\"id\":\"9d1d693e-65c9-49a6-ac9a-7ddc9503bc59\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"e7450c88-888b-4937-87e5-5f4713d03905\",\"type\":\"ToolEvents\"}],\"root_ids\":[\"3cd0277c-8b8a-40b0-a8e8-dbf07c3986f3\"]},\"title\":\"Bokeh Application\",\"version\":\"0.12.2\"}};\n", | |
| " var render_items = [{\"docid\":\"6ff8d27c-19a2-4342-b397-5d48f0222fdd\",\"elementid\":\"477675d2-094b-4420-9c2b-e48aa5db1a37\",\"modelid\":\"3cd0277c-8b8a-40b0-a8e8-dbf07c3986f3\"}];\n", | |
| " \n", | |
| " Bokeh.embed.embed_items(docs_json, render_items);\n", | |
| " });\n", | |
| " },\n", | |
| " function(Bokeh) {\n", | |
| " }\n", | |
| " ];\n", | |
| " \n", | |
| " function run_inline_js() {\n", | |
| " \n", | |
| " if ((window.Bokeh !== undefined) || (force === \"1\")) {\n", | |
| " for (var i = 0; i < inline_js.length; i++) {\n", | |
| " inline_js[i](window.Bokeh);\n", | |
| " }if (force === \"1\") {\n", | |
| " display_loaded();\n", | |
| " }} else if (Date.now() < window._bokeh_timeout) {\n", | |
| " setTimeout(run_inline_js, 100);\n", | |
| " } else if (!window._bokeh_failed_load) {\n", | |
| " console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n", | |
| " window._bokeh_failed_load = true;\n", | |
| " } else if (!force) {\n", | |
| " var cell = $(\"#477675d2-094b-4420-9c2b-e48aa5db1a37\").parents('.cell').data().cell;\n", | |
| " cell.output_area.append_execute_result(NB_LOAD_WARNING)\n", | |
| " }\n", | |
| " \n", | |
| " }\n", | |
| " \n", | |
| " if (window._bokeh_is_loading === 0) {\n", | |
| " console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n", | |
| " run_inline_js();\n", | |
| " } else {\n", | |
| " load_libs(js_urls, function() {\n", | |
| " console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n", | |
| " run_inline_js();\n", | |
| " });\n", | |
| " }\n", | |
| " }(this));\n", | |
| "</script>" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| } | |
| ], | |
| "source": [ | |
| "show(vplot(p))" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "## A pandas describe() table for the Iris setosa" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 22, | |
| "metadata": { | |
| "collapsed": false | |
| }, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/html": [ | |
| "<div>\n", | |
| "<table border=\"1\" class=\"dataframe\">\n", | |
| " <thead>\n", | |
| " <tr style=\"text-align: right;\">\n", | |
| " <th></th>\n", | |
| " <th>sepal_length</th>\n", | |
| " <th>sepal_width</th>\n", | |
| " <th>petal_length</th>\n", | |
| " <th>petal_width</th>\n", | |
| " <th>species</th>\n", | |
| " </tr>\n", | |
| " </thead>\n", | |
| " <tbody>\n", | |
| " <tr>\n", | |
| " <th>0</th>\n", | |
| " <td>5.1</td>\n", | |
| " <td>3.5</td>\n", | |
| " <td>1.4</td>\n", | |
| " <td>0.2</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1</th>\n", | |
| " <td>4.9</td>\n", | |
| " <td>3.0</td>\n", | |
| " <td>1.4</td>\n", | |
| " <td>0.2</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2</th>\n", | |
| " <td>4.7</td>\n", | |
| " <td>3.2</td>\n", | |
| " <td>1.3</td>\n", | |
| " <td>0.2</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>3</th>\n", | |
| " <td>4.6</td>\n", | |
| " <td>3.1</td>\n", | |
| " <td>1.5</td>\n", | |
| " <td>0.2</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>4</th>\n", | |
| " <td>5.0</td>\n", | |
| " <td>3.6</td>\n", | |
| " <td>1.4</td>\n", | |
| " <td>0.2</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>5</th>\n", | |
| " <td>5.4</td>\n", | |
| " <td>3.9</td>\n", | |
| " <td>1.7</td>\n", | |
| " <td>0.4</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>6</th>\n", | |
| " <td>4.6</td>\n", | |
| " <td>3.4</td>\n", | |
| " <td>1.4</td>\n", | |
| " <td>0.3</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>7</th>\n", | |
| " <td>5.0</td>\n", | |
| " <td>3.4</td>\n", | |
| " <td>1.5</td>\n", | |
| " <td>0.2</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>8</th>\n", | |
| " <td>4.4</td>\n", | |
| " <td>2.9</td>\n", | |
| " <td>1.4</td>\n", | |
| " <td>0.2</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>9</th>\n", | |
| " <td>4.9</td>\n", | |
| " <td>3.1</td>\n", | |
| " <td>1.5</td>\n", | |
| " <td>0.1</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>10</th>\n", | |
| " <td>5.4</td>\n", | |
| " <td>3.7</td>\n", | |
| " <td>1.5</td>\n", | |
| " <td>0.2</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>11</th>\n", | |
| " <td>4.8</td>\n", | |
| " <td>3.4</td>\n", | |
| " <td>1.6</td>\n", | |
| " <td>0.2</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>12</th>\n", | |
| " <td>4.8</td>\n", | |
| " <td>3.0</td>\n", | |
| " <td>1.4</td>\n", | |
| " <td>0.1</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>13</th>\n", | |
| " <td>4.3</td>\n", | |
| " <td>3.0</td>\n", | |
| " <td>1.1</td>\n", | |
| " <td>0.1</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>14</th>\n", | |
| " <td>5.8</td>\n", | |
| " <td>4.0</td>\n", | |
| " <td>1.2</td>\n", | |
| " <td>0.2</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>15</th>\n", | |
| " <td>5.7</td>\n", | |
| " <td>4.4</td>\n", | |
| " <td>1.5</td>\n", | |
| " <td>0.4</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>16</th>\n", | |
| " <td>5.4</td>\n", | |
| " <td>3.9</td>\n", | |
| " <td>1.3</td>\n", | |
| " <td>0.4</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>17</th>\n", | |
| " <td>5.1</td>\n", | |
| " <td>3.5</td>\n", | |
| " <td>1.4</td>\n", | |
| " <td>0.3</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>18</th>\n", | |
| " <td>5.7</td>\n", | |
| " <td>3.8</td>\n", | |
| " <td>1.7</td>\n", | |
| " <td>0.3</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>19</th>\n", | |
| " <td>5.1</td>\n", | |
| " <td>3.8</td>\n", | |
| " <td>1.5</td>\n", | |
| " <td>0.3</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>20</th>\n", | |
| " <td>5.4</td>\n", | |
| " <td>3.4</td>\n", | |
| " <td>1.7</td>\n", | |
| " <td>0.2</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>21</th>\n", | |
| " <td>5.1</td>\n", | |
| " <td>3.7</td>\n", | |
| " <td>1.5</td>\n", | |
| " <td>0.4</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>22</th>\n", | |
| " <td>4.6</td>\n", | |
| " <td>3.6</td>\n", | |
| " <td>1.0</td>\n", | |
| " <td>0.2</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>23</th>\n", | |
| " <td>5.1</td>\n", | |
| " <td>3.3</td>\n", | |
| " <td>1.7</td>\n", | |
| " <td>0.5</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>24</th>\n", | |
| " <td>4.8</td>\n", | |
| " <td>3.4</td>\n", | |
| " <td>1.9</td>\n", | |
| " <td>0.2</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>25</th>\n", | |
| " <td>5.0</td>\n", | |
| " <td>3.0</td>\n", | |
| " <td>1.6</td>\n", | |
| " <td>0.2</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>26</th>\n", | |
| " <td>5.0</td>\n", | |
| " <td>3.4</td>\n", | |
| " <td>1.6</td>\n", | |
| " <td>0.4</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>27</th>\n", | |
| " <td>5.2</td>\n", | |
| " <td>3.5</td>\n", | |
| " <td>1.5</td>\n", | |
| " <td>0.2</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>28</th>\n", | |
| " <td>5.2</td>\n", | |
| " <td>3.4</td>\n", | |
| " <td>1.4</td>\n", | |
| " <td>0.2</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>29</th>\n", | |
| " <td>4.7</td>\n", | |
| " <td>3.2</td>\n", | |
| " <td>1.6</td>\n", | |
| " <td>0.2</td>\n", | |
| " <td>setosa</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>...</th>\n", | |
| " <td>...</td>\n", | |
| " <td>...</td>\n", | |
| " <td>...</td>\n", | |
| " <td>...</td>\n", | |
| " <td>...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>120</th>\n", | |
| " <td>6.9</td>\n", | |
| " <td>3.2</td>\n", | |
| " <td>5.7</td>\n", | |
| " <td>2.3</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>121</th>\n", | |
| " <td>5.6</td>\n", | |
| " <td>2.8</td>\n", | |
| " <td>4.9</td>\n", | |
| " <td>2.0</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>122</th>\n", | |
| " <td>7.7</td>\n", | |
| " <td>2.8</td>\n", | |
| " <td>6.7</td>\n", | |
| " <td>2.0</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>123</th>\n", | |
| " <td>6.3</td>\n", | |
| " <td>2.7</td>\n", | |
| " <td>4.9</td>\n", | |
| " <td>1.8</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>124</th>\n", | |
| " <td>6.7</td>\n", | |
| " <td>3.3</td>\n", | |
| " <td>5.7</td>\n", | |
| " <td>2.1</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>125</th>\n", | |
| " <td>7.2</td>\n", | |
| " <td>3.2</td>\n", | |
| " <td>6.0</td>\n", | |
| " <td>1.8</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>126</th>\n", | |
| " <td>6.2</td>\n", | |
| " <td>2.8</td>\n", | |
| " <td>4.8</td>\n", | |
| " <td>1.8</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>127</th>\n", | |
| " <td>6.1</td>\n", | |
| " <td>3.0</td>\n", | |
| " <td>4.9</td>\n", | |
| " <td>1.8</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>128</th>\n", | |
| " <td>6.4</td>\n", | |
| " <td>2.8</td>\n", | |
| " <td>5.6</td>\n", | |
| " <td>2.1</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>129</th>\n", | |
| " <td>7.2</td>\n", | |
| " <td>3.0</td>\n", | |
| " <td>5.8</td>\n", | |
| " <td>1.6</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>130</th>\n", | |
| " <td>7.4</td>\n", | |
| " <td>2.8</td>\n", | |
| " <td>6.1</td>\n", | |
| " <td>1.9</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>131</th>\n", | |
| " <td>7.9</td>\n", | |
| " <td>3.8</td>\n", | |
| " <td>6.4</td>\n", | |
| " <td>2.0</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>132</th>\n", | |
| " <td>6.4</td>\n", | |
| " <td>2.8</td>\n", | |
| " <td>5.6</td>\n", | |
| " <td>2.2</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>133</th>\n", | |
| " <td>6.3</td>\n", | |
| " <td>2.8</td>\n", | |
| " <td>5.1</td>\n", | |
| " <td>1.5</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>134</th>\n", | |
| " <td>6.1</td>\n", | |
| " <td>2.6</td>\n", | |
| " <td>5.6</td>\n", | |
| " <td>1.4</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>135</th>\n", | |
| " <td>7.7</td>\n", | |
| " <td>3.0</td>\n", | |
| " <td>6.1</td>\n", | |
| " <td>2.3</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>136</th>\n", | |
| " <td>6.3</td>\n", | |
| " <td>3.4</td>\n", | |
| " <td>5.6</td>\n", | |
| " <td>2.4</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>137</th>\n", | |
| " <td>6.4</td>\n", | |
| " <td>3.1</td>\n", | |
| " <td>5.5</td>\n", | |
| " <td>1.8</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>138</th>\n", | |
| " <td>6.0</td>\n", | |
| " <td>3.0</td>\n", | |
| " <td>4.8</td>\n", | |
| " <td>1.8</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>139</th>\n", | |
| " <td>6.9</td>\n", | |
| " <td>3.1</td>\n", | |
| " <td>5.4</td>\n", | |
| " <td>2.1</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>140</th>\n", | |
| " <td>6.7</td>\n", | |
| " <td>3.1</td>\n", | |
| " <td>5.6</td>\n", | |
| " <td>2.4</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>141</th>\n", | |
| " <td>6.9</td>\n", | |
| " <td>3.1</td>\n", | |
| " <td>5.1</td>\n", | |
| " <td>2.3</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>142</th>\n", | |
| " <td>5.8</td>\n", | |
| " <td>2.7</td>\n", | |
| " <td>5.1</td>\n", | |
| " <td>1.9</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>143</th>\n", | |
| " <td>6.8</td>\n", | |
| " <td>3.2</td>\n", | |
| " <td>5.9</td>\n", | |
| " <td>2.3</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>144</th>\n", | |
| " <td>6.7</td>\n", | |
| " <td>3.3</td>\n", | |
| " <td>5.7</td>\n", | |
| " <td>2.5</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>145</th>\n", | |
| " <td>6.7</td>\n", | |
| " <td>3.0</td>\n", | |
| " <td>5.2</td>\n", | |
| " <td>2.3</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>146</th>\n", | |
| " <td>6.3</td>\n", | |
| " <td>2.5</td>\n", | |
| " <td>5.0</td>\n", | |
| " <td>1.9</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>147</th>\n", | |
| " <td>6.5</td>\n", | |
| " <td>3.0</td>\n", | |
| " <td>5.2</td>\n", | |
| " <td>2.0</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>148</th>\n", | |
| " <td>6.2</td>\n", | |
| " <td>3.4</td>\n", | |
| " <td>5.4</td>\n", | |
| " <td>2.3</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>149</th>\n", | |
| " <td>5.9</td>\n", | |
| " <td>3.0</td>\n", | |
| " <td>5.1</td>\n", | |
| " <td>1.8</td>\n", | |
| " <td>virginica</td>\n", | |
| " </tr>\n", | |
| " </tbody>\n", | |
| "</table>\n", | |
| "<p>150 rows × 5 columns</p>\n", | |
| "</div>" | |
| ], | |
| "text/plain": [ | |
| " sepal_length sepal_width petal_length petal_width species\n", | |
| "0 5.1 3.5 1.4 0.2 setosa\n", | |
| "1 4.9 3.0 1.4 0.2 setosa\n", | |
| "2 4.7 3.2 1.3 0.2 setosa\n", | |
| "3 4.6 3.1 1.5 0.2 setosa\n", | |
| "4 5.0 3.6 1.4 0.2 setosa\n", | |
| "5 5.4 3.9 1.7 0.4 setosa\n", | |
| "6 4.6 3.4 1.4 0.3 setosa\n", | |
| "7 5.0 3.4 1.5 0.2 setosa\n", | |
| "8 4.4 2.9 1.4 0.2 setosa\n", | |
| "9 4.9 3.1 1.5 0.1 setosa\n", | |
| "10 5.4 3.7 1.5 0.2 setosa\n", | |
| "11 4.8 3.4 1.6 0.2 setosa\n", | |
| "12 4.8 3.0 1.4 0.1 setosa\n", | |
| "13 4.3 3.0 1.1 0.1 setosa\n", | |
| "14 5.8 4.0 1.2 0.2 setosa\n", | |
| "15 5.7 4.4 1.5 0.4 setosa\n", | |
| "16 5.4 3.9 1.3 0.4 setosa\n", | |
| "17 5.1 3.5 1.4 0.3 setosa\n", | |
| "18 5.7 3.8 1.7 0.3 setosa\n", | |
| "19 5.1 3.8 1.5 0.3 setosa\n", | |
| "20 5.4 3.4 1.7 0.2 setosa\n", | |
| "21 5.1 3.7 1.5 0.4 setosa\n", | |
| "22 4.6 3.6 1.0 0.2 setosa\n", | |
| "23 5.1 3.3 1.7 0.5 setosa\n", | |
| "24 4.8 3.4 1.9 0.2 setosa\n", | |
| "25 5.0 3.0 1.6 0.2 setosa\n", | |
| "26 5.0 3.4 1.6 0.4 setosa\n", | |
| "27 5.2 3.5 1.5 0.2 setosa\n", | |
| "28 5.2 3.4 1.4 0.2 setosa\n", | |
| "29 4.7 3.2 1.6 0.2 setosa\n", | |
| ".. ... ... ... ... ...\n", | |
| "120 6.9 3.2 5.7 2.3 virginica\n", | |
| "121 5.6 2.8 4.9 2.0 virginica\n", | |
| "122 7.7 2.8 6.7 2.0 virginica\n", | |
| "123 6.3 2.7 4.9 1.8 virginica\n", | |
| "124 6.7 3.3 5.7 2.1 virginica\n", | |
| "125 7.2 3.2 6.0 1.8 virginica\n", | |
| "126 6.2 2.8 4.8 1.8 virginica\n", | |
| "127 6.1 3.0 4.9 1.8 virginica\n", | |
| "128 6.4 2.8 5.6 2.1 virginica\n", | |
| "129 7.2 3.0 5.8 1.6 virginica\n", | |
| "130 7.4 2.8 6.1 1.9 virginica\n", | |
| "131 7.9 3.8 6.4 2.0 virginica\n", | |
| "132 6.4 2.8 5.6 2.2 virginica\n", | |
| "133 6.3 2.8 5.1 1.5 virginica\n", | |
| "134 6.1 2.6 5.6 1.4 virginica\n", | |
| "135 7.7 3.0 6.1 2.3 virginica\n", | |
| "136 6.3 3.4 5.6 2.4 virginica\n", | |
| "137 6.4 3.1 5.5 1.8 virginica\n", | |
| "138 6.0 3.0 4.8 1.8 virginica\n", | |
| "139 6.9 3.1 5.4 2.1 virginica\n", | |
| "140 6.7 3.1 5.6 2.4 virginica\n", | |
| "141 6.9 3.1 5.1 2.3 virginica\n", | |
| "142 5.8 2.7 5.1 1.9 virginica\n", | |
| "143 6.8 3.2 5.9 2.3 virginica\n", | |
| "144 6.7 3.3 5.7 2.5 virginica\n", | |
| "145 6.7 3.0 5.2 2.3 virginica\n", | |
| "146 6.3 2.5 5.0 1.9 virginica\n", | |
| "147 6.5 3.0 5.2 2.0 virginica\n", | |
| "148 6.2 3.4 5.4 2.3 virginica\n", | |
| "149 5.9 3.0 5.1 1.8 virginica\n", | |
| "\n", | |
| "[150 rows x 5 columns]" | |
| ] | |
| }, | |
| "execution_count": 22, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "iris.flowers" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 19, | |
| "metadata": { | |
| "collapsed": false | |
| }, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "application/javascript": [ | |
| "window['images'] = {\"versicolor\": \"https://upload.wikimedia.org/wikipedia/commons/thumb/4/41/Iris_versicolor_3.jpg/440px-Iris_versicolor_3.jpg\", \"virginica\": \"https://upload.wikimedia.org/wikipedia/commons/thumb/9/9f/Iris_virginica.jpg/440px-Iris_virginica.jpg\", \"setosa\": \"https://upload.wikimedia.org/wikipedia/commons/thumb/5/56/Kosaciec_szczecinkowaty_Iris_setosa.jpg/440px-Kosaciec_szczecinkowaty_Iris_setosa.jpg\"}" | |
| ], | |
| "text/plain": [ | |
| "<IPython.core.display.Javascript object>" | |
| ] | |
| }, | |
| "execution_count": 19, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "imgs = {'setosa':'https://upload.wikimedia.org/wikipedia/commons/thumb/5/56/Kosaciec_szczecinkowaty_Iris_setosa.jpg/440px-Kosaciec_szczecinkowaty_Iris_setosa.jpg',\n", | |
| "'versicolor':'https://upload.wikimedia.org/wikipedia/commons/thumb/4/41/Iris_versicolor_3.jpg/440px-Iris_versicolor_3.jpg',\n", | |
| "'virginica':'https://upload.wikimedia.org/wikipedia/commons/thumb/9/9f/Iris_virginica.jpg/440px-Iris_virginica.jpg'}\n", | |
| "Javascript( \"\"\"window['images'] = \"\"\" + json.dumps(imgs))" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": null, | |
| "metadata": { | |
| "collapsed": true | |
| }, | |
| "outputs": [], | |
| "source": [] | |
| } | |
| ], | |
| "metadata": { | |
| "anaconda-cloud": {}, | |
| "kernelspec": { | |
| "display_name": "Python [Root]", | |
| "language": "python", | |
| "name": "Python [Root]" | |
| }, | |
| "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.5.2" | |
| } | |
| }, | |
| "nbformat": 4, | |
| "nbformat_minor": 0 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment