{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Trump Golf Statistics" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This site keeps Trump's Golf statistics." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import IPython\n", "url=\"http://trumpgolfcount.com/#page-top\"\n", "IPython.display.HTML('')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "They thoughtfully provide a json stream but it is not self-descriptive. Thankfully they have a comma separated value (csv) link the includes headers." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Get and Wrangle the Date\n", "\n", "First we pull down the data and do a bit of wrangling on it." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import requests\n", "csvUrl=\"http://trumpgolfcount.com/downloadoutings\"\n", "golfCsv=requests.get(csvUrl).text\n", "import pandas as pd\n", "from io import StringIO\n", "with StringIO(golfCsv) as sioCsv:\n", " gDf=pd.DataFrame.from_csv(sioCsv)\n", "gDf.sort_index(inplace=True)\n", "gDf['Arrival Time']=pd.to_datetime(gDf['Arrival Time'])\n", "gDf['Depart Time']=pd.to_datetime(gDf['Depart Time'])\n", "gDf['ndDays']=gDf.reset_index()['Golf Date'].diff().fillna(pd.Timedelta(1)).values\n", "gDf['ndDays']=gDf['ndDays'].apply(lambda x: x.days)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Plot the Data\n", "\n", "I am going to play a bit with ```bokeh``` here. Yet another graphics library ot learn. However, this one is web native so maybe it will be worth it." ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "from bokeh.io import show" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
\n", " \n", " Loading BokehJS ...\n", "
" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", "(function(root) {\n", " function now() {\n", " return new Date();\n", " }\n", "\n", " var force = true;\n", "\n", " if (typeof (root._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n", " root._bokeh_onload_callbacks = [];\n", " root._bokeh_is_loading = undefined;\n", " }\n", "\n", " var JS_MIME_TYPE = 'application/javascript';\n", " var HTML_MIME_TYPE = 'text/html';\n", " var EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", " var CLASS_NAME = 'output_bokeh rendered_html';\n", "\n", " /**\n", " * Render data to the DOM node\n", " */\n", " function render(props, node) {\n", " var script = document.createElement(\"script\");\n", " node.appendChild(script);\n", " }\n", "\n", " /**\n", " * Handle when an output is cleared or removed\n", " */\n", " function handleClearOutput(event, handle) {\n", " var cell = handle.cell;\n", "\n", " var id = cell.output_area._bokeh_element_id;\n", " var server_id = cell.output_area._bokeh_server_id;\n", " // Clean up Bokeh references\n", " if (id !== undefined) {\n", " Bokeh.index[id].model.document.clear();\n", " delete Bokeh.index[id];\n", " }\n", "\n", " if (server_id !== undefined) {\n", " // Clean up Bokeh references\n", " var cmd = \"from bokeh.io import _state; print(_state.uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n", " cell.notebook.kernel.execute(cmd, {\n", " iopub: {\n", " output: function(msg) {\n", " var element_id = msg.content.text.trim();\n", " Bokeh.index[element_id].model.document.clear();\n", " delete Bokeh.index[element_id];\n", " }\n", " }\n", " });\n", " // Destroy server and session\n", " var cmd = \"from bokeh import io; io._destroy_server('\" + server_id + \"')\";\n", " cell.notebook.kernel.execute(cmd);\n", " }\n", " }\n", "\n", " /**\n", " * Handle when a new output is added\n", " */\n", " function handleAddOutput(event, handle) {\n", " var output_area = handle.output_area;\n", " var output = handle.output;\n", "\n", " // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n", " if ((output.output_type != \"display_data\") || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n", " return\n", " }\n", "\n", " var toinsert = output_area.element.find(`.${CLASS_NAME.split(' ')[0]}`);\n", "\n", " if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n", " toinsert[0].firstChild.textContent = output.data[JS_MIME_TYPE];\n", " // store reference to embed id on output_area\n", " output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", " }\n", " if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", " var bk_div = document.createElement(\"div\");\n", " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", " var script_attrs = bk_div.children[0].attributes;\n", " for (var i = 0; i < script_attrs.length; i++) {\n", " toinsert[0].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n", " }\n", " // store reference to server id on output_area\n", " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", " }\n", " }\n", "\n", " function register_renderer(events, OutputArea) {\n", "\n", " function append_mime(data, metadata, element) {\n", " // create a DOM node to render to\n", " var toinsert = this.create_output_subarea(\n", " metadata,\n", " CLASS_NAME,\n", " EXEC_MIME_TYPE\n", " );\n", " this.keyboard_manager.register_events(toinsert);\n", " // Render to node\n", " var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", " render(props, toinsert[0]);\n", " element.append(toinsert);\n", " return toinsert\n", " }\n", "\n", " /* Handle when an output is cleared or removed */\n", " events.on('clear_output.CodeCell', handleClearOutput);\n", " events.on('delete.Cell', handleClearOutput);\n", "\n", " /* Handle when a new output is added */\n", " events.on('output_added.OutputArea', handleAddOutput);\n", "\n", " /**\n", " * Register the mime type and append_mime function with output_area\n", " */\n", " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", " /* Is output safe? */\n", " safe: true,\n", " /* Index of renderer in `output_area.display_order` */\n", " index: 0\n", " });\n", " }\n", "\n", " // register the mime type if in Jupyter Notebook environment and previously unregistered\n", " if (root.Jupyter !== undefined) {\n", " var events = require('base/js/events');\n", " var OutputArea = require('notebook/js/outputarea').OutputArea;\n", "\n", " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", " register_renderer(events, OutputArea);\n", " }\n", " }\n", "\n", " \n", " if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n", " root._bokeh_timeout = Date.now() + 5000;\n", " root._bokeh_failed_load = false;\n", " }\n", "\n", " var NB_LOAD_WARNING = {'data': {'text/html':\n", " \"
\\n\"+\n", " \"

\\n\"+\n", " \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n", " \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n", " \"

\\n\"+\n", " \"\\n\"+\n", " \"\\n\"+\n", " \"from bokeh.resources import INLINE\\n\"+\n", " \"output_notebook(resources=INLINE)\\n\"+\n", " \"\\n\"+\n", " \"
\"}};\n", "\n", " function display_loaded() {\n", " var el = document.getElementById(\"263cef26-7e57-444b-9fd2-46ce9ddde8c1\");\n", " if (el != null) {\n", " el.textContent = \"BokehJS is loading...\";\n", " }\n", " if (root.Bokeh !== undefined) {\n", " if (el != null) {\n", " el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n", " }\n", " } else if (Date.now() < root._bokeh_timeout) {\n", " setTimeout(display_loaded, 100)\n", " }\n", " }\n", "\n", "\n", " function run_callbacks() {\n", " try {\n", " root._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n", " }\n", " finally {\n", " delete root._bokeh_onload_callbacks\n", " }\n", " console.info(\"Bokeh: all callbacks have finished\");\n", " }\n", "\n", " function load_libs(js_urls, callback) {\n", " root._bokeh_onload_callbacks.push(callback);\n", " if (root._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", " root._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", " root._bokeh_is_loading--;\n", " if (root._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(\"263cef26-7e57-444b-9fd2-46ce9ddde8c1\");\n", " if (element == null) {\n", " console.log(\"Bokeh: ERROR: autoload.js configured with elementid '263cef26-7e57-444b-9fd2-46ce9ddde8c1' 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.9.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.9.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.9.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-0.12.9.min.js\"];\n", "\n", " var inline_js = [\n", " function(Bokeh) {\n", " Bokeh.set_log_level(\"info\");\n", " },\n", " \n", " function(Bokeh) {\n", " \n", " },\n", " function(Bokeh) {\n", " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.12.9.min.css\");\n", " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.12.9.min.css\");\n", " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.9.min.css\");\n", " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.9.min.css\");\n", " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.9.min.css\");\n", " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.9.min.css\");\n", " }\n", " ];\n", "\n", " function run_inline_js() {\n", " \n", " if ((root.Bokeh !== undefined) || (force === true)) {\n", " for (var i = 0; i < inline_js.length; i++) {\n", " inline_js[i].call(root, root.Bokeh);\n", " }if (force === true) {\n", " display_loaded();\n", " }} else if (Date.now() < root._bokeh_timeout) {\n", " setTimeout(run_inline_js, 100);\n", " } else if (!root._bokeh_failed_load) {\n", " console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n", " root._bokeh_failed_load = true;\n", " } else if (force !== true) {\n", " var cell = $(document.getElementById(\"263cef26-7e57-444b-9fd2-46ce9ddde8c1\")).parents('.cell').data().cell;\n", " cell.output_area.append_execute_result(NB_LOAD_WARNING)\n", " }\n", "\n", " }\n", "\n", " if (root._bokeh_is_loading === 0) {\n", " console.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", "}(window));" ], "application/vnd.bokehjs_load.v0+json": "\n(function(root) {\n function now() {\n return new Date();\n }\n\n var force = true;\n\n if (typeof (root._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\n \n\n \n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n var NB_LOAD_WARNING = {'data': {'text/html':\n \"
\\n\"+\n \"

\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"

\\n\"+\n \"\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\n\n function display_loaded() {\n var el = document.getElementById(\"263cef26-7e57-444b-9fd2-46ce9ddde8c1\");\n if (el != null) {\n el.textContent = \"BokehJS is loading...\";\n }\n if (root.Bokeh !== undefined) {\n if (el != null) {\n el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(display_loaded, 100)\n }\n }\n\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n }\n finally {\n delete root._bokeh_onload_callbacks\n }\n console.info(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(js_urls, callback) {\n root._bokeh_onload_callbacks.push(callback);\n if (root._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 root._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 root._bokeh_is_loading--;\n if (root._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(\"263cef26-7e57-444b-9fd2-46ce9ddde8c1\");\n if (element == null) {\n console.log(\"Bokeh: ERROR: autoload.js configured with elementid '263cef26-7e57-444b-9fd2-46ce9ddde8c1' 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.9.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.9.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.9.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-0.12.9.min.js\"];\n\n var inline_js = [\n function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\n \n function(Bokeh) {\n \n },\n function(Bokeh) {\n console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.12.9.min.css\");\n Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.12.9.min.css\");\n console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.9.min.css\");\n Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.9.min.css\");\n console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.9.min.css\");\n Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.9.min.css\");\n }\n ];\n\n function run_inline_js() {\n \n if ((root.Bokeh !== undefined) || (force === true)) {\n for (var i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }if (force === true) {\n display_loaded();\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n var cell = $(document.getElementById(\"263cef26-7e57-444b-9fd2-46ce9ddde8c1\")).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n\n }\n\n if (root._bokeh_is_loading === 0) {\n console.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}(window));" }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "
\n", "
\n", "
" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "(function(root) {\n", " function embed_document(root) {\n", " var docs_json = {\"06563c2a-02e6-4086-bcb7-284e8ce04a33\":{\"roots\":{\"references\":[{\"attributes\":{\"callback\":null},\"id\":\"381c50f2-eccb-4c2f-ab70-671f976e62d2\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"aee44492-97ee-4082-96d9-4e09ca8dddcd\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"months\":[0,1,2,3,4,5,6,7,8,9,10,11]},\"id\":\"41e39cfb-7155-488c-a2be-d0709e647455\",\"type\":\"MonthsTicker\"},{\"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\":\"e3ddd8a1-54d1-4a48-aba8-7eda2655ae87\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"plot\":null,\"text\":\"Preceeding Days with no Trump Golf\"},\"id\":\"ce2f8d56-1be3-48a6-a24d-3cb79b31fcc2\",\"type\":\"Title\"},{\"attributes\":{\"days\":[1,8,15,22]},\"id\":\"0944fc31-cd25-4182-9aba-46d4fbb67459\",\"type\":\"DaysTicker\"},{\"attributes\":{\"months\":[0,2,4,6,8,10]},\"id\":\"39b0a70e-4982-4e8d-b698-8ce70cb68818\",\"type\":\"MonthsTicker\"},{\"attributes\":{\"plot\":{\"id\":\"50a43170-2608-4398-858d-c82cac4e576a\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"2bd2b3be-bf2d-4c44-876d-32b0283e529f\",\"type\":\"DatetimeTicker\"}},\"id\":\"adb45ca5-ef45-42b3-ac04-ae642e9564a4\",\"type\":\"Grid\"},{\"attributes\":{\"num_minor_ticks\":5,\"tickers\":[{\"id\":\"9e789526-0d91-4304-aaa9-0f5a97ff7115\",\"type\":\"AdaptiveTicker\"},{\"id\":\"16f78fb9-a2af-4040-93e5-7f06c626d508\",\"type\":\"AdaptiveTicker\"},{\"id\":\"b7f245c1-a77a-4b5a-937a-06db0aa78db9\",\"type\":\"AdaptiveTicker\"},{\"id\":\"19ce1f85-c4d9-452d-8b5f-97f5ee7ffa1f\",\"type\":\"DaysTicker\"},{\"id\":\"0bf230da-f47c-43c2-9299-cc7aedae1685\",\"type\":\"DaysTicker\"},{\"id\":\"0944fc31-cd25-4182-9aba-46d4fbb67459\",\"type\":\"DaysTicker\"},{\"id\":\"d26623fe-eb56-45c7-a283-2da62a4f3267\",\"type\":\"DaysTicker\"},{\"id\":\"41e39cfb-7155-488c-a2be-d0709e647455\",\"type\":\"MonthsTicker\"},{\"id\":\"39b0a70e-4982-4e8d-b698-8ce70cb68818\",\"type\":\"MonthsTicker\"},{\"id\":\"d14fe0ca-9faa-49e6-8e6c-78a0c454c1e6\",\"type\":\"MonthsTicker\"},{\"id\":\"7cb67bdb-7aac-421b-911b-789651295a14\",\"type\":\"MonthsTicker\"},{\"id\":\"25b695c2-8c9c-4008-9338-92fcfa3c4728\",\"type\":\"YearsTicker\"}]},\"id\":\"2bd2b3be-bf2d-4c44-876d-32b0283e529f\",\"type\":\"DatetimeTicker\"},{\"attributes\":{\"data_source\":{\"id\":\"9df09ec4-7f7e-48d6-ad16-409800298e01\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"646eb8db-2253-418d-8574-3ebd5287a85b\",\"type\":\"VBar\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"47d10a50-1065-4a51-bbbd-7255536342a0\",\"type\":\"VBar\"},\"selection_glyph\":null,\"view\":{\"id\":\"2b561abf-ae89-4f39-85f4-592e73ae3c0a\",\"type\":\"CDSView\"}},\"id\":\"e7dffdde-b4fe-4a79-8eed-f3265f4a042d\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"df6a0582-79cc-4749-9be8-5ea3f5ef9954\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"10a3c33e-19d5-433c-9e21-dbc8606b1b24\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"de7e6725-86bc-42b5-86bb-1d640fc831f5\",\"type\":\"HelpTool\"},{\"attributes\":{\"base\":60,\"mantissas\":[1,2,5,10,15,20,30],\"max_interval\":1800000.0,\"min_interval\":1000.0,\"num_minor_ticks\":0},\"id\":\"16f78fb9-a2af-4040-93e5-7f06c626d508\",\"type\":\"AdaptiveTicker\"},{\"attributes\":{\"fill_color\":{\"value\":\"#1f77b4\"},\"line_color\":{\"value\":\"#1f77b4\"},\"top\":{\"field\":\"ndDays\"},\"width\":{\"value\":1},\"x\":{\"field\":\"Golf Date\"}},\"id\":\"646eb8db-2253-418d-8574-3ebd5287a85b\",\"type\":\"VBar\"},{\"attributes\":{\"overlay\":{\"id\":\"e3ddd8a1-54d1-4a48-aba8-7eda2655ae87\",\"type\":\"BoxAnnotation\"}},\"id\":\"5e6aec8b-aa7f-488b-b921-19220a9f9949\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"50a43170-2608-4398-858d-c82cac4e576a\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"7444480b-6e53-4f99-99bb-5c9ed48d88a0\",\"type\":\"BasicTicker\"}},\"id\":\"648cf56e-5824-432a-a7b5-cc41060bedd8\",\"type\":\"Grid\"},{\"attributes\":{\"callback\":null},\"id\":\"4d210c1d-3389-4d35-b09d-08699ba5a189\",\"type\":\"DataRange1d\"},{\"attributes\":{\"days\":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]},\"id\":\"19ce1f85-c4d9-452d-8b5f-97f5ee7ffa1f\",\"type\":\"DaysTicker\"},{\"attributes\":{\"below\":[{\"id\":\"079d486a-f129-4c64-8d13-b6cae02943b6\",\"type\":\"DatetimeAxis\"}],\"left\":[{\"id\":\"a777abe7-2326-46f6-b4f7-a92b21268287\",\"type\":\"LinearAxis\"}],\"plot_height\":300,\"plot_width\":550,\"renderers\":[{\"id\":\"079d486a-f129-4c64-8d13-b6cae02943b6\",\"type\":\"DatetimeAxis\"},{\"id\":\"adb45ca5-ef45-42b3-ac04-ae642e9564a4\",\"type\":\"Grid\"},{\"id\":\"a777abe7-2326-46f6-b4f7-a92b21268287\",\"type\":\"LinearAxis\"},{\"id\":\"648cf56e-5824-432a-a7b5-cc41060bedd8\",\"type\":\"Grid\"},{\"id\":\"e3ddd8a1-54d1-4a48-aba8-7eda2655ae87\",\"type\":\"BoxAnnotation\"},{\"id\":\"e7dffdde-b4fe-4a79-8eed-f3265f4a042d\",\"type\":\"GlyphRenderer\"},{\"id\":\"fdbf9312-8d14-4a05-96c9-ffb0a22d95c7\",\"type\":\"Span\"},{\"id\":\"58482910-1d58-4622-a42c-72213b89ce95\",\"type\":\"Label\"}],\"title\":{\"id\":\"ce2f8d56-1be3-48a6-a24d-3cb79b31fcc2\",\"type\":\"Title\"},\"toolbar\":{\"id\":\"d2d7615b-851f-488a-9650-b2f6cdf26666\",\"type\":\"Toolbar\"},\"x_range\":{\"id\":\"381c50f2-eccb-4c2f-ab70-671f976e62d2\",\"type\":\"DataRange1d\"},\"x_scale\":{\"id\":\"415b73c2-7585-4af2-88f1-20570224e909\",\"type\":\"LinearScale\"},\"y_range\":{\"id\":\"4d210c1d-3389-4d35-b09d-08699ba5a189\",\"type\":\"DataRange1d\"},\"y_scale\":{\"id\":\"1b59fd2e-fd75-4f78-89eb-177450eb0480\",\"type\":\"LinearScale\"}},\"id\":\"50a43170-2608-4398-858d-c82cac4e576a\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"4b517c53-aac7-4167-b188-b459faf6a2c0\",\"type\":\"DatetimeTickFormatter\"},{\"attributes\":{\"source\":{\"id\":\"9df09ec4-7f7e-48d6-ad16-409800298e01\",\"type\":\"ColumnDataSource\"}},\"id\":\"2b561abf-ae89-4f39-85f4-592e73ae3c0a\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1b59fd2e-fd75-4f78-89eb-177450eb0480\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"01710505-7523-4659-a04b-09e7f47e2d29\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"Golf Date\",\"Comment\",\"Sighted Golfing?\",\"Arrival Time\",\"ndDays\",\"Arrival Source\",\"Depart Time\",\"index\",\"Depart Source\",\"Golfing Source\",\"Club\"],\"data\":{\"Arrival Source\":[\"https://twitter.com/markknoller/status/827966015808081920\",\"_http://publicpool.kinja.com/subject-travel-pool-1-golf-club-1792015480\",\"_http://publicpool.kinja.com/subject-print-travel-pool-report-3-1792253007\",\"_http://publicpool.kinja.com/subject-print-travel-pool-report-5-1792257528\",\"_http://publicpool.kinja.com/subject-print-travel-pool-report-1-1792269814\",\"_http://publicpool.kinja.com/subject-2-18-travel-pool-1-1792511186\",\"_http://publicpool.kinja.com/subject-pool-report-4-1792533166\",\"_http://publicpool.kinja.com/subject-print-travel-pool-report-3-1792968675\",\"_http://publicpool.kinja.com/subject-travel-pool-report-2-golf-1792984718\",\"_http://publicpool.kinja.com/subject-pool-report-3-1793186515\",\"https://twitter.com/markknoller/status/843099239639105536\",\"_http://publicpool.kinja.com/subject-out-of-town-pool-report-1-1793417353\",\"_http://publicpool.kinja.com/subject-in-town-pool-3-1793636839\",\"_http://publicpool.kinja.com/subject-pool-report-no-2-arrival-trump-national-golf-1793652428\",\"_http://publicpool.kinja.com/subject-in-town-pool-report-3-1793935576\",\"_http://publicpool.kinja.com/subject-mar-a-lago-pool-report-no-2-1794137973\",\"_http://publicpool.kinja.com/subject-sunday-print-pool-report-2-1794152209\",\"http://publicpool.kinja.com/subject-pool-report-1-1794326997\",\"http://publicpool.kinja.com/subject-wh-pool-report-1-1794352137\",\"http://publicpool.kinja.com/subject-wh-pool-report-3-1794782494\",\"http://publicpool.kinja.com/subject-travel-pool-1-potus-at-bedminster-1794954390\",\"http://publicpool.kinja.com/subject-daily-guidance-and-press-schedule-for-saturday-1794976389\",\"http://publicpool.kinja.com/subject-updated-daily-guidance-and-press-schedule-for-1794990499\",\"http://publicpool.kinja.com/subject-pool-report-2-1795202720\",\"http://publicpool.kinja.com/subject-in-town-pool-report-2-1795784391\",\"http://publicpool.kinja.com/subject-in-town-pool-report-2-1795796133\",\"http://publicpool.kinja.com/subject-daily-guidance-and-press-schedule-for-saturday-1795978292\",\"http://publicpool.kinja.com/subject-daily-guidance-and-press-schedule-for-sunday-1795992877\",\"http://publicpool.kinja.com/subject-pool-report-2-arrival-at-trump-national-va-1796390670\",\"http://publicpool.kinja.com/subject-pool-report-2-golf-1796400277\",\"http://publicpool.kinja.com/subject-daily-guidance-and-press-schedule-for-saturday-1796567287\",\"http://publicpool.kinja.com/subject-updated-daily-guidance-and-press-schedule-for-1796582194\",\"http://publicpool.kinja.com/subject-updated-daily-guidance-and-press-schedule-for-1796598878\",\"http://publicpool.kinja.com/subject-pool-report-3-1796620897\",\"http://publicpool.kinja.com/subject-in-town-pool-report-2-1796753480\",\"http://publicpool.kinja.com/subject-new-jersey-pool-report-2-arrival-at-bedmins-1796931375\",\"http://publicpool.kinja.com/subject-bedminster-pool-report-2-potus-arrives-1796949429\",\"http://publicpool.kinja.com/subject-bedminster-7-16-pool-report-5-1796963207\",\"http://publicpool.kinja.com/subject-travel-pool-report-8-arrival-at-gold-club-1797157488\",\"http://publicpool.kinja.com/subject-in-town-pool-report-2-1797169806\",\"http://publicpool.kinja.com/subject-pool-report-1-1797374212\",\"http://publicpool.kinja.com/subject-travel-print-pool-report-1-lunch-lid-news-1797562078\",\"http://publicpool.kinja.com/subject-travel-pool-report-1-1797575074\",\"http://publicpool.kinja.com/subject-pool-report-1-1797591709\",\"http://publicpool.kinja.com/subject-daily-guidance-and-press-schedule-for-tuesday-1797618711\",\"http://publicpool.kinja.com/subject-travel-pool-1-1797676040\",\"http://publicpool.kinja.com/subject-daily-guidance-and-press-schedule-for-thursday-1797699774\",\"https://publicpool.kinja.com/subject-daily-guidance-and-press-schedule-for-friday-1797737933\",\"http://publicpool.kinja.com/subject-daily-guidance-and-press-schedule-for-saturday-1797770509\",\"http://publicpool.kinja.com/subject-daily-guidance-and-press-schedule-for-sunday-1797791752\",\"http://publicpool.kinja.com/subject-wh-travel-pool-report-8-1797914911\",\"http://publicpool.kinja.com/subject-daily-guidance-and-press-schedule-for-thursday-1797919003\",\"http://publicpool.kinja.com/subject-travel-pool-report-8-1797990692\",\"http://publicpool.kinja.com/subject-daily-guidance-and-press-schedule-for-saturday-1798023258\",\"http://publicpool.kinja.com/subject-daily-guidance-and-press-schedule-for-sunday-1798082596\",\"http://publicpool.kinja.com/subject-daily-guidance-and-press-schedule-for-saturday-1817176017\",\"http://publicpool.kinja.com/subject-daily-guidance-and-press-schedule-for-sunday-1818480725\",\"http://publicpool.kinja.com/subject-daily-guidance-and-press-schedule-for-friday-1818644365\",\"http://publicpool.kinja.com/subject-daily-guidance-and-press-schedule-for-saturday-1818683550\",\"http://publicpool.kinja.com/subject-updated-daily-guidance-and-press-schedule-for-1818697148\",\"http://publicpool.kinja.com/subject-travel-pool-report-3-lid-1819010800\",\"http://publicpool.kinja.com/subject-daily-guidance-and-press-schedule-for-saturday-1819015990\",\"http://publicpool.kinja.com/subject-updated-daily-guidance-and-press-schedule-for-1819032239\",\"http://publicpool.kinja.com/subject-travel-pool-report-5-golf-1819040093\",\"http://publicpool.kinja.com/subject-pool-report-2-1819244757\"],\"Arrival Time\":{\"__ndarray__\":\"AABOg4egdUIAACqR2aB1QgAABOXHonVCAAAQfdiidUIAABolF6N1QgAAkqwGpXVCAADceFmldUIAAMQ9iql1QgAAFuXbqXVCAAAqEdardUIAAFibDK51QgAAPmZbrnVCAAAeBlKwdUIAANCXpLB1QgAAGDvksnVCAABm88y0dUIAAKjkILV1QgAArCO+tnVCAAAcVQ23dUIAAN4p6rt1QgAAQH9evXVCAAAA5bC9dUIAAMBKA751QgAA0DxowHVCAABMwtjGdUIAAFwJJ8d1QgAAQM70yHVCAAAANEfJdUIAAHrZm811QgAAupXqzXVCAAAAJ7fPdUIAAMCMCdB1QgAAgPJb0HVCAAAEkNDQdUIAACR3bdJ1QgAAVu8b1HVCAAD+cGrUdUIAAPo9v9R1QgAAhj+o1nVCAADOg+7WdUIAAIzALdl1QgAAQBD72nVCAAAAdk3bdUIAAMDbn9t1QgAAgEHy23VCAABAp0TcdUIAAAANl9x1QgAAwHLp3HVCAACA2DvddUIAAEA+jt11QgAAgLS43nVCAABA1dfedUIAALjMZ991QgAAwKB833VCAACABs/fdUIAAMDBf+h1QgAAgCfS6HVCAABAJG7qdUIAAACKwOp1QgAAwO8S63VCAABUJuzsdUIAAEBSAe11QgAAALhT7XVCAABKOIntdUIAAPg0ZO91Qg==\",\"dtype\":\"float64\",\"shape\":[65]},\"Club\":[\"Trump Intl, West Palm Beach, FL\",\"Trump Intl, West Palm Beach, FL\",\"Trump Natl, Jupiter, FL\",\"Trump Intl, West Palm Beach, FL\",\"Trump Natl, Jupiter, FL\",\"Trump Intl, West Palm Beach, FL\",\"Trump Intl, West Palm Beach, FL\",\"Trump Intl, West Palm Beach, FL\",\"Trump Intl, West Palm Beach, FL\",\"Trump Natl, Potomac Falls, VA\",\"Trump Intl, West Palm Beach, FL\",\"Trump Intl, West Palm Beach, FL\",\"Trump Natl, Potomac Falls, VA\",\"Trump Natl, Potomac Falls, VA\",\"Trump Natl, Potomac Falls, VA\",\"Trump Intl, West Palm Beach, FL\",\"Trump Intl, West Palm Beach, FL\",\"Trump Intl, West Palm Beach, FL\",\"Trump Intl, West Palm Beach, FL\",\"Trump Natl, Potomac Falls, VA\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Potomac Falls, VA\",\"Trump Natl, Potomac Falls, VA\",\"Trump Natl, Potomac Falls, VA\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Potomac Falls, VA\",\"Trump Natl, Potomac Falls, VA\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Potomac Falls, VA\",\"Trump Natl, Potomac Falls, VA\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Potomac Falls, VA\",\"Trump Natl, Potomac Falls, VA\",\"Trump Natl, Potomac Falls, VA\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Trump Natl, Bedminster, NJ\",\"Liberty Natl, Jersey City, NJ\",\"Trump Natl, Potomac Falls, VA\"],\"Comment\":[\"Frost and Trump vs. Nieporte and Arrigo\",\"NaN\",\"18 holes with Shinzo Abe\",\"9 more holes with Ernie Els\",\"NaN\",\"\\\"Played a couple\\\"\",\"18 holes with McIlroy & O'Neill\",\"Wiretap tweet\",\"With David and Sean Frost\",\"Cabinet meeting\",\"Glove picture\",\"NaN\",\"18 holes, cleats picture\",\"Watching golf\",\"With Paul and Mulvaney\",\"Post President Xi visit\",\"\\\"back next week\\\"\",\"Good Friday Golf\",\"Amid tax march protests\",\"Don't ask, don't tell\",\"\\\"Working out of my home\\\"\",\"Motorcade of protesters\",\"\\\"Meetings!\\\"\",\"Ditching Melania on Mother's Day\",\"Skipping his own rally\",\"With Corker and Manning\",\"With Kirk Cousins\",\"Presidential golf cart spotted\",\"\\\"Not golfing\\\" with father-in-law\",\"Playing through\",\"Rainy day in the bathroom?\",\"NaN\",\"Enjoying an ice cream cone\",\"NaN\",\"NaN\",\"U.S. Womens Open\",\"In his glass enclosed box\",\"Ultraviolet protests\",\"Lunch during a thunderstorm\",\"NaN\",\"Trump is \\\"weak and sniveling\\\"\",\"\\\"This is not a vacation\\\"\",\"NaN\",\"Rainy day Twitter storm\",\"NaN\",\"With a \\\"random person\\\"\",\"Under Russian spy jets\",\"\\\"locked and loaded\\\"\",\"NaN\",\"NaN\",\"More golf, less talk?\",\"Dining with \\\"biggest donors\\\"\",\"Back from Camp David\",\"NaN\",\"The vacation ends\",\"NaN\",\"Retweeting childish Hillary GIF\",\"NaN\",\"Disinviting Stephen Curry\",\"While urging NFL boycott\",\"NaN\",\"Insulting disaster victims\",\"NaN\",\"Presidents Cup\",\"Dressed for golf\"],\"Depart Source\":[\"_http://publicpool.kinja.com/subject-wh-travel-pool-report-5-1792001789\",\"_http://publicpool.kinja.com/subject-travel-pool-3-departing-trump-international-1792019219\",\"_http://publicpool.kinja.com/subject-print-travel-pool-report-4-1792256285\",\"_http://publicpool.kinja.com/subject-print-travel-pool-report-7-1792259064\",\"_http://publicpool.kinja.com/subject-2-18-travel-pool-2-1792515075\",\"_http://publicpool.kinja.com/subject-2-18-travel-pool-2-1792515075\",\"_http://publicpool.kinja.com/subject-pool-report-4-1792533166\",\"_http://publicpool.kinja.com/subject-print-travel-pool-report-4-1792971903\",\"_http://publicpool.kinja.com/subject-travel-pool-report-3-golf-club-depart-1792987436\",\"_http://publicpool.kinja.com/subject-pool-report-5-1793187992\",\"_http://publicpool.kinja.com/subject-pool-report-5-1793406302\",\"_http://publicpool.kinja.com/subject-out-of-town-pool-report-3-1793419961\",\"_http://publicpool.kinja.com/subject-in-town-pool-6-1793641392\",\"_http://publicpool.kinja.com/subject-pool-report-no-4-departing-club-1793653360\",\"http://publicpool.kinja.com/subject-in-town-pool-report-7-1793939369\",\"_http://publicpool.kinja.com/subject-mar-a-lago-pool-report-no-3-1794141922\",\"http://publicpool.kinja.com/subject-sunday-print-pool-report-3-1794155418\",\"http://publicpool.kinja.com/subject-pool-report-2-1794335954\",\"http://publicpool.kinja.com/subject-wh-pool-report-2-1794356466\",\"http://publicpool.kinja.com/subject-wh-pool-report-4-1794785857\",\"http://publicpool.kinja.com/subject-travel-pool-1-potus-at-bedminster-1794954390\",\"http://publicpool.kinja.com/subject-travel-pool-report-1-1794982970\",\"http://publicpool.kinja.com/subject-travel-pool-1-pool-rolling-1795001924\",\"http://publicpool.kinja.com/subject-pool-report-4-1795206641\",\"http://publicpool.kinja.com/subject-in-town-pool-report-3-1795786847\",\"http://publicpool.kinja.com/subject-in-town-pool-report-3-1795798554\",\"http://publicpool.kinja.com/subject-out-of-town-2-travel-photo-lid-1795988270\",\"http://publicpool.kinja.com/subject-travel-pool-report-4-newark-1796003786\",\"http://publicpool.kinja.com/subject-pool-report-3-leaving-trump-national-1796392274\",\"http://publicpool.kinja.com/subject-pool-report-3-departing-golf-club-1796402538\",\"http://publicpool.kinja.com/subject-travel-pool-1-departing-bedminster-1796579588\",\"http://publicpool.kinja.com/subject-travel-pool-report-1-travel-photo-lid-1796592750\",\"http://publicpool.kinja.com/subject-travel-pool-report-2-departure-for-andrews-1796611578\",\"http://publicpool.kinja.com/subject-pool-report-4-1796623627\",\"http://publicpool.kinja.com/subject-in-town-pool-report-4-1796756600\",\"http://publicpool.kinja.com/subject-daily-guidance-and-press-schedule-for-saturday-1796937919\",\"http://publicpool.kinja.com/subject-new-jersey-pool-report-6-1796952535\",\"http://publicpool.kinja.com/subject-bedminster-7-16-pool-report-1796966434\",\"http://publicpool.kinja.com/subject-travel-pool-10-1797161114\",\"http://publicpool.kinja.com/subject-in-town-pool-report-5-1797172375\",\"http://publicpool.kinja.com/subject-pool-report-2-rolling-1797377264\",\"http://publicpool.kinja.com/subject-travel-print-pool-report-2-lid-1797566551\",\"http://publicpool.kinja.com/subject-travel-pool-report-3-final-1797581791\",\"http://publicpool.kinja.com/subject-pool-report-3-1797616886\",\"http://publicpool.kinja.com/subject-whca-print-wh-pool-pool-report-2-1797656860\",\"http://publicpool.kinja.com/subject-travel-pool-3-lid-1797695773\",\"http://publicpool.kinja.com/subject-bedminster-pool-report-no-6-travel-photo-l-1797731861\",\"http://publicpool.kinja.com/subject-out-of-town-pool-report-5-lid-1797767814\",\"http://publicpool.kinja.com/subject-pool-report-no-4-1797784555\",\"http://publicpool.kinja.com/subject-out-of-town-pool-report-no-2-lid-1797802936\",\"http://publicpool.kinja.com/subject-wh-travel-pool-report-9-1797914789\",\"http://publicpool.kinja.com/subject-whca-print-wh-pool-wh-travel-pool-report-1797955176\",\"http://publicpool.kinja.com/subject-travel-pool-report-8-1797990692\",\"http://publicpool.kinja.com/subject-wh-travel-pool-2-1798062566\",\"https://twitter.com/markknoller/status/899428440667037697\",\"http://publicpool.kinja.com/subject-out-of-town-pool-report-4-travel-photo-lid-1818479447\",\"http://publicpool.kinja.com/subject-out-of-town-pool-report-2-1818491926\",\"http://publicpool.kinja.com/subject-travel-pool-report-2-1818674771\",\"http://publicpool.kinja.com/subject-pool-report-2-1818693959\",\"http://publicpool.kinja.com/subject-pool-report-1-1818708115\",\"http://publicpool.kinja.com/subject-travel-pool-report-3-lid-1819010800\",\"http://publicpool.kinja.com/subject-updated-daily-guidance-and-press-schedule-for-1819032239\",\"http://publicpool.kinja.com/subject-travel-pool-report-2-osprey-1819038318\",\"http://publicpool.kinja.com/subject-travel-pool-report-8-dedication-to-puerto-rico-1819042413\",\"http://publicpool.kinja.com/subject-departure-from-trump-national-1819248369\"],\"Depart Time\":{\"__ndarray__\":\"AACuE5egdUIAAGCl6aB1QgAANADXonVCAABqwd+idUIAAE5XKaN1QgAAaNYVpXVCAADmLmyldUIAAMbFlql1QgAAgDLoqXVCAAAckN2rdUIAAHgAHq51QgAAXJZnrnVCAAAQ2GCwdUIAACDMp7B1QgAAmIr2snVCAABqsN60dUIAADAPMrV1QgAATN/LtnVCAADW1hy3dUIAAABx+bt1QgAAWtawvXVCAAAaPAO+dUIAAEqcRb51QgAAYiR2wHVCAAD0WOXGdUIAAJr4Ncd1QgAAWiVHyXVCAAAO84jJdUIAAGKbps11QgAAOLD3zXVCAADEqvbPdUIAANrjW9B1QgAAuC2d0HVCAABEYd3QdUIAAPSne9J1QgAA2qg41HVCAAAimnfUdUIAAHJfy9R1QgAA/H621nVCAAA27/zWdUIAAHa3Pdl1QgAAWmdN23VCAAAazZ/bdUIAANoy8tt1QgAAmphE3HVCAABa/pbcdUIAABpk6dx1QgAA2sk73XVCAACaL47ddUIAAFqV4N11QgAAmsbX3nVCAABaLCrfdUIAABqSfN91QgAA2vfO33VCAADoYwngdUIAANoY0uh1QgAAuvEJ6XVCAACogajqdUIAABrhEut1QgAAQN5J63VCAACaQwHtdUIAAFqpU+11QgAABqOA7XVCAABIqZLtdUIAAGaZc+91Qg==\",\"dtype\":\"float64\",\"shape\":[65]},\"Golf Date\":{\"__ndarray__\":\"AADAuWagdUIAAIAfuaB1QgAAAIKnonVCAAAAgqeidUIAAMDn+aJ1QgAAQEropHVCAAAAsDqldUIAAMDaaal1QgAAgEC8qXVCAAAAo6qrdUIAAEBr6611QgAAANE9rnVCAACAMyywdUIAAECZfrB1QgAAgGG/snVCAAAAxK20dUIAAMApALV1QgAAgCactnVCAABAjO62dUIAAICCwrt1QgAAQH9evXVCAAAA5bC9dUIAAMBKA751QgAAABNEwHVCAAAABrTGdUIAAMBrBsd1QgAAQM70yHVCAAAANEfJdUIAAMBeds11QgAAgMTIzXVCAAAAJ7fPdUIAAMCMCdB1QgAAgPJb0HVCAABAWK7QdUIAAABVStJ1QgAAwFHm03VCAACAtzjUdUIAAEAdi9R1QgAAwH951nVCAACA5cvWdUIAAMCtDNl1QgAAQBD72nVCAAAAdk3bdUIAAMDbn9t1QgAAgEHy23VCAABAp0TcdUIAAAANl9x1QgAAwHLp3HVCAACA2DvddUIAAEA+jt11QgAAgG+F3nVCAABA1dfedUIAAAA7Kt91QgAAwKB833VCAACABs/fdUIAAMDBf+h1QgAAgCfS6HVCAABAJG7qdUIAAACKwOp1QgAAwO8S63VCAACA7K7sdUIAAEBSAe11QgAAALhT7XVCAAAAuFPtdUIAAIAaQu91Qg==\",\"dtype\":\"float64\",\"shape\":[65]},\"Golfing Source\":[\"_https://www.facebook.com/frostwine/photos/a.214590338569690.64653.213672025328188/1544762645552446\",\"NaN\",\"https://www.nytimes.com/2017/02/12/us/politics/donald-trump-golf-obama.html\",\"https://www.nytimes.com/2017/02/12/us/politics/donald-trump-golf-obama.html\",\"NaN\",\"http://www.cnn.com/2017/02/20/politics/donald-trump-golfing-presidency/index.html\",\"http://www.cnn.com/2017/02/20/politics/donald-trump-golfing-presidency/index.html\",\"NaN\",\"https://www.instagram.com/p/BRRDqjaA4cc/\",\"NaN\",\"https://twitter.com/chrisruddynmx/status/843164640054001664\",\"NaN\",\"https://twitter.com/jbillinson/status/845732318736273410\",\"NaN\",\"https://www.bloomberg.com/news/articles/2017-04-02/trump-tees-off-with-rand-paul-to-show-gop-love-on-health-care\",\"https://twitter.com/AlliemalCNN/status/850756815210123267\",\"http://thehill.com/homenews/administration/328024-trump-spotted-at-florida-golf-club\",\"https://www.axios.com/photo-of-trump-golfing-mar-a-lago-2361057362.html\",\"NaN\",\"NaN\",\"NaN\",\"https://twitter.com/mikememoli/status/860986891377815553\",\"NaN\",\"NaN\",\"NaN\",\"https://thegolfnewsnet.com/golfnewsnetteam/2017/06/04/donald-trump-played-golf-peyton-manning-sen-bob-corker-105307/\",\"https://www.washingtonpost.com/news/football-insider/wp/2017/06/14/kirk-cousins-plays-a-round-of-golf-with-president-trump/\",\"NaN\",\"https://twitter.com/Fahrenthold/status/878687241056419844\",\"http://thehill.com/blogs/blog-briefing-room/news/339397-trump-plays-18-holes-of-golf-at-virginia-club-report\",\"NaN\",\"NaN\",\"https://twitter.com/JenniferJJacobs/status/882235265082949632\",\"NaN\",\"NaN\",\"NaN\",\"NaN\",\"NaN\",\"https://www.facebook.com/philip.hoff/posts/10101265952792327\",\"_https://www.instagram.com/p/BW6KLG6gU2Y/\",\"NaN\",\"http://www.washingtonexaminer.com/trump-greets-wedding-guests-at-golf-resort-in-new-jersey/article/2630734\",\"NaN\",\"NaN\",\"NaN\",\"http://www.washingtonexaminer.com/trumps-golf-partner-reveals-he-and-president-played-18-holes/article/2631095\",\"NaN\",\"https://www.instagram.com/p/BXo0PgrAaCh/\",\"NaN\",\"NaN\",\"NaN\",\"NaN\",\"NaN\",\"NaN\",\"_https://www.instagram.com/p/BYByxwTBlSX/\",\"NaN\",\"NaN\",\"NaN\",\"NaN\",\"NaN\",\"NaN\",\"NaN\",\"https://patch.com/us/white-house/trumps-tweet-over-waste-time-negotiating-north-korea-apparently-sent-golf-course\",\"NaN\",\"https://www.instagram.com/p/BZ9U1CQBRUL/\"],\"Sighted Golfing?\":[\"Yes\",\"Likely\",\"Yes\",\"Yes\",\"Likely\",\"Yes\",\"Yes\",\"Likely\",\"Yes\",\"Likely\",\"Yes\",\"Likely\",\"Yes\",\"Probably Not\",\"Yes\",\"Yes\",\"Yes\",\"Yes\",\"Likely\",\"Likely\",\"Probably Not\",\"Yes\",\"Likely\",\"Likely\",\"Likely\",\"Yes\",\"Yes\",\"Likely\",\"Yes\",\"Yes\",\"Likely\",\"Likely\",\"Yes\",\"Likely\",\"Likely\",\"Probably Not\",\"Probably Not\",\"Probably Not\",\"Yes\",\"Yes\",\"Likely\",\"Yes\",\"Likely\",\"Probably Not\",\"Likely\",\"Yes\",\"Likely\",\"Yes\",\"Likely\",\"Likely\",\"Probably Not\",\"Likely\",\"Probably Not\",\"Probably Not\",\"Yes\",\"Likely\",\"Likely\",\"Likely\",\"Likely\",\"Likely\",\"Probably Not\",\"Likely\",\"Yes\",\"Probably Not\",\"Yes\"],\"index\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64],\"ndDays\":[0,1,6,0,1,6,1,13,1,6,7,1,6,1,7,6,1,5,1,15,5,1,1,7,20,1,6,1,13,1,6,1,1,1,5,5,1,1,6,1,7,6,1,1,1,1,1,1,1,1,3,1,1,1,1,27,1,5,1,1,5,1,1,0,6]}},\"id\":\"9df09ec4-7f7e-48d6-ad16-409800298e01\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"days\":[1,4,7,10,13,16,19,22,25,28]},\"id\":\"0bf230da-f47c-43c2-9299-cc7aedae1685\",\"type\":\"DaysTicker\"},{\"attributes\":{},\"id\":\"25b695c2-8c9c-4008-9338-92fcfa3c4728\",\"type\":\"YearsTicker\"},{\"attributes\":{\"months\":[0,4,8]},\"id\":\"d14fe0ca-9faa-49e6-8e6c-78a0c454c1e6\",\"type\":\"MonthsTicker\"},{\"attributes\":{\"days\":[1,15]},\"id\":\"d26623fe-eb56-45c7-a283-2da62a4f3267\",\"type\":\"DaysTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"top\":{\"field\":\"ndDays\"},\"width\":{\"value\":1},\"x\":{\"field\":\"Golf Date\"}},\"id\":\"47d10a50-1065-4a51-bbbd-7255536342a0\",\"type\":\"VBar\"},{\"attributes\":{\"months\":[0,6]},\"id\":\"7cb67bdb-7aac-421b-911b-789651295a14\",\"type\":\"MonthsTicker\"},{\"attributes\":{\"mantissas\":[1,2,5],\"max_interval\":500.0,\"num_minor_ticks\":0},\"id\":\"9e789526-0d91-4304-aaa9-0f5a97ff7115\",\"type\":\"AdaptiveTicker\"},{\"attributes\":{\"angle\":270,\"angle_units\":\"deg\",\"background_fill_color\":{\"value\":\"white\"},\"plot\":{\"id\":\"50a43170-2608-4398-858d-c82cac4e576a\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"render_mode\":\"css\",\"text\":\"Today\",\"x\":1506573178593.696,\"y\":10},\"id\":\"58482910-1d58-4622-a42c-72213b89ce95\",\"type\":\"Label\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"df6a0582-79cc-4749-9be8-5ea3f5ef9954\",\"type\":\"PanTool\"},{\"id\":\"01710505-7523-4659-a04b-09e7f47e2d29\",\"type\":\"WheelZoomTool\"},{\"id\":\"5e6aec8b-aa7f-488b-b921-19220a9f9949\",\"type\":\"BoxZoomTool\"},{\"id\":\"ba1c374b-b7b9-4994-8b53-df42d8fef2ef\",\"type\":\"SaveTool\"},{\"id\":\"10a3c33e-19d5-433c-9e21-dbc8606b1b24\",\"type\":\"ResetTool\"},{\"id\":\"de7e6725-86bc-42b5-86bb-1d640fc831f5\",\"type\":\"HelpTool\"}]},\"id\":\"d2d7615b-851f-488a-9650-b2f6cdf26666\",\"type\":\"Toolbar\"},{\"attributes\":{\"formatter\":{\"id\":\"4b517c53-aac7-4167-b188-b459faf6a2c0\",\"type\":\"DatetimeTickFormatter\"},\"plot\":{\"id\":\"50a43170-2608-4398-858d-c82cac4e576a\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"2bd2b3be-bf2d-4c44-876d-32b0283e529f\",\"type\":\"DatetimeTicker\"}},\"id\":\"079d486a-f129-4c64-8d13-b6cae02943b6\",\"type\":\"DatetimeAxis\"},{\"attributes\":{},\"id\":\"ba1c374b-b7b9-4994-8b53-df42d8fef2ef\",\"type\":\"SaveTool\"},{\"attributes\":{\"base\":24,\"mantissas\":[1,2,4,6,8,12],\"max_interval\":43200000.0,\"min_interval\":3600000.0,\"num_minor_ticks\":0},\"id\":\"b7f245c1-a77a-4b5a-937a-06db0aa78db9\",\"type\":\"AdaptiveTicker\"},{\"attributes\":{\"dimension\":\"height\",\"line_color\":{\"value\":\"red\"},\"line_dash\":[6],\"line_width\":{\"value\":2},\"location\":1507437178593.696,\"plot\":null},\"id\":\"fdbf9312-8d14-4a05-96c9-ffb0a22d95c7\",\"type\":\"Span\"},{\"attributes\":{\"formatter\":{\"id\":\"aee44492-97ee-4082-96d9-4e09ca8dddcd\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"50a43170-2608-4398-858d-c82cac4e576a\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"7444480b-6e53-4f99-99bb-5c9ed48d88a0\",\"type\":\"BasicTicker\"}},\"id\":\"a777abe7-2326-46f6-b4f7-a92b21268287\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"415b73c2-7585-4af2-88f1-20570224e909\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"7444480b-6e53-4f99-99bb-5c9ed48d88a0\",\"type\":\"BasicTicker\"}],\"root_ids\":[\"50a43170-2608-4398-858d-c82cac4e576a\"]},\"title\":\"Bokeh Application\",\"version\":\"0.12.9\"}};\n", " var render_items = [{\"docid\":\"06563c2a-02e6-4086-bcb7-284e8ce04a33\",\"elementid\":\"a69883a6-993a-4939-a369-b53a14cdf1cf\",\"modelid\":\"50a43170-2608-4398-858d-c82cac4e576a\"}];\n", "\n", " root.Bokeh.embed.embed_items(docs_json, render_items);\n", " }\n", "\n", " if (root.Bokeh !== undefined) {\n", " embed_document(root);\n", " } else {\n", " var attempts = 0;\n", " var timer = setInterval(function(root) {\n", " if (root.Bokeh !== undefined) {\n", " embed_document(root);\n", " clearInterval(timer);\n", " }\n", " attempts++;\n", " if (attempts > 100) {\n", " console.log(\"Bokeh: ERROR: Unable to embed document because BokehJS library is missing\")\n", " clearInterval(timer);\n", " }\n", " }, 10, root)\n", " }\n", "})(window);" ], "application/vnd.bokehjs_exec.v0+json": "" }, "metadata": { "application/vnd.bokehjs_exec.v0+json": { "id": "50a43170-2608-4398-858d-c82cac4e576a" } }, "output_type": "display_data" } ], "source": [ "from bokeh.io import output_notebook\n", "from bokeh.plotting import figure\n", "from bokeh.models import Span,Label\n", "TsDay=24*3600*1000.\n", "p=figure(title=\"Preceeding Days with no Trump Golf\",\n", " plot_width=550,plot_height=300,\n", " x_axis_type=\"datetime\",)\n", "p.vbar(source=gDf.reset_index(),\n", " x='Golf Date',top='ndDays',width=1,\n", " )\n", "Today=pd.tslib.Timestamp.today().timestamp()*1000\n", "vline=Span(location=Today,dimension='height',\n", " line_width=2,line_color='red',line_dash='dashed'\n", " )\n", "p.renderers.extend([vline])\n", "label=Label(x=Today-10*TsDay,y=10,\n", " text=\"Today\",render_mode='css',\n", " angle=270,angle_units='deg',\n", " background_fill_color='white')\n", "p.add_layout(label)\n", "output_notebook();show(p)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "hide_input": false, "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.5.2" } }, "nbformat": 4, "nbformat_minor": 2 }