Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save VolkerH/068143c9d3be8255041e1734dc8c64db to your computer and use it in GitHub Desktop.
Save VolkerH/068143c9d3be8255041e1734dc8c64db to your computer and use it in GitHub Desktop.
Jupyter notebook example to demonstrate bokeh error with data frame containing column named field
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"from bokeh.plotting import figure, output_notebook, show, ColumnDataSource\n",
"from bokeh.models import HoverTool\n",
"# Create two data frames, one has a column named 'field'\n",
"df_with_field_column = pd.DataFrame.from_dict({'treatment': ['aa', 'bb', 'cc', 'dd'], 'date': [0.23, 0.45, 0.75, 1.30], 'C': ['uyfyurf','yfytf','uyfdty','adeff'], 'I':['20160917_abc','20160917_def','20160917_ghi','20160917_jkl'], 'field':[0, 1, 2, 3]})\n",
"df = pd.DataFrame.from_dict({'treatment': ['aa', 'bb', 'cc', 'dd'], 'date': [0.23, 0.45, 0.75, 1.30], 'C': ['uyfyurf','yfytf','uyfdty','adeff'], 'I':['20160917_abc','20160917_def','20160917_ghi','20160917_jkl']})\n",
"s = ColumnDataSource(data=df)\n",
"s_with_field_column = ColumnDataSource(data=df_with_field_column)"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style>\n",
" .dataframe thead tr:only-child th {\n",
" text-align: right;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: left;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>C</th>\n",
" <th>I</th>\n",
" <th>date</th>\n",
" <th>treatment</th>\n",
" <th>index</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>uyfyurf</td>\n",
" <td>20160917_abc</td>\n",
" <td>0.23</td>\n",
" <td>aa</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>yfytf</td>\n",
" <td>20160917_def</td>\n",
" <td>0.45</td>\n",
" <td>bb</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>uyfdty</td>\n",
" <td>20160917_ghi</td>\n",
" <td>0.75</td>\n",
" <td>cc</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>adeff</td>\n",
" <td>20160917_jkl</td>\n",
" <td>1.30</td>\n",
" <td>dd</td>\n",
" <td>3</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" C I date treatment index\n",
"0 uyfyurf 20160917_abc 0.23 aa 0\n",
"1 yfytf 20160917_def 0.45 bb 1\n",
"2 uyfdty 20160917_ghi 0.75 cc 2\n",
"3 adeff 20160917_jkl 1.30 dd 3"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"s.to_df()"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style>\n",
" .dataframe thead tr:only-child th {\n",
" text-align: right;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: left;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>C</th>\n",
" <th>I</th>\n",
" <th>date</th>\n",
" <th>field</th>\n",
" <th>treatment</th>\n",
" <th>index</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>uyfyurf</td>\n",
" <td>20160917_abc</td>\n",
" <td>0.23</td>\n",
" <td>0</td>\n",
" <td>aa</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>yfytf</td>\n",
" <td>20160917_def</td>\n",
" <td>0.45</td>\n",
" <td>1</td>\n",
" <td>bb</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>uyfdty</td>\n",
" <td>20160917_ghi</td>\n",
" <td>0.75</td>\n",
" <td>2</td>\n",
" <td>cc</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>adeff</td>\n",
" <td>20160917_jkl</td>\n",
" <td>1.30</td>\n",
" <td>3</td>\n",
" <td>dd</td>\n",
" <td>3</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" C I date field treatment index\n",
"0 uyfyurf 20160917_abc 0.23 0 aa 0\n",
"1 yfytf 20160917_def 0.45 1 bb 1\n",
"2 uyfdty 20160917_ghi 0.75 2 cc 2\n",
"3 adeff 20160917_jkl 1.30 3 dd 3"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"s_with_field_column.to_df()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"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=\"70919c97-72c9-4eca-aee7-45dd16379db1\">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 = true;\n",
"\n",
" if (typeof (window._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n",
" window._bokeh_onload_callbacks = [];\n",
" window._bokeh_is_loading = undefined;\n",
" }\n",
"\n",
"\n",
" \n",
" if (typeof (window._bokeh_timeout) === \"undefined\" || force === true) {\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",
" var el = document.getElementById(\"70919c97-72c9-4eca-aee7-45dd16379db1\");\n",
" el.textContent = \"BokehJS \" + Bokeh.version + \" 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(\"70919c97-72c9-4eca-aee7-45dd16379db1\");\n",
" if (element == null) {\n",
" console.log(\"Bokeh: ERROR: autoload.js configured with elementid '70919c97-72c9-4eca-aee7-45dd16379db1' 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.5.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.5.min.js\"];\n",
"\n",
" var inline_js = [\n",
" function(Bokeh) {\n",
" Bokeh.set_log_level(\"info\");\n",
" },\n",
" \n",
" function(Bokeh) {\n",
" \n",
" },\n",
" \n",
" function(Bokeh) {\n",
" \n",
" document.getElementById(\"70919c97-72c9-4eca-aee7-45dd16379db1\").textContent = \"BokehJS is loading...\";\n",
" },\n",
" function(Bokeh) {\n",
" console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.12.5.min.css\");\n",
" Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.12.5.min.css\");\n",
" console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.5.min.css\");\n",
" Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.5.min.css\");\n",
" }\n",
" ];\n",
"\n",
" function run_inline_js() {\n",
" \n",
" if ((window.Bokeh !== undefined) || (force === true)) {\n",
" for (var i = 0; i < inline_js.length; i++) {\n",
" inline_js[i](window.Bokeh);\n",
" }if (force === true) {\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 !== true) {\n",
" var cell = $(document.getElementById(\"70919c97-72c9-4eca-aee7-45dd16379db1\")).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"
},
{
"data": {
"text/html": [
"\n",
"\n",
" <div class=\"bk-root\">\n",
" <div class=\"bk-plotdiv\" id=\"29e4d301-3a89-47dc-b70c-45d3bb065a57\"></div>\n",
" </div>\n",
"<script type=\"text/javascript\">\n",
" \n",
" (function(global) {\n",
" function now() {\n",
" return new Date();\n",
" }\n",
" \n",
" var force = false;\n",
" \n",
" if (typeof (window._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n",
" window._bokeh_onload_callbacks = [];\n",
" window._bokeh_is_loading = undefined;\n",
" }\n",
" \n",
" \n",
" \n",
" if (typeof (window._bokeh_timeout) === \"undefined\" || force === true) {\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",
" var el = document.getElementById(\"29e4d301-3a89-47dc-b70c-45d3bb065a57\");\n",
" el.textContent = \"BokehJS \" + Bokeh.version + \" 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(\"29e4d301-3a89-47dc-b70c-45d3bb065a57\");\n",
" if (element == null) {\n",
" console.log(\"Bokeh: ERROR: autoload.js configured with elementid '29e4d301-3a89-47dc-b70c-45d3bb065a57' 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",
" (function() {\n",
" var fn = function() {\n",
" var docs_json = {\"c98a7f9a-d96d-461f-b5d5-575ccb2df793\":{\"roots\":{\"references\":[{\"attributes\":{\"data_source\":{\"id\":\"426a5be2-fb8f-4ad0-b19a-87eaa267030d\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"cf4aa5de-339e-4eb9-af70-5c6e07d70052\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"5020d847-0a85-4cae-a7a8-f200492e7c86\",\"type\":\"Circle\"},\"selection_glyph\":null},\"id\":\"5bba7321-7a0e-4485-ba26-fe924b1e8def\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_color\":{\"value\":\"#1f77b4\"},\"line_color\":{\"value\":\"#1f77b4\"},\"x\":{\"field\":\"date\"},\"y\":{\"field\":\"date\"}},\"id\":\"cf4aa5de-339e-4eb9-af70-5c6e07d70052\",\"type\":\"Circle\"},{\"attributes\":{\"plot\":{\"id\":\"24d9f9d1-3504-475a-b9de-f24161f07df5\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"e970b026-b031-4537-9d06-8fe208c8302a\",\"type\":\"ResetTool\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"C\",\"I\",\"date\",\"treatment\",\"index\"],\"data\":{\"C\":[\"uyfyurf\",\"yfytf\",\"uyfdty\",\"adeff\"],\"I\":[\"20160917_abc\",\"20160917_def\",\"20160917_ghi\",\"20160917_jkl\"],\"date\":{\"__ndarray__\":\"cT0K16NwzT/NzMzMzMzcPwAAAAAAAOg/zczMzMzM9D8=\",\"dtype\":\"float64\",\"shape\":[4]},\"index\":[0,1,2,3],\"treatment\":[\"aa\",\"bb\",\"cc\",\"dd\"]}},\"id\":\"426a5be2-fb8f-4ad0-b19a-87eaa267030d\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"32d750ac-0ada-4c42-a4cf-7868b015c45a\",\"type\":\"PanTool\"},{\"id\":\"94173296-08dc-4a3e-bf1e-c257bcef4a98\",\"type\":\"WheelZoomTool\"},{\"id\":\"97242fff-fc67-4388-9629-3989ec957d17\",\"type\":\"BoxZoomTool\"},{\"id\":\"a3cab388-5da8-44e3-b368-876bfdb9cacb\",\"type\":\"SaveTool\"},{\"id\":\"e970b026-b031-4537-9d06-8fe208c8302a\",\"type\":\"ResetTool\"},{\"id\":\"c13f14ac-a5d4-48d0-9651-c72e322abbfa\",\"type\":\"HelpTool\"}]},\"id\":\"6b29b35d-95e2-4f7f-b4fe-44cb176ad00d\",\"type\":\"Toolbar\"},{\"attributes\":{\"below\":[{\"id\":\"295075ea-60cf-4081-8d75-07af5cf591ea\",\"type\":\"LinearAxis\"}],\"left\":[{\"id\":\"50bc7186-31df-4e36-83bb-c73ca5cc7fee\",\"type\":\"LinearAxis\"}],\"renderers\":[{\"id\":\"295075ea-60cf-4081-8d75-07af5cf591ea\",\"type\":\"LinearAxis\"},{\"id\":\"a264eee8-17f5-4015-8c57-fb5d92099f12\",\"type\":\"Grid\"},{\"id\":\"50bc7186-31df-4e36-83bb-c73ca5cc7fee\",\"type\":\"LinearAxis\"},{\"id\":\"e6e4baba-8e16-49b6-9a49-a074b24f67d1\",\"type\":\"Grid\"},{\"id\":\"6f4bba63-019e-41b6-bc61-5fac5cb41a10\",\"type\":\"BoxAnnotation\"},{\"id\":\"5bba7321-7a0e-4485-ba26-fe924b1e8def\",\"type\":\"GlyphRenderer\"}],\"title\":{\"id\":\"e5121628-3301-422c-8c41-1ba88792beba\",\"type\":\"Title\"},\"tool_events\":{\"id\":\"3820cc5c-645c-4b50-8c85-cc0299dac758\",\"type\":\"ToolEvents\"},\"toolbar\":{\"id\":\"6b29b35d-95e2-4f7f-b4fe-44cb176ad00d\",\"type\":\"Toolbar\"},\"x_range\":{\"id\":\"65e0ac66-4f9e-4c46-abd0-3bba30e804dd\",\"type\":\"DataRange1d\"},\"y_range\":{\"id\":\"a41f5188-a3b3-44d1-b6b6-dc0965f758ca\",\"type\":\"DataRange1d\"}},\"id\":\"24d9f9d1-3504-475a-b9de-f24161f07df5\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"x\":{\"field\":\"date\"},\"y\":{\"field\":\"date\"}},\"id\":\"5020d847-0a85-4cae-a7a8-f200492e7c86\",\"type\":\"Circle\"},{\"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\":\"6f4bba63-019e-41b6-bc61-5fac5cb41a10\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"3820cc5c-645c-4b50-8c85-cc0299dac758\",\"type\":\"ToolEvents\"},{\"attributes\":{},\"id\":\"2f631666-840f-47c3-b2bf-faf7888293aa\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"8336da8f-d1c3-462d-9346-f7a7e28b46a5\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"callback\":null},\"id\":\"65e0ac66-4f9e-4c46-abd0-3bba30e804dd\",\"type\":\"DataRange1d\"},{\"attributes\":{\"callback\":null},\"id\":\"a41f5188-a3b3-44d1-b6b6-dc0965f758ca\",\"type\":\"DataRange1d\"},{\"attributes\":{\"formatter\":{\"id\":\"8336da8f-d1c3-462d-9346-f7a7e28b46a5\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"24d9f9d1-3504-475a-b9de-f24161f07df5\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"299e9592-24df-43fa-bfbb-6f3b4ba8944f\",\"type\":\"BasicTicker\"}},\"id\":\"295075ea-60cf-4081-8d75-07af5cf591ea\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"299e9592-24df-43fa-bfbb-6f3b4ba8944f\",\"type\":\"BasicTicker\"},{\"attributes\":{\"plot\":null,\"text\":\"\"},\"id\":\"e5121628-3301-422c-8c41-1ba88792beba\",\"type\":\"Title\"},{\"attributes\":{\"plot\":{\"id\":\"24d9f9d1-3504-475a-b9de-f24161f07df5\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"299e9592-24df-43fa-bfbb-6f3b4ba8944f\",\"type\":\"BasicTicker\"}},\"id\":\"a264eee8-17f5-4015-8c57-fb5d92099f12\",\"type\":\"Grid\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"24d9f9d1-3504-475a-b9de-f24161f07df5\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"dcb9d958-a6df-4643-8a9b-c7e612352c56\",\"type\":\"BasicTicker\"}},\"id\":\"e6e4baba-8e16-49b6-9a49-a074b24f67d1\",\"type\":\"Grid\"},{\"attributes\":{\"formatter\":{\"id\":\"2f631666-840f-47c3-b2bf-faf7888293aa\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"24d9f9d1-3504-475a-b9de-f24161f07df5\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"dcb9d958-a6df-4643-8a9b-c7e612352c56\",\"type\":\"BasicTicker\"}},\"id\":\"50bc7186-31df-4e36-83bb-c73ca5cc7fee\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"dcb9d958-a6df-4643-8a9b-c7e612352c56\",\"type\":\"BasicTicker\"},{\"attributes\":{\"plot\":{\"id\":\"24d9f9d1-3504-475a-b9de-f24161f07df5\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"a3cab388-5da8-44e3-b368-876bfdb9cacb\",\"type\":\"SaveTool\"},{\"attributes\":{\"plot\":{\"id\":\"24d9f9d1-3504-475a-b9de-f24161f07df5\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"c13f14ac-a5d4-48d0-9651-c72e322abbfa\",\"type\":\"HelpTool\"},{\"attributes\":{\"plot\":{\"id\":\"24d9f9d1-3504-475a-b9de-f24161f07df5\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"32d750ac-0ada-4c42-a4cf-7868b015c45a\",\"type\":\"PanTool\"},{\"attributes\":{\"plot\":{\"id\":\"24d9f9d1-3504-475a-b9de-f24161f07df5\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"94173296-08dc-4a3e-bf1e-c257bcef4a98\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"overlay\":{\"id\":\"6f4bba63-019e-41b6-bc61-5fac5cb41a10\",\"type\":\"BoxAnnotation\"},\"plot\":{\"id\":\"24d9f9d1-3504-475a-b9de-f24161f07df5\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"97242fff-fc67-4388-9629-3989ec957d17\",\"type\":\"BoxZoomTool\"}],\"root_ids\":[\"24d9f9d1-3504-475a-b9de-f24161f07df5\"]},\"title\":\"Bokeh Application\",\"version\":\"0.12.5\"}};\n",
" var render_items = [{\"docid\":\"c98a7f9a-d96d-461f-b5d5-575ccb2df793\",\"elementid\":\"29e4d301-3a89-47dc-b70c-45d3bb065a57\",\"modelid\":\"24d9f9d1-3504-475a-b9de-f24161f07df5\"}];\n",
" \n",
" Bokeh.embed.embed_items(docs_json, render_items);\n",
" };\n",
" if (document.readyState != \"loading\") fn();\n",
" else document.addEventListener(\"DOMContentLoaded\", fn);\n",
" })();\n",
" },\n",
" function(Bokeh) {\n",
" }\n",
" ];\n",
" \n",
" function run_inline_js() {\n",
" \n",
" if ((window.Bokeh !== undefined) || (force === true)) {\n",
" for (var i = 0; i < inline_js.length; i++) {\n",
" inline_js[i](window.Bokeh);\n",
" }if (force === true) {\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 !== true) {\n",
" var cell = $(document.getElementById(\"29e4d301-3a89-47dc-b70c-45d3bb065a57\")).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": [
"f = figure()\n",
"f.circle('date', 'date', source=s)\n",
"output_notebook()\n",
"show(f)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"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=\"39bfc3e1-2268-4574-bb36-1ace8a5513a0\">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 = true;\n",
"\n",
" if (typeof (window._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n",
" window._bokeh_onload_callbacks = [];\n",
" window._bokeh_is_loading = undefined;\n",
" }\n",
"\n",
"\n",
" \n",
" if (typeof (window._bokeh_timeout) === \"undefined\" || force === true) {\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",
" var el = document.getElementById(\"39bfc3e1-2268-4574-bb36-1ace8a5513a0\");\n",
" el.textContent = \"BokehJS \" + Bokeh.version + \" 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(\"39bfc3e1-2268-4574-bb36-1ace8a5513a0\");\n",
" if (element == null) {\n",
" console.log(\"Bokeh: ERROR: autoload.js configured with elementid '39bfc3e1-2268-4574-bb36-1ace8a5513a0' 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.5.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.5.min.js\"];\n",
"\n",
" var inline_js = [\n",
" function(Bokeh) {\n",
" Bokeh.set_log_level(\"info\");\n",
" },\n",
" \n",
" function(Bokeh) {\n",
" \n",
" },\n",
" \n",
" function(Bokeh) {\n",
" \n",
" document.getElementById(\"39bfc3e1-2268-4574-bb36-1ace8a5513a0\").textContent = \"BokehJS is loading...\";\n",
" },\n",
" function(Bokeh) {\n",
" console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.12.5.min.css\");\n",
" Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.12.5.min.css\");\n",
" console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.5.min.css\");\n",
" Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.5.min.css\");\n",
" }\n",
" ];\n",
"\n",
" function run_inline_js() {\n",
" \n",
" if ((window.Bokeh !== undefined) || (force === true)) {\n",
" for (var i = 0; i < inline_js.length; i++) {\n",
" inline_js[i](window.Bokeh);\n",
" }if (force === true) {\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 !== true) {\n",
" var cell = $(document.getElementById(\"39bfc3e1-2268-4574-bb36-1ace8a5513a0\")).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"
},
{
"data": {
"text/html": [
"\n",
"\n",
" <div class=\"bk-root\">\n",
" <div class=\"bk-plotdiv\" id=\"85efde08-89af-42ec-abbd-9a684b829d2c\"></div>\n",
" </div>\n",
"<script type=\"text/javascript\">\n",
" \n",
" (function(global) {\n",
" function now() {\n",
" return new Date();\n",
" }\n",
" \n",
" var force = false;\n",
" \n",
" if (typeof (window._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n",
" window._bokeh_onload_callbacks = [];\n",
" window._bokeh_is_loading = undefined;\n",
" }\n",
" \n",
" \n",
" \n",
" if (typeof (window._bokeh_timeout) === \"undefined\" || force === true) {\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",
" var el = document.getElementById(\"85efde08-89af-42ec-abbd-9a684b829d2c\");\n",
" el.textContent = \"BokehJS \" + Bokeh.version + \" 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(\"85efde08-89af-42ec-abbd-9a684b829d2c\");\n",
" if (element == null) {\n",
" console.log(\"Bokeh: ERROR: autoload.js configured with elementid '85efde08-89af-42ec-abbd-9a684b829d2c' 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",
" (function() {\n",
" var fn = function() {\n",
" var docs_json = {\"2a6ef374-c98f-4cfd-b2a4-9367c91038ec\":{\"roots\":{\"references\":[{\"attributes\":{\"plot\":{\"id\":\"e81b39cc-44e3-4630-9490-2569ac778b34\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"030393be-1cd3-41f3-8a9d-bf98acb0c7af\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"0b6cb813-1abc-428e-a859-5224bea94dde\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"c6787306-893a-433f-bb31-57d7302ddcb0\",\"type\":\"ToolEvents\"},{\"attributes\":{\"plot\":{\"id\":\"e81b39cc-44e3-4630-9490-2569ac778b34\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"0b6cb813-1abc-428e-a859-5224bea94dde\",\"type\":\"BasicTicker\"}},\"id\":\"54bbafb2-8f2f-49f4-b4f2-b8ee89ab9670\",\"type\":\"Grid\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"C\",\"I\",\"date\",\"field\",\"treatment\",\"index\"],\"data\":{\"C\":[\"uyfyurf\",\"yfytf\",\"uyfdty\",\"adeff\"],\"I\":[\"20160917_abc\",\"20160917_def\",\"20160917_ghi\",\"20160917_jkl\"],\"date\":{\"__ndarray__\":\"cT0K16NwzT/NzMzMzMzcPwAAAAAAAOg/zczMzMzM9D8=\",\"dtype\":\"float64\",\"shape\":[4]},\"field\":[0,1,2,3],\"index\":[0,1,2,3],\"treatment\":[\"aa\",\"bb\",\"cc\",\"dd\"]}},\"id\":\"a287f0d7-5a38-4ea4-af6f-1e7e74c8eb0f\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"formatter\":{\"id\":\"42df7a60-0880-49af-9203-a26fc3eb3a3d\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"e81b39cc-44e3-4630-9490-2569ac778b34\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"0b6cb813-1abc-428e-a859-5224bea94dde\",\"type\":\"BasicTicker\"}},\"id\":\"cd034426-e8ef-4f0d-a5a5-ed93a0c67efc\",\"type\":\"LinearAxis\"},{\"attributes\":{\"overlay\":{\"id\":\"e3151a72-09f4-434f-8b50-2ef85171cc48\",\"type\":\"BoxAnnotation\"},\"plot\":{\"id\":\"e81b39cc-44e3-4630-9490-2569ac778b34\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"199ca86c-2371-4d0b-a290-1ebbc5d54ed2\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"plot\":{\"id\":\"e81b39cc-44e3-4630-9490-2569ac778b34\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"73c5a65d-c3ea-43a6-a879-536bff405f50\",\"type\":\"HelpTool\"},{\"attributes\":{\"data_source\":{\"id\":\"a287f0d7-5a38-4ea4-af6f-1e7e74c8eb0f\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"abd05e27-32c8-4c62-8fa5-78b638f16c00\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"77364b2c-2a30-422e-a676-26007951b341\",\"type\":\"Circle\"},\"selection_glyph\":null},\"id\":\"251dac72-0635-47fb-a9b5-c1b16470ffe1\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"plot\":{\"id\":\"e81b39cc-44e3-4630-9490-2569ac778b34\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"a87265f3-087b-4d2f-a7c4-2d3fd110b8a7\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"f02a2c45-8afd-4ffa-9ad4-2ad3b855632d\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"plot\":{\"id\":\"e81b39cc-44e3-4630-9490-2569ac778b34\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"9efa9493-2712-4b5c-b47e-ad6f6979abc6\",\"type\":\"PanTool\"},{\"attributes\":{\"plot\":{\"id\":\"e81b39cc-44e3-4630-9490-2569ac778b34\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"c2faaedc-50cb-41c0-835f-652d79c1a3a6\",\"type\":\"ResetTool\"},{\"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\":\"e3151a72-09f4-434f-8b50-2ef85171cc48\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"formatter\":{\"id\":\"f02a2c45-8afd-4ffa-9ad4-2ad3b855632d\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"e81b39cc-44e3-4630-9490-2569ac778b34\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"0651d384-eb98-4ea9-bb1d-0aa28b7b9c28\",\"type\":\"BasicTicker\"}},\"id\":\"4a9acab4-564c-4c5d-b564-1692a322ea20\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"0651d384-eb98-4ea9-bb1d-0aa28b7b9c28\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"42df7a60-0880-49af-9203-a26fc3eb3a3d\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"below\":[{\"id\":\"cd034426-e8ef-4f0d-a5a5-ed93a0c67efc\",\"type\":\"LinearAxis\"}],\"left\":[{\"id\":\"4a9acab4-564c-4c5d-b564-1692a322ea20\",\"type\":\"LinearAxis\"}],\"renderers\":[{\"id\":\"cd034426-e8ef-4f0d-a5a5-ed93a0c67efc\",\"type\":\"LinearAxis\"},{\"id\":\"54bbafb2-8f2f-49f4-b4f2-b8ee89ab9670\",\"type\":\"Grid\"},{\"id\":\"4a9acab4-564c-4c5d-b564-1692a322ea20\",\"type\":\"LinearAxis\"},{\"id\":\"4a51aeac-c8c9-49c8-97b4-30a038927bf9\",\"type\":\"Grid\"},{\"id\":\"e3151a72-09f4-434f-8b50-2ef85171cc48\",\"type\":\"BoxAnnotation\"},{\"id\":\"251dac72-0635-47fb-a9b5-c1b16470ffe1\",\"type\":\"GlyphRenderer\"}],\"title\":{\"id\":\"c385c7bb-b013-48de-b774-edfd30b09b2b\",\"type\":\"Title\"},\"tool_events\":{\"id\":\"c6787306-893a-433f-bb31-57d7302ddcb0\",\"type\":\"ToolEvents\"},\"toolbar\":{\"id\":\"7dc17550-304d-4bc0-8b54-cb1b321b1a63\",\"type\":\"Toolbar\"},\"x_range\":{\"id\":\"529832e7-5f37-410f-a587-bf1dcf8a55b3\",\"type\":\"DataRange1d\"},\"y_range\":{\"id\":\"847ba516-ed7f-46a7-81eb-26ac612c2554\",\"type\":\"DataRange1d\"}},\"id\":\"e81b39cc-44e3-4630-9490-2569ac778b34\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"plot\":null,\"text\":\"\"},\"id\":\"c385c7bb-b013-48de-b774-edfd30b09b2b\",\"type\":\"Title\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"x\":{\"field\":\"date\"},\"y\":{\"field\":\"date\"}},\"id\":\"77364b2c-2a30-422e-a676-26007951b341\",\"type\":\"Circle\"},{\"attributes\":{\"callback\":null},\"id\":\"529832e7-5f37-410f-a587-bf1dcf8a55b3\",\"type\":\"DataRange1d\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"e81b39cc-44e3-4630-9490-2569ac778b34\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"0651d384-eb98-4ea9-bb1d-0aa28b7b9c28\",\"type\":\"BasicTicker\"}},\"id\":\"4a51aeac-c8c9-49c8-97b4-30a038927bf9\",\"type\":\"Grid\"},{\"attributes\":{\"fill_color\":{\"value\":\"#1f77b4\"},\"line_color\":{\"value\":\"#1f77b4\"},\"x\":{\"field\":\"date\"},\"y\":{\"field\":\"date\"}},\"id\":\"abd05e27-32c8-4c62-8fa5-78b638f16c00\",\"type\":\"Circle\"},{\"attributes\":{\"callback\":null},\"id\":\"847ba516-ed7f-46a7-81eb-26ac612c2554\",\"type\":\"DataRange1d\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"9efa9493-2712-4b5c-b47e-ad6f6979abc6\",\"type\":\"PanTool\"},{\"id\":\"030393be-1cd3-41f3-8a9d-bf98acb0c7af\",\"type\":\"WheelZoomTool\"},{\"id\":\"199ca86c-2371-4d0b-a290-1ebbc5d54ed2\",\"type\":\"BoxZoomTool\"},{\"id\":\"a87265f3-087b-4d2f-a7c4-2d3fd110b8a7\",\"type\":\"SaveTool\"},{\"id\":\"c2faaedc-50cb-41c0-835f-652d79c1a3a6\",\"type\":\"ResetTool\"},{\"id\":\"73c5a65d-c3ea-43a6-a879-536bff405f50\",\"type\":\"HelpTool\"}]},\"id\":\"7dc17550-304d-4bc0-8b54-cb1b321b1a63\",\"type\":\"Toolbar\"}],\"root_ids\":[\"e81b39cc-44e3-4630-9490-2569ac778b34\"]},\"title\":\"Bokeh Application\",\"version\":\"0.12.5\"}};\n",
" var render_items = [{\"docid\":\"2a6ef374-c98f-4cfd-b2a4-9367c91038ec\",\"elementid\":\"85efde08-89af-42ec-abbd-9a684b829d2c\",\"modelid\":\"e81b39cc-44e3-4630-9490-2569ac778b34\"}];\n",
" \n",
" Bokeh.embed.embed_items(docs_json, render_items);\n",
" };\n",
" if (document.readyState != \"loading\") fn();\n",
" else document.addEventListener(\"DOMContentLoaded\", fn);\n",
" })();\n",
" },\n",
" function(Bokeh) {\n",
" }\n",
" ];\n",
" \n",
" function run_inline_js() {\n",
" \n",
" if ((window.Bokeh !== undefined) || (force === true)) {\n",
" for (var i = 0; i < inline_js.length; i++) {\n",
" inline_js[i](window.Bokeh);\n",
" }if (force === true) {\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 !== true) {\n",
" var cell = $(document.getElementById(\"85efde08-89af-42ec-abbd-9a684b829d2c\")).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": [
"f2 = figure()\n",
"f2.circle('date', 'date', source=s_with_field_column)\n",
"output_notebook()\n",
"show(f2)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'0.20.1'"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pd.__version__"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'0.12.5'"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import bokeh \n",
"bokeh.__version__"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Darwin mac-almf4.wlan.embl.de 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64\r\n"
]
}
],
"source": [
"!uname -a"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'python' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-10-371b8c7a7c2c>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mpython\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__version__\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mNameError\u001b[0m: name 'python' is not defined"
]
}
],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.6.0"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment