{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Barbell graph" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example I - Simple Barbell from scratch" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "LocationList (3 objects)" ] }, "execution_count": null, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import pop2net as p2n\n", "\n", "model = p2n.Model()\n", "creator = p2n.Creator(model)\n", "inspector = p2n.NetworkInspector(model)\n", "\n", "\n", "class Bell(p2n.LocationDesigner):\n", " n_locations = 2\n", "\n", "\n", "class Bar(p2n.LocationDesigner):\n", " n_locations = 1\n", "\n", " def bridge(self, agent):\n", " return agent.Bell\n", "\n", "\n", "for _ in range(20):\n", " p2n.Agent(model)\n", "\n", "creator.create_locations(\n", " location_designers=[\n", " Bell,\n", " Bar,\n", " ]\n", ")" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "application/javascript": "'use strict';\n(function(root) {\n function now() {\n return new Date();\n }\n\n const force = true;\n\n if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\nconst JS_MIME_TYPE = 'application/javascript';\n const HTML_MIME_TYPE = 'text/html';\n const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n const CLASS_NAME = 'output_bokeh rendered_html';\n\n /**\n * Render data to the DOM node\n */\n function render(props, node) {\n const script = document.createElement(\"script\");\n node.appendChild(script);\n }\n\n /**\n * Handle when an output is cleared or removed\n */\n function handleClearOutput(event, handle) {\n function drop(id) {\n const view = Bokeh.index.get_by_id(id)\n if (view != null) {\n view.model.document.clear()\n Bokeh.index.delete(view)\n }\n }\n\n const cell = handle.cell;\n\n const id = cell.output_area._bokeh_element_id;\n const server_id = cell.output_area._bokeh_server_id;\n\n // Clean up Bokeh references\n if (id != null) {\n drop(id)\n }\n\n if (server_id !== undefined) {\n // Clean up Bokeh references\n const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n cell.notebook.kernel.execute(cmd_clean, {\n iopub: {\n output: function(msg) {\n const id = msg.content.text.trim()\n drop(id)\n }\n }\n });\n // Destroy server and session\n const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n cell.notebook.kernel.execute(cmd_destroy);\n }\n }\n\n /**\n * Handle when a new output is added\n */\n function handleAddOutput(event, handle) {\n const output_area = handle.output_area;\n const output = handle.output;\n\n // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n return\n }\n\n const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n\n if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n // store reference to embed id on output_area\n output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n }\n if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n const bk_div = document.createElement(\"div\");\n bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n const script_attrs = bk_div.children[0].attributes;\n for (let i = 0; i < script_attrs.length; i++) {\n toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n }\n // store reference to server id on output_area\n output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n }\n }\n\n function register_renderer(events, OutputArea) {\n\n function append_mime(data, metadata, element) {\n // create a DOM node to render to\n const toinsert = this.create_output_subarea(\n metadata,\n CLASS_NAME,\n EXEC_MIME_TYPE\n );\n this.keyboard_manager.register_events(toinsert);\n // Render to node\n const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n render(props, toinsert[toinsert.length - 1]);\n element.append(toinsert);\n return toinsert\n }\n\n /* Handle when an output is cleared or removed */\n events.on('clear_output.CodeCell', handleClearOutput);\n events.on('delete.Cell', handleClearOutput);\n\n /* Handle when a new output is added */\n events.on('output_added.OutputArea', handleAddOutput);\n\n /**\n * Register the mime type and append_mime function with output_area\n */\n OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n /* Is output safe? */\n safe: true,\n /* Index of renderer in `output_area.display_order` */\n index: 0\n });\n }\n\n // register the mime type if in Jupyter Notebook environment and previously unregistered\n if (root.Jupyter !== undefined) {\n const events = require('base/js/events');\n const OutputArea = require('notebook/js/outputarea').OutputArea;\n\n if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n register_renderer(events, OutputArea);\n }\n }\n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n const NB_LOAD_WARNING = {'data': {'text/html':\n \"
\\n\"+\n \"

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

\\n\"+\n \"\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\n\n function display_loaded(error = null) {\n const el = document.getElementById(null);\n if (el != null) {\n const html = (() => {\n if (typeof root.Bokeh === \"undefined\") {\n if (error == null) {\n return \"BokehJS is loading ...\";\n } else {\n return \"BokehJS failed to load.\";\n }\n } else {\n const prefix = `BokehJS ${root.Bokeh.version}`;\n if (error == null) {\n return `${prefix} successfully loaded.`;\n } else {\n return `${prefix} encountered errors while loading and may not function as expected.`;\n }\n }\n })();\n el.innerHTML = html;\n\n if (error != null) {\n const wrapper = document.createElement(\"div\");\n wrapper.style.overflow = \"auto\";\n wrapper.style.height = \"5em\";\n wrapper.style.resize = \"vertical\";\n const content = document.createElement(\"div\");\n content.style.fontFamily = \"monospace\";\n content.style.whiteSpace = \"pre-wrap\";\n content.style.backgroundColor = \"rgb(255, 221, 221)\";\n content.textContent = error.stack ?? error.toString();\n wrapper.append(content);\n el.append(wrapper);\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(() => display_loaded(error), 100);\n }\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n\n function on_error(url) {\n console.error(\"failed to load \" + url);\n }\n\n for (let i = 0; i < css_urls.length; i++) {\n const url = css_urls[i];\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n }\n\n for (let i = 0; i < js_urls.length; i++) {\n const url = js_urls[i];\n const element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n const js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-3.7.1.min.js\"];\n const css_urls = [];\n\n const inline_js = [ function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\nfunction(Bokeh) {\n }\n ];\n\n function run_inline_js() {\n if (root.Bokeh !== undefined || force === true) {\n try {\n for (let i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\n\n } catch (error) {throw error;\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n const cell = $(document.getElementById(null)).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n }\n\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(css_urls, js_urls, function() {\n console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));", "application/vnd.bokehjs_load.v0+json": "" }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "
\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": "(function(root) {\n function embed_document(root) {\n const docs_json = {\"1e93e1f9-fce6-44aa-8da7-b00ade3fcec0\":{\"version\":\"3.7.1\",\"title\":\"Bokeh Application\",\"roots\":[{\"type\":\"object\",\"name\":\"Figure\",\"id\":\"p1324\",\"attributes\":{\"width\":400,\"height\":400,\"x_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1325\"},\"y_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1326\"},\"x_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1333\"},\"y_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1334\"},\"title\":{\"type\":\"object\",\"name\":\"Title\",\"id\":\"p1331\"},\"renderers\":[{\"type\":\"object\",\"name\":\"GraphRenderer\",\"id\":\"p1356\",\"attributes\":{\"layout_provider\":{\"type\":\"object\",\"name\":\"StaticLayoutProvider\",\"id\":\"p1373\",\"attributes\":{\"graph_layout\":{\"type\":\"map\",\"entries\":[[1,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"gLGPmivy1r8OO4Y7B93RPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[2,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAAA8L9xO8ukR3vjPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[3,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"DCCORw0477/Oh2IpVUboPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[4,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"9+vZmoZd7r8eDZ2IwHfdPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[5,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"Qo2Aee4a4b85rX+GYmbgPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[6,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"ewV8lTAk4r/eYDaIMYvrPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[7,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"2wDuaX586b9x4jMwxEzYPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[8,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"s2okOhX55r91ajirZqvsPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[9,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"1mri6yzA3r+x6CPNIzXnPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[10,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"oB5WfiS9678LfthwKZrrPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[11,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"K9TR30Ma1T+S4lMjT0zUvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[12,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"qtFYAfOB7D93hNwibX7rvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[13,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"/iWTzlGQ7T/GTK/D6trbvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[14,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"4waEgW2S7z/dBXRxkK3nvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[15,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"O3b3VPj53j8hOvzVS3Pnvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[16,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"Yrd64cnY5z8mcYppRy3tvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[17,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"IzpnW7qL4j/tqWfjLrXrvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[18,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"A9TJ1Wwz4j9Jsw+hUALgvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[19,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"QP/gxsKI6D++UHhrMIvXvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[20,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"XfDde1mw7z+4+zGRnJrivw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[21,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"Mwcky4ys5r99E2+s/aLjPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[22,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"crsGOXK45j+nKKkqNs/jvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[23,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"hMF6A3tllb95hXrpBVKbvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"node_renderer\":{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1361\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1358\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1359\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1360\"},\"data\":{\"type\":\"map\",\"entries\":[[\"label\",[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,\"Bell\",\"Bell\",\"Bar\"]],[\"type\",[\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Location\",\"Location\",\"Location\"]],[\"bipartite\",[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1]],[\"index\",[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]],[\"_marker\",[\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"square\",\"square\",\"square\"]],[\"_color\",[\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"steelblue\",\"steelblue\",\"steelblue\"]],[\"_alpha\",[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5]],[\"_size\",[10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10]],[\"start_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"end_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"weight_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"index_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"label_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",1,1,1]],[\"type_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1362\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1363\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1375\",\"attributes\":{\"size\":{\"type\":\"field\",\"field\":\"_size\"},\"line_color\":{\"type\":\"field\",\"field\":\"_color\"},\"line_alpha\":{\"type\":\"field\",\"field\":\"_alpha\"},\"fill_color\":{\"type\":\"field\",\"field\":\"_color\"},\"fill_alpha\":{\"type\":\"field\",\"field\":\"_alpha\"},\"marker\":{\"type\":\"field\",\"field\":\"_marker\"}}}}},\"edge_renderer\":{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1368\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1365\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1366\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1367\"},\"data\":{\"type\":\"map\",\"entries\":[[\"weight\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"start\",[1,1,2,3,4,5,6,7,8,9,10,11,11,12,13,14,15,16,17,18,19,20]],[\"end\",[21,23,21,21,21,21,21,21,21,21,21,22,23,22,22,22,22,22,22,22,22,22]],[\"_color\",[\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\"]],[\"_alpha\",[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]],[\"_size\",[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]],[\"start_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"end_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"weight_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"index_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"label_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"type_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1369\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1370\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"MultiLine\",\"id\":\"p1374\",\"attributes\":{\"line_color\":{\"type\":\"field\",\"field\":\"_color\"},\"line_alpha\":{\"type\":\"field\",\"field\":\"_alpha\"},\"line_width\":{\"type\":\"field\",\"field\":\"_size\"}}}}},\"selection_policy\":{\"type\":\"object\",\"name\":\"NodesOnly\",\"id\":\"p1371\"},\"inspection_policy\":{\"type\":\"object\",\"name\":\"NodesOnly\",\"id\":\"p1372\"}}}],\"toolbar\":{\"type\":\"object\",\"name\":\"Toolbar\",\"id\":\"p1332\",\"attributes\":{\"tools\":[{\"type\":\"object\",\"name\":\"BoxZoomTool\",\"id\":\"p1345\",\"attributes\":{\"dimensions\":\"both\",\"overlay\":{\"type\":\"object\",\"name\":\"BoxAnnotation\",\"id\":\"p1346\",\"attributes\":{\"syncable\":false,\"line_color\":\"black\",\"line_alpha\":1.0,\"line_width\":2,\"line_dash\":[4,4],\"fill_color\":\"lightgrey\",\"fill_alpha\":0.5,\"level\":\"overlay\",\"visible\":false,\"left\":{\"type\":\"number\",\"value\":\"nan\"},\"right\":{\"type\":\"number\",\"value\":\"nan\"},\"top\":{\"type\":\"number\",\"value\":\"nan\"},\"bottom\":{\"type\":\"number\",\"value\":\"nan\"},\"left_units\":\"canvas\",\"right_units\":\"canvas\",\"top_units\":\"canvas\",\"bottom_units\":\"canvas\",\"handles\":{\"type\":\"object\",\"name\":\"BoxInteractionHandles\",\"id\":\"p1352\",\"attributes\":{\"all\":{\"type\":\"object\",\"name\":\"AreaVisuals\",\"id\":\"p1351\",\"attributes\":{\"fill_color\":\"white\",\"hover_fill_color\":\"lightgray\"}}}}}}}},{\"type\":\"object\",\"name\":\"ResetTool\",\"id\":\"p1353\"},{\"type\":\"object\",\"name\":\"WheelZoomTool\",\"id\":\"p1354\",\"attributes\":{\"renderers\":\"auto\"}},{\"type\":\"object\",\"name\":\"PanTool\",\"id\":\"p1355\"},{\"type\":\"object\",\"name\":\"HoverTool\",\"id\":\"p1376\",\"attributes\":{\"renderers\":[{\"id\":\"p1368\"},{\"id\":\"p1361\"}],\"tooltips\":\"
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
start:@start
end:@end
weight:@weight
index:@index
label:@label
type:@type
\",\"line_policy\":\"interp\"}}],\"logo\":null}},\"left\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1340\",\"attributes\":{\"visible\":false,\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1341\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1342\"},\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1343\"}}}],\"below\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1335\",\"attributes\":{\"visible\":false,\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1336\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1337\"},\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1338\"}}}],\"center\":[{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1339\",\"attributes\":{\"axis\":{\"id\":\"p1335\"},\"grid_line_color\":null}},{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1344\",\"attributes\":{\"dimension\":1,\"axis\":{\"id\":\"p1340\"},\"grid_line_color\":null}}]}}]}};\n const render_items = [{\"docid\":\"1e93e1f9-fce6-44aa-8da7-b00ade3fcec0\",\"roots\":{\"p1324\":\"bc224105-2717-4bc6-bd0c-3bdb00a2b110\"},\"root_ids\":[\"p1324\"],\"notebook_comms_target\":\"p1377\"}];\n void root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n }\n if (root.Bokeh !== undefined) {\n embed_document(root);\n } else {\n let attempts = 0;\n const timer = setInterval(function(root) {\n if (root.Bokeh !== undefined) {\n clearInterval(timer);\n embed_document(root);\n } else {\n attempts++;\n if (attempts > 100) {\n clearInterval(timer);\n console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n }\n }\n }, 10, root)\n }\n})(window);", "application/vnd.bokehjs_exec.v0+json": "" }, "metadata": {}, "output_type": "display_data" } ], "source": [ "inspector.plot_bipartite_network()" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "application/javascript": "'use strict';\n(function(root) {\n function now() {\n return new Date();\n }\n\n const force = true;\n\n if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\nconst JS_MIME_TYPE = 'application/javascript';\n const HTML_MIME_TYPE = 'text/html';\n const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n const CLASS_NAME = 'output_bokeh rendered_html';\n\n /**\n * Render data to the DOM node\n */\n function render(props, node) {\n const script = document.createElement(\"script\");\n node.appendChild(script);\n }\n\n /**\n * Handle when an output is cleared or removed\n */\n function handleClearOutput(event, handle) {\n function drop(id) {\n const view = Bokeh.index.get_by_id(id)\n if (view != null) {\n view.model.document.clear()\n Bokeh.index.delete(view)\n }\n }\n\n const cell = handle.cell;\n\n const id = cell.output_area._bokeh_element_id;\n const server_id = cell.output_area._bokeh_server_id;\n\n // Clean up Bokeh references\n if (id != null) {\n drop(id)\n }\n\n if (server_id !== undefined) {\n // Clean up Bokeh references\n const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n cell.notebook.kernel.execute(cmd_clean, {\n iopub: {\n output: function(msg) {\n const id = msg.content.text.trim()\n drop(id)\n }\n }\n });\n // Destroy server and session\n const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n cell.notebook.kernel.execute(cmd_destroy);\n }\n }\n\n /**\n * Handle when a new output is added\n */\n function handleAddOutput(event, handle) {\n const output_area = handle.output_area;\n const output = handle.output;\n\n // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n return\n }\n\n const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n\n if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n // store reference to embed id on output_area\n output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n }\n if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n const bk_div = document.createElement(\"div\");\n bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n const script_attrs = bk_div.children[0].attributes;\n for (let i = 0; i < script_attrs.length; i++) {\n toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n }\n // store reference to server id on output_area\n output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n }\n }\n\n function register_renderer(events, OutputArea) {\n\n function append_mime(data, metadata, element) {\n // create a DOM node to render to\n const toinsert = this.create_output_subarea(\n metadata,\n CLASS_NAME,\n EXEC_MIME_TYPE\n );\n this.keyboard_manager.register_events(toinsert);\n // Render to node\n const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n render(props, toinsert[toinsert.length - 1]);\n element.append(toinsert);\n return toinsert\n }\n\n /* Handle when an output is cleared or removed */\n events.on('clear_output.CodeCell', handleClearOutput);\n events.on('delete.Cell', handleClearOutput);\n\n /* Handle when a new output is added */\n events.on('output_added.OutputArea', handleAddOutput);\n\n /**\n * Register the mime type and append_mime function with output_area\n */\n OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n /* Is output safe? */\n safe: true,\n /* Index of renderer in `output_area.display_order` */\n index: 0\n });\n }\n\n // register the mime type if in Jupyter Notebook environment and previously unregistered\n if (root.Jupyter !== undefined) {\n const events = require('base/js/events');\n const OutputArea = require('notebook/js/outputarea').OutputArea;\n\n if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n register_renderer(events, OutputArea);\n }\n }\n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n const NB_LOAD_WARNING = {'data': {'text/html':\n \"
\\n\"+\n \"

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

\\n\"+\n \"\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\n\n function display_loaded(error = null) {\n const el = document.getElementById(null);\n if (el != null) {\n const html = (() => {\n if (typeof root.Bokeh === \"undefined\") {\n if (error == null) {\n return \"BokehJS is loading ...\";\n } else {\n return \"BokehJS failed to load.\";\n }\n } else {\n const prefix = `BokehJS ${root.Bokeh.version}`;\n if (error == null) {\n return `${prefix} successfully loaded.`;\n } else {\n return `${prefix} encountered errors while loading and may not function as expected.`;\n }\n }\n })();\n el.innerHTML = html;\n\n if (error != null) {\n const wrapper = document.createElement(\"div\");\n wrapper.style.overflow = \"auto\";\n wrapper.style.height = \"5em\";\n wrapper.style.resize = \"vertical\";\n const content = document.createElement(\"div\");\n content.style.fontFamily = \"monospace\";\n content.style.whiteSpace = \"pre-wrap\";\n content.style.backgroundColor = \"rgb(255, 221, 221)\";\n content.textContent = error.stack ?? error.toString();\n wrapper.append(content);\n el.append(wrapper);\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(() => display_loaded(error), 100);\n }\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n\n function on_error(url) {\n console.error(\"failed to load \" + url);\n }\n\n for (let i = 0; i < css_urls.length; i++) {\n const url = css_urls[i];\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n }\n\n for (let i = 0; i < js_urls.length; i++) {\n const url = js_urls[i];\n const element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n const js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-3.7.1.min.js\"];\n const css_urls = [];\n\n const inline_js = [ function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\nfunction(Bokeh) {\n }\n ];\n\n function run_inline_js() {\n if (root.Bokeh !== undefined || force === true) {\n try {\n for (let i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\n\n } catch (error) {throw error;\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n const cell = $(document.getElementById(null)).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n }\n\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(css_urls, js_urls, function() {\n console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));", "application/vnd.bokehjs_load.v0+json": "" }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "
\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": "(function(root) {\n function embed_document(root) {\n const docs_json = {\"bb8d01fc-d9b2-4652-8434-9f7b38d8a327\":{\"version\":\"3.7.1\",\"title\":\"Bokeh Application\",\"roots\":[{\"type\":\"object\",\"name\":\"Figure\",\"id\":\"p1401\",\"attributes\":{\"width\":400,\"height\":400,\"x_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1402\"},\"y_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1403\"},\"x_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1410\"},\"y_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1411\"},\"title\":{\"type\":\"object\",\"name\":\"Title\",\"id\":\"p1408\"},\"renderers\":[{\"type\":\"object\",\"name\":\"GraphRenderer\",\"id\":\"p1433\",\"attributes\":{\"layout_provider\":{\"type\":\"object\",\"name\":\"StaticLayoutProvider\",\"id\":\"p1450\",\"attributes\":{\"graph_layout\":{\"type\":\"map\",\"entries\":[[1,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"pbPybRTCuz9PkdqaPgjfPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[2,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"ywdn+XuSwT9rIlIpZHTmPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[3,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"b6Om9P5fkz8d3ZIrm5LoPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[4,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"MVaNaGzZ0j8eo4EaLvHlPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[5,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"t/ilQ4t3uj+fW3pO5WzuPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[6,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"DPlrAzRqcj9SoY1OZ5rsPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[7,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"T//+4iKX1z+VsdD/r53pPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[8,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"lvVErB5uyz8AAAAAAADwPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[9,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"M9DhE6ce1T/9fimtoqvtPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[10,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"A1/aVWPTyj+0eT2Nam/qPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[11,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"voe8J6XHu79mdSEVbfbevw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[12,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"eBl0xura0L9A9Y+ESEjvvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[13,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"wF9pQ2fQob/bJi1D0Irtvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[14,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"EVF9g13lx7/YjRZfjVbqvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[15,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"0kSTzyUs179VUKo11XPovw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[16,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"0vDPB1BguL//BK8wSrHmvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[17,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"ltATeMNxwb+aBFNCsLXvvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[18,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"Y4uFoxJVH78qCkX/zLrpvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[19,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"QfEGKXCs0L/EiEueybnlvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[20,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"eDaeRjXi1b8JQXKcE0jsvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"node_renderer\":{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1438\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1435\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1436\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1437\"},\"data\":{\"type\":\"map\",\"entries\":[[\"type\",[\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\"]],[\"index\",[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]],[\"_marker\",[\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\"]],[\"_color\",[\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\"]],[\"_alpha\",[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5]],[\"_size\",[10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10]],[\"start_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"end_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"weight_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"index_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"type_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1439\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1440\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1452\",\"attributes\":{\"size\":{\"type\":\"field\",\"field\":\"_size\"},\"line_color\":{\"type\":\"field\",\"field\":\"_color\"},\"line_alpha\":{\"type\":\"field\",\"field\":\"_alpha\"},\"fill_color\":{\"type\":\"field\",\"field\":\"_color\"},\"fill_alpha\":{\"type\":\"field\",\"field\":\"_alpha\"},\"marker\":{\"type\":\"field\",\"field\":\"_marker\"}}}}},\"edge_renderer\":{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1445\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1442\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1443\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1444\"},\"data\":{\"type\":\"map\",\"entries\":[[\"weight\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"start\",[1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,5,6,6,6,6,7,7,7,8,8,9,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,14,14,14,14,14,14,15,15,15,15,15,16,16,16,16,17,17,17,18,18,19]],[\"end\",[2,3,4,5,6,7,8,9,10,11,3,4,5,6,7,8,9,10,4,5,6,7,8,9,10,5,6,7,8,9,10,6,7,8,9,10,7,8,9,10,8,9,10,9,10,10,12,13,14,15,16,17,18,19,20,13,14,15,16,17,18,19,20,14,15,16,17,18,19,20,15,16,17,18,19,20,16,17,18,19,20,17,18,19,20,18,19,20,19,20,20]],[\"_color\",[\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\"]],[\"_alpha\",[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]],[\"_size\",[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]],[\"start_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"end_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"weight_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"index_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"type_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1446\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1447\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"MultiLine\",\"id\":\"p1451\",\"attributes\":{\"line_color\":{\"type\":\"field\",\"field\":\"_color\"},\"line_alpha\":{\"type\":\"field\",\"field\":\"_alpha\"},\"line_width\":{\"type\":\"field\",\"field\":\"_size\"}}}}},\"selection_policy\":{\"type\":\"object\",\"name\":\"NodesOnly\",\"id\":\"p1448\"},\"inspection_policy\":{\"type\":\"object\",\"name\":\"NodesOnly\",\"id\":\"p1449\"}}}],\"toolbar\":{\"type\":\"object\",\"name\":\"Toolbar\",\"id\":\"p1409\",\"attributes\":{\"tools\":[{\"type\":\"object\",\"name\":\"BoxZoomTool\",\"id\":\"p1422\",\"attributes\":{\"dimensions\":\"both\",\"overlay\":{\"type\":\"object\",\"name\":\"BoxAnnotation\",\"id\":\"p1423\",\"attributes\":{\"syncable\":false,\"line_color\":\"black\",\"line_alpha\":1.0,\"line_width\":2,\"line_dash\":[4,4],\"fill_color\":\"lightgrey\",\"fill_alpha\":0.5,\"level\":\"overlay\",\"visible\":false,\"left\":{\"type\":\"number\",\"value\":\"nan\"},\"right\":{\"type\":\"number\",\"value\":\"nan\"},\"top\":{\"type\":\"number\",\"value\":\"nan\"},\"bottom\":{\"type\":\"number\",\"value\":\"nan\"},\"left_units\":\"canvas\",\"right_units\":\"canvas\",\"top_units\":\"canvas\",\"bottom_units\":\"canvas\",\"handles\":{\"type\":\"object\",\"name\":\"BoxInteractionHandles\",\"id\":\"p1429\",\"attributes\":{\"all\":{\"type\":\"object\",\"name\":\"AreaVisuals\",\"id\":\"p1428\",\"attributes\":{\"fill_color\":\"white\",\"hover_fill_color\":\"lightgray\"}}}}}}}},{\"type\":\"object\",\"name\":\"ResetTool\",\"id\":\"p1430\"},{\"type\":\"object\",\"name\":\"WheelZoomTool\",\"id\":\"p1431\",\"attributes\":{\"renderers\":\"auto\"}},{\"type\":\"object\",\"name\":\"PanTool\",\"id\":\"p1432\"},{\"type\":\"object\",\"name\":\"HoverTool\",\"id\":\"p1453\",\"attributes\":{\"renderers\":[{\"id\":\"p1445\"},{\"id\":\"p1438\"}],\"tooltips\":\"
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
start:@start
end:@end
weight:@weight
index:@index
type:@type
\",\"line_policy\":\"interp\"}}],\"logo\":null}},\"left\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1417\",\"attributes\":{\"visible\":false,\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1418\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1419\"},\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1420\"}}}],\"below\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1412\",\"attributes\":{\"visible\":false,\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1413\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1414\"},\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1415\"}}}],\"center\":[{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1416\",\"attributes\":{\"axis\":{\"id\":\"p1412\"},\"grid_line_color\":null}},{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1421\",\"attributes\":{\"dimension\":1,\"axis\":{\"id\":\"p1417\"},\"grid_line_color\":null}}]}}]}};\n const render_items = [{\"docid\":\"bb8d01fc-d9b2-4652-8434-9f7b38d8a327\",\"roots\":{\"p1401\":\"f8f29fd4-5580-4a18-98d0-64df45766e63\"},\"root_ids\":[\"p1401\"],\"notebook_comms_target\":\"p1454\"}];\n void root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n }\n if (root.Bokeh !== undefined) {\n embed_document(root);\n } else {\n let attempts = 0;\n const timer = setInterval(function(root) {\n if (root.Bokeh !== undefined) {\n clearInterval(timer);\n embed_document(root);\n } else {\n attempts++;\n if (attempts > 100) {\n clearInterval(timer);\n console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n }\n }\n }, 10, root)\n }\n})(window);", "application/vnd.bokehjs_exec.v0+json": "" }, "metadata": {}, "output_type": "display_data" } ], "source": [ "inspector.plot_agent_network()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example II - Connected opinion cluster" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "application/javascript": "'use strict';\n(function(root) {\n function now() {\n return new Date();\n }\n\n const force = true;\n\n if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\nconst JS_MIME_TYPE = 'application/javascript';\n const HTML_MIME_TYPE = 'text/html';\n const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n const CLASS_NAME = 'output_bokeh rendered_html';\n\n /**\n * Render data to the DOM node\n */\n function render(props, node) {\n const script = document.createElement(\"script\");\n node.appendChild(script);\n }\n\n /**\n * Handle when an output is cleared or removed\n */\n function handleClearOutput(event, handle) {\n function drop(id) {\n const view = Bokeh.index.get_by_id(id)\n if (view != null) {\n view.model.document.clear()\n Bokeh.index.delete(view)\n }\n }\n\n const cell = handle.cell;\n\n const id = cell.output_area._bokeh_element_id;\n const server_id = cell.output_area._bokeh_server_id;\n\n // Clean up Bokeh references\n if (id != null) {\n drop(id)\n }\n\n if (server_id !== undefined) {\n // Clean up Bokeh references\n const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n cell.notebook.kernel.execute(cmd_clean, {\n iopub: {\n output: function(msg) {\n const id = msg.content.text.trim()\n drop(id)\n }\n }\n });\n // Destroy server and session\n const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n cell.notebook.kernel.execute(cmd_destroy);\n }\n }\n\n /**\n * Handle when a new output is added\n */\n function handleAddOutput(event, handle) {\n const output_area = handle.output_area;\n const output = handle.output;\n\n // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n return\n }\n\n const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n\n if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n // store reference to embed id on output_area\n output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n }\n if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n const bk_div = document.createElement(\"div\");\n bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n const script_attrs = bk_div.children[0].attributes;\n for (let i = 0; i < script_attrs.length; i++) {\n toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n }\n // store reference to server id on output_area\n output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n }\n }\n\n function register_renderer(events, OutputArea) {\n\n function append_mime(data, metadata, element) {\n // create a DOM node to render to\n const toinsert = this.create_output_subarea(\n metadata,\n CLASS_NAME,\n EXEC_MIME_TYPE\n );\n this.keyboard_manager.register_events(toinsert);\n // Render to node\n const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n render(props, toinsert[toinsert.length - 1]);\n element.append(toinsert);\n return toinsert\n }\n\n /* Handle when an output is cleared or removed */\n events.on('clear_output.CodeCell', handleClearOutput);\n events.on('delete.Cell', handleClearOutput);\n\n /* Handle when a new output is added */\n events.on('output_added.OutputArea', handleAddOutput);\n\n /**\n * Register the mime type and append_mime function with output_area\n */\n OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n /* Is output safe? */\n safe: true,\n /* Index of renderer in `output_area.display_order` */\n index: 0\n });\n }\n\n // register the mime type if in Jupyter Notebook environment and previously unregistered\n if (root.Jupyter !== undefined) {\n const events = require('base/js/events');\n const OutputArea = require('notebook/js/outputarea').OutputArea;\n\n if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n register_renderer(events, OutputArea);\n }\n }\n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n const NB_LOAD_WARNING = {'data': {'text/html':\n \"
\\n\"+\n \"

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

\\n\"+\n \"\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\n\n function display_loaded(error = null) {\n const el = document.getElementById(null);\n if (el != null) {\n const html = (() => {\n if (typeof root.Bokeh === \"undefined\") {\n if (error == null) {\n return \"BokehJS is loading ...\";\n } else {\n return \"BokehJS failed to load.\";\n }\n } else {\n const prefix = `BokehJS ${root.Bokeh.version}`;\n if (error == null) {\n return `${prefix} successfully loaded.`;\n } else {\n return `${prefix} encountered errors while loading and may not function as expected.`;\n }\n }\n })();\n el.innerHTML = html;\n\n if (error != null) {\n const wrapper = document.createElement(\"div\");\n wrapper.style.overflow = \"auto\";\n wrapper.style.height = \"5em\";\n wrapper.style.resize = \"vertical\";\n const content = document.createElement(\"div\");\n content.style.fontFamily = \"monospace\";\n content.style.whiteSpace = \"pre-wrap\";\n content.style.backgroundColor = \"rgb(255, 221, 221)\";\n content.textContent = error.stack ?? error.toString();\n wrapper.append(content);\n el.append(wrapper);\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(() => display_loaded(error), 100);\n }\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n\n function on_error(url) {\n console.error(\"failed to load \" + url);\n }\n\n for (let i = 0; i < css_urls.length; i++) {\n const url = css_urls[i];\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n }\n\n for (let i = 0; i < js_urls.length; i++) {\n const url = js_urls[i];\n const element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n const js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-3.7.1.min.js\"];\n const css_urls = [];\n\n const inline_js = [ function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\nfunction(Bokeh) {\n }\n ];\n\n function run_inline_js() {\n if (root.Bokeh !== undefined || force === true) {\n try {\n for (let i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\n\n } catch (error) {throw error;\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n const cell = $(document.getElementById(null)).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n }\n\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(css_urls, js_urls, function() {\n console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));", "application/vnd.bokehjs_load.v0+json": "" }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "
\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": "(function(root) {\n function embed_document(root) {\n const docs_json = {\"09825131-f77c-444d-ac49-fddce17f9600\":{\"version\":\"3.7.1\",\"title\":\"Bokeh Application\",\"roots\":[{\"type\":\"object\",\"name\":\"Figure\",\"id\":\"p1475\",\"attributes\":{\"width\":400,\"height\":400,\"x_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1476\"},\"y_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1477\"},\"x_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1484\"},\"y_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1485\"},\"title\":{\"type\":\"object\",\"name\":\"Title\",\"id\":\"p1482\"},\"renderers\":[{\"type\":\"object\",\"name\":\"GraphRenderer\",\"id\":\"p1507\",\"attributes\":{\"layout_provider\":{\"type\":\"object\",\"name\":\"StaticLayoutProvider\",\"id\":\"p1524\",\"attributes\":{\"graph_layout\":{\"type\":\"map\",\"entries\":[[1,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"3g9ydYITzj/RkTRsJbvSvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[2,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"2DKxNSC+0r9GYrimh/6wvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[3,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"KmQp2fNMvj+7A7zj84jaPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[4,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"bqsfBucN0z8qovs++wHkvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[5,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"DuX/R2dP6b+QohQjOnGyvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[6,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"PArNJ1TixT/1uWfcxdbvPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[7,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"I2HyZokU4z/mWDjCZArivw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[8,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"C4GRur2k5r/GZu4tx7GUvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[9,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"9xK0enpQ0T96fK5pqBrtPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[10,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"WtUGbbnd3D9LVFYIyKnovw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[11,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"PRV3qJIg6r+kDTQFYrnOvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[12,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"JlYq3Z4t0z9RfENR5ZjmPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[13,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"QbR5VALG4j+zo46TKbbnvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[14,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"YYcY21e/4r9YHHOpV5zVvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[15,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"XTIrQZWc1z/IPeI1kBLtPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[16,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"nwiaYCd70z++GCLDUO7nvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[17,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"xSZCnkud4L9+fZa9hTHOvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[18,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"QVd0aaO6rj8AWYfOIIvoPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[19,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"kdL+dwES2D8OSSbummzqvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[20,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"V4bvjwXo4r9dJX0jN22jvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[21,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"EddQKCpR0T8AAAAAAADwPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[22,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"JDMt968B4D/t3ipIyRTgvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[23,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"W9QGG7p06r/LUrRJ07XDvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[24,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"f22ilILp1z9HB63f14zpPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[25,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"4FYlnT3O4D/OC3nK7yjqvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[26,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"qWzZLmh56L+Dy6Ck5d3Tvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[27,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"IJAdlrrgoj+6YZcnKCvsPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[28,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"i/RusvTV4z/vtpYLJgflvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[29,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"0DAU+lrc5b/EzsoshYrWvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[30,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"Z+kRkatQtj8wPA/SjNDuPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[31,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"mZlbImtl2z9gPEoOcv7jvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[32,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"DQJo2O0j5L+wN6eOx1nGvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[33,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"u7dLL8vtyD+GETO4sYTpPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[34,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"Phywbjxloj/uEkhe+zefPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"node_renderer\":{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1512\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1509\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1510\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1511\"},\"data\":{\"type\":\"map\",\"entries\":[[\"label\",[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,\"OpinionCluster\",\"OpinionCluster\",\"OpinionCluster\",\"Bridge\"]],[\"type\",[\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Location\",\"Location\",\"Location\",\"Location\"]],[\"bipartite\",[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1]],[\"opinion\",[0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,null,null,null,null]],[\"index\",[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]],[\"_marker\",[\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"square\",\"square\",\"square\",\"square\"]],[\"_color\",[\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\"]],[\"_alpha\",[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5]],[\"_size\",[10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10]],[\"start_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"end_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"weight_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"index_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"label_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",1,1,1,1]],[\"type_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"opinion_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,\"none\",\"none\",\"none\",\"none\"]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1513\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1514\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1526\",\"attributes\":{\"size\":{\"type\":\"field\",\"field\":\"_size\"},\"line_color\":{\"type\":\"field\",\"field\":\"_color\"},\"line_alpha\":{\"type\":\"field\",\"field\":\"_alpha\"},\"fill_color\":{\"type\":\"field\",\"field\":\"_color\"},\"fill_alpha\":{\"type\":\"field\",\"field\":\"_alpha\"},\"marker\":{\"type\":\"field\",\"field\":\"_marker\"}}}}},\"edge_renderer\":{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1519\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1516\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1517\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1518\"},\"data\":{\"type\":\"map\",\"entries\":[[\"weight\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"start\",[1,1,2,2,3,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]],[\"end\",[31,34,32,34,33,34,31,32,33,31,32,33,31,32,33,31,32,33,31,32,33,31,32,33,31,32,33,31,32,33,31,32,33]],[\"_color\",[\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\"]],[\"_alpha\",[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]],[\"_size\",[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]],[\"start_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"end_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"weight_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"index_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"label_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"type_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"opinion_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1520\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1521\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"MultiLine\",\"id\":\"p1525\",\"attributes\":{\"line_color\":{\"type\":\"field\",\"field\":\"_color\"},\"line_alpha\":{\"type\":\"field\",\"field\":\"_alpha\"},\"line_width\":{\"type\":\"field\",\"field\":\"_size\"}}}}},\"selection_policy\":{\"type\":\"object\",\"name\":\"NodesOnly\",\"id\":\"p1522\"},\"inspection_policy\":{\"type\":\"object\",\"name\":\"NodesOnly\",\"id\":\"p1523\"}}}],\"toolbar\":{\"type\":\"object\",\"name\":\"Toolbar\",\"id\":\"p1483\",\"attributes\":{\"tools\":[{\"type\":\"object\",\"name\":\"BoxZoomTool\",\"id\":\"p1496\",\"attributes\":{\"dimensions\":\"both\",\"overlay\":{\"type\":\"object\",\"name\":\"BoxAnnotation\",\"id\":\"p1497\",\"attributes\":{\"syncable\":false,\"line_color\":\"black\",\"line_alpha\":1.0,\"line_width\":2,\"line_dash\":[4,4],\"fill_color\":\"lightgrey\",\"fill_alpha\":0.5,\"level\":\"overlay\",\"visible\":false,\"left\":{\"type\":\"number\",\"value\":\"nan\"},\"right\":{\"type\":\"number\",\"value\":\"nan\"},\"top\":{\"type\":\"number\",\"value\":\"nan\"},\"bottom\":{\"type\":\"number\",\"value\":\"nan\"},\"left_units\":\"canvas\",\"right_units\":\"canvas\",\"top_units\":\"canvas\",\"bottom_units\":\"canvas\",\"handles\":{\"type\":\"object\",\"name\":\"BoxInteractionHandles\",\"id\":\"p1503\",\"attributes\":{\"all\":{\"type\":\"object\",\"name\":\"AreaVisuals\",\"id\":\"p1502\",\"attributes\":{\"fill_color\":\"white\",\"hover_fill_color\":\"lightgray\"}}}}}}}},{\"type\":\"object\",\"name\":\"ResetTool\",\"id\":\"p1504\"},{\"type\":\"object\",\"name\":\"WheelZoomTool\",\"id\":\"p1505\",\"attributes\":{\"renderers\":\"auto\"}},{\"type\":\"object\",\"name\":\"PanTool\",\"id\":\"p1506\"},{\"type\":\"object\",\"name\":\"HoverTool\",\"id\":\"p1527\",\"attributes\":{\"renderers\":[{\"id\":\"p1519\"},{\"id\":\"p1512\"}],\"tooltips\":\"
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
start:@start
end:@end
weight:@weight
index:@index
label:@label
type:@type
opinion:@opinion
\",\"line_policy\":\"interp\"}}],\"logo\":null}},\"left\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1491\",\"attributes\":{\"visible\":false,\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1492\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1493\"},\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1494\"}}}],\"below\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1486\",\"attributes\":{\"visible\":false,\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1487\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1488\"},\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1489\"}}}],\"center\":[{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1490\",\"attributes\":{\"axis\":{\"id\":\"p1486\"},\"grid_line_color\":null}},{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1495\",\"attributes\":{\"dimension\":1,\"axis\":{\"id\":\"p1491\"},\"grid_line_color\":null}}]}}]}};\n const render_items = [{\"docid\":\"09825131-f77c-444d-ac49-fddce17f9600\",\"roots\":{\"p1475\":\"c834e6e6-c9f8-4c17-9c8a-252ff4e08715\"},\"root_ids\":[\"p1475\"],\"notebook_comms_target\":\"p1528\"}];\n void root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n }\n if (root.Bokeh !== undefined) {\n embed_document(root);\n } else {\n let attempts = 0;\n const timer = setInterval(function(root) {\n if (root.Bokeh !== undefined) {\n clearInterval(timer);\n embed_document(root);\n } else {\n attempts++;\n if (attempts > 100) {\n clearInterval(timer);\n console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n }\n }\n }, 10, root)\n }\n})(window);", "application/vnd.bokehjs_exec.v0+json": "" }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": "'use strict';\n(function(root) {\n function now() {\n return new Date();\n }\n\n const force = true;\n\n if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\nconst JS_MIME_TYPE = 'application/javascript';\n const HTML_MIME_TYPE = 'text/html';\n const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n const CLASS_NAME = 'output_bokeh rendered_html';\n\n /**\n * Render data to the DOM node\n */\n function render(props, node) {\n const script = document.createElement(\"script\");\n node.appendChild(script);\n }\n\n /**\n * Handle when an output is cleared or removed\n */\n function handleClearOutput(event, handle) {\n function drop(id) {\n const view = Bokeh.index.get_by_id(id)\n if (view != null) {\n view.model.document.clear()\n Bokeh.index.delete(view)\n }\n }\n\n const cell = handle.cell;\n\n const id = cell.output_area._bokeh_element_id;\n const server_id = cell.output_area._bokeh_server_id;\n\n // Clean up Bokeh references\n if (id != null) {\n drop(id)\n }\n\n if (server_id !== undefined) {\n // Clean up Bokeh references\n const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n cell.notebook.kernel.execute(cmd_clean, {\n iopub: {\n output: function(msg) {\n const id = msg.content.text.trim()\n drop(id)\n }\n }\n });\n // Destroy server and session\n const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n cell.notebook.kernel.execute(cmd_destroy);\n }\n }\n\n /**\n * Handle when a new output is added\n */\n function handleAddOutput(event, handle) {\n const output_area = handle.output_area;\n const output = handle.output;\n\n // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n return\n }\n\n const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n\n if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n // store reference to embed id on output_area\n output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n }\n if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n const bk_div = document.createElement(\"div\");\n bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n const script_attrs = bk_div.children[0].attributes;\n for (let i = 0; i < script_attrs.length; i++) {\n toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n }\n // store reference to server id on output_area\n output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n }\n }\n\n function register_renderer(events, OutputArea) {\n\n function append_mime(data, metadata, element) {\n // create a DOM node to render to\n const toinsert = this.create_output_subarea(\n metadata,\n CLASS_NAME,\n EXEC_MIME_TYPE\n );\n this.keyboard_manager.register_events(toinsert);\n // Render to node\n const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n render(props, toinsert[toinsert.length - 1]);\n element.append(toinsert);\n return toinsert\n }\n\n /* Handle when an output is cleared or removed */\n events.on('clear_output.CodeCell', handleClearOutput);\n events.on('delete.Cell', handleClearOutput);\n\n /* Handle when a new output is added */\n events.on('output_added.OutputArea', handleAddOutput);\n\n /**\n * Register the mime type and append_mime function with output_area\n */\n OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n /* Is output safe? */\n safe: true,\n /* Index of renderer in `output_area.display_order` */\n index: 0\n });\n }\n\n // register the mime type if in Jupyter Notebook environment and previously unregistered\n if (root.Jupyter !== undefined) {\n const events = require('base/js/events');\n const OutputArea = require('notebook/js/outputarea').OutputArea;\n\n if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n register_renderer(events, OutputArea);\n }\n }\n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n const NB_LOAD_WARNING = {'data': {'text/html':\n \"
\\n\"+\n \"

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

\\n\"+\n \"\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\n\n function display_loaded(error = null) {\n const el = document.getElementById(null);\n if (el != null) {\n const html = (() => {\n if (typeof root.Bokeh === \"undefined\") {\n if (error == null) {\n return \"BokehJS is loading ...\";\n } else {\n return \"BokehJS failed to load.\";\n }\n } else {\n const prefix = `BokehJS ${root.Bokeh.version}`;\n if (error == null) {\n return `${prefix} successfully loaded.`;\n } else {\n return `${prefix} encountered errors while loading and may not function as expected.`;\n }\n }\n })();\n el.innerHTML = html;\n\n if (error != null) {\n const wrapper = document.createElement(\"div\");\n wrapper.style.overflow = \"auto\";\n wrapper.style.height = \"5em\";\n wrapper.style.resize = \"vertical\";\n const content = document.createElement(\"div\");\n content.style.fontFamily = \"monospace\";\n content.style.whiteSpace = \"pre-wrap\";\n content.style.backgroundColor = \"rgb(255, 221, 221)\";\n content.textContent = error.stack ?? error.toString();\n wrapper.append(content);\n el.append(wrapper);\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(() => display_loaded(error), 100);\n }\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n\n function on_error(url) {\n console.error(\"failed to load \" + url);\n }\n\n for (let i = 0; i < css_urls.length; i++) {\n const url = css_urls[i];\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n }\n\n for (let i = 0; i < js_urls.length; i++) {\n const url = js_urls[i];\n const element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n const js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-3.7.1.min.js\"];\n const css_urls = [];\n\n const inline_js = [ function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\nfunction(Bokeh) {\n }\n ];\n\n function run_inline_js() {\n if (root.Bokeh !== undefined || force === true) {\n try {\n for (let i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\n\n } catch (error) {throw error;\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n const cell = $(document.getElementById(null)).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n }\n\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(css_urls, js_urls, function() {\n console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));", "application/vnd.bokehjs_load.v0+json": "" }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "
\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": "(function(root) {\n function embed_document(root) {\n const docs_json = {\"1f7334cd-b3f4-40e2-9cc0-694032d45636\":{\"version\":\"3.7.1\",\"title\":\"Bokeh Application\",\"roots\":[{\"type\":\"object\",\"name\":\"Figure\",\"id\":\"p1563\",\"attributes\":{\"width\":400,\"height\":400,\"x_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1564\"},\"y_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1565\"},\"x_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1572\"},\"y_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1573\"},\"title\":{\"type\":\"object\",\"name\":\"Title\",\"id\":\"p1570\"},\"renderers\":[{\"type\":\"object\",\"name\":\"GraphRenderer\",\"id\":\"p1595\",\"attributes\":{\"layout_provider\":{\"type\":\"object\",\"name\":\"StaticLayoutProvider\",\"id\":\"p1612\",\"attributes\":{\"graph_layout\":{\"type\":\"map\",\"entries\":[[1,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"/XHP/yoDpr/2yUJzGQLHPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[2,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"kih4QsWl4D+eJNmER4+gvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[3,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"qFSufiJK3L+8ehxJ81bRvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[4,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"I1by+lM1zr+JtEixqzLbPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[5,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"oLgUG/DN6j/iMOuYSQXBPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[6,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"hwxVrh6G5r+uY+kxUjHVvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[7,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"XR08XyRWv7/w7lJZUdHRPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[8,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"ZFIMZjBx7D8Ea5Kf7/+BPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[9,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"eG4gXnQT7b/vcBJXqsnZvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[10,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"4xVwCELTvL+l91ootyvfPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[11,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"iEQ3telf6T8NQW1Rpymwvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[12,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"PCOmLUJs6b83lO1rCRzZvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[13,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"sSv2sUggtr9txgnRqH7YPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[14,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"qLkXJxBU7j9BwMAKeTS9vw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[15,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"V+j14TU/6b+InPOzEFHhvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[16,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"LgDOrmhMnD9taHYrKtXcPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[17,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"85KIStnP7T8LERxY843BPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[18,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"wruzh4p35r8vXUnRrZfgvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[19,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"85Q87Z9MkT+yrRw1yRLWPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[20,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"/7zuKTQC6T/LaX+KrpqqPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[21,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"3Rnni9BK6b8HZYj2AhDRvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[22,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"xpkV25n3yL/SlXZuitvgPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[23,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"8T2iHlfV7z87drlWNcevPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[24,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"yPVlr5vB6782fVsdvYPfvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[25,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"6981op31pL+NGm07dXDhPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[26,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"192ofIxp6z89JxQC74fBvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[27,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"YRluGkMo7L/eiiP77a7Tvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[28,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"4GplzG6Gy7/PXi79P+zUPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[29,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAAA8D8SId6LWLGhvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[30,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"0WTDJala5b+/Kx7vvtvbvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"node_renderer\":{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1600\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1597\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1598\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1599\"},\"data\":{\"type\":\"map\",\"entries\":[[\"type\",[\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\"]],[\"opinion\",[0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2]],[\"index\",[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]],[\"_marker\",[\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\"]],[\"_color\",[\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\",\"#1f77b4\",\"#aec7e8\",\"#ff7f0e\"]],[\"_alpha\",[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5]],[\"_size\",[10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10]],[\"start_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"end_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"weight_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"index_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"type_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"opinion_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1601\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1602\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1614\",\"attributes\":{\"size\":{\"type\":\"field\",\"field\":\"_size\"},\"line_color\":{\"type\":\"field\",\"field\":\"_color\"},\"line_alpha\":{\"type\":\"field\",\"field\":\"_alpha\"},\"fill_color\":{\"type\":\"field\",\"field\":\"_color\"},\"fill_alpha\":{\"type\":\"field\",\"field\":\"_alpha\"},\"marker\":{\"type\":\"field\",\"field\":\"_marker\"}}}}},\"edge_renderer\":{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1607\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1604\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1605\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1606\"},\"data\":{\"type\":\"map\",\"entries\":[[\"weight\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"start\",[1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,8,8,8,8,8,8,8,9,9,9,9,9,9,9,10,10,10,10,10,10,11,11,11,11,11,11,12,12,12,12,12,12,13,13,13,13,13,14,14,14,14,14,15,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,20,20,20,21,21,21,22,22,23,23,24,24,25,26,27]],[\"end\",[2,3,4,7,10,13,16,19,22,25,28,3,5,8,11,14,17,20,23,26,29,6,9,12,15,18,21,24,27,30,7,10,13,16,19,22,25,28,8,11,14,17,20,23,26,29,9,12,15,18,21,24,27,30,10,13,16,19,22,25,28,11,14,17,20,23,26,29,12,15,18,21,24,27,30,13,16,19,22,25,28,14,17,20,23,26,29,15,18,21,24,27,30,16,19,22,25,28,17,20,23,26,29,18,21,24,27,30,19,22,25,28,20,23,26,29,21,24,27,30,22,25,28,23,26,29,24,27,30,25,28,26,29,27,30,28,29,30]],[\"_color\",[\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\"]],[\"_alpha\",[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]],[\"_size\",[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]],[\"start_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"end_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"weight_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"index_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"type_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"opinion_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1608\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1609\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"MultiLine\",\"id\":\"p1613\",\"attributes\":{\"line_color\":{\"type\":\"field\",\"field\":\"_color\"},\"line_alpha\":{\"type\":\"field\",\"field\":\"_alpha\"},\"line_width\":{\"type\":\"field\",\"field\":\"_size\"}}}}},\"selection_policy\":{\"type\":\"object\",\"name\":\"NodesOnly\",\"id\":\"p1610\"},\"inspection_policy\":{\"type\":\"object\",\"name\":\"NodesOnly\",\"id\":\"p1611\"}}}],\"toolbar\":{\"type\":\"object\",\"name\":\"Toolbar\",\"id\":\"p1571\",\"attributes\":{\"tools\":[{\"type\":\"object\",\"name\":\"BoxZoomTool\",\"id\":\"p1584\",\"attributes\":{\"dimensions\":\"both\",\"overlay\":{\"type\":\"object\",\"name\":\"BoxAnnotation\",\"id\":\"p1585\",\"attributes\":{\"syncable\":false,\"line_color\":\"black\",\"line_alpha\":1.0,\"line_width\":2,\"line_dash\":[4,4],\"fill_color\":\"lightgrey\",\"fill_alpha\":0.5,\"level\":\"overlay\",\"visible\":false,\"left\":{\"type\":\"number\",\"value\":\"nan\"},\"right\":{\"type\":\"number\",\"value\":\"nan\"},\"top\":{\"type\":\"number\",\"value\":\"nan\"},\"bottom\":{\"type\":\"number\",\"value\":\"nan\"},\"left_units\":\"canvas\",\"right_units\":\"canvas\",\"top_units\":\"canvas\",\"bottom_units\":\"canvas\",\"handles\":{\"type\":\"object\",\"name\":\"BoxInteractionHandles\",\"id\":\"p1591\",\"attributes\":{\"all\":{\"type\":\"object\",\"name\":\"AreaVisuals\",\"id\":\"p1590\",\"attributes\":{\"fill_color\":\"white\",\"hover_fill_color\":\"lightgray\"}}}}}}}},{\"type\":\"object\",\"name\":\"ResetTool\",\"id\":\"p1592\"},{\"type\":\"object\",\"name\":\"WheelZoomTool\",\"id\":\"p1593\",\"attributes\":{\"renderers\":\"auto\"}},{\"type\":\"object\",\"name\":\"PanTool\",\"id\":\"p1594\"},{\"type\":\"object\",\"name\":\"HoverTool\",\"id\":\"p1615\",\"attributes\":{\"renderers\":[{\"id\":\"p1607\"},{\"id\":\"p1600\"}],\"tooltips\":\"
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
start:@start
end:@end
weight:@weight
index:@index
type:@type
opinion:@opinion
\",\"line_policy\":\"interp\"}}],\"logo\":null}},\"left\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1579\",\"attributes\":{\"visible\":false,\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1580\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1581\"},\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1582\"}}}],\"below\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1574\",\"attributes\":{\"visible\":false,\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1575\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1576\"},\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1577\"}}}],\"center\":[{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1578\",\"attributes\":{\"axis\":{\"id\":\"p1574\"},\"grid_line_color\":null}},{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1583\",\"attributes\":{\"dimension\":1,\"axis\":{\"id\":\"p1579\"},\"grid_line_color\":null}}]}}]}};\n const render_items = [{\"docid\":\"1f7334cd-b3f4-40e2-9cc0-694032d45636\",\"roots\":{\"p1563\":\"dd93f55b-b3df-40ef-a072-63e296377bb3\"},\"root_ids\":[\"p1563\"],\"notebook_comms_target\":\"p1616\"}];\n void root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n }\n if (root.Bokeh !== undefined) {\n embed_document(root);\n } else {\n let attempts = 0;\n const timer = setInterval(function(root) {\n if (root.Bokeh !== undefined) {\n clearInterval(timer);\n embed_document(root);\n } else {\n attempts++;\n if (attempts > 100) {\n clearInterval(timer);\n console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n }\n }\n }, 10, root)\n }\n})(window);", "application/vnd.bokehjs_exec.v0+json": "" }, "metadata": {}, "output_type": "display_data" } ], "source": [ "class OpinionCluster(p2n.LocationDesigner):\n", " def split(self, agent):\n", " return agent.opinion\n", "\n", "\n", "class Bridge(p2n.LocationDesigner):\n", " n_locations = 1\n", "\n", " def bridge(self, agent):\n", " return agent.opinion\n", "\n", "\n", "model = p2n.Model()\n", "creator = p2n.Creator(model)\n", "inspector = p2n.NetworkInspector(model)\n", "\n", "for i in range(30):\n", " agent = p2n.Agent(model=model)\n", " agent.opinion = i % 3\n", "\n", "creator.create_locations(location_designers=[OpinionCluster, Bridge])\n", "\n", "inspector.plot_networks(agent_color=\"opinion\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example III - Barbells with long bars" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "LocationList (16 objects)" ] }, "execution_count": null, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import networkx as nx\n", "\n", "model = p2n.Model()\n", "creator = p2n.Creator(model)\n", "inspector = p2n.NetworkInspector(model)\n", "\n", "\n", "class Bell(p2n.LocationDesigner):\n", " n_agents = 5\n", " n_locations = 4\n", "\n", "\n", "class Bar(p2n.LocationDesigner):\n", " n_locations = 2\n", " nxgraph = nx.path_graph(5)\n", "\n", " def filter(self, agent):\n", " return not agent.Bell\n", "\n", "\n", "class Bridge(p2n.LocationDesigner):\n", " def filter(self, agent):\n", " return agent.Bar_head or agent.Bar_tail or agent.Bell_head\n", "\n", " def bridge(self, agent):\n", " return agent.Bar_assigned\n", "\n", "\n", "for _ in range(30):\n", " p2n.Agent(model)\n", "\n", "creator.create_locations(\n", " location_designers=[\n", " Bell,\n", " Bar,\n", " Bridge,\n", " ]\n", ")" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "application/javascript": "'use strict';\n(function(root) {\n function now() {\n return new Date();\n }\n\n const force = true;\n\n if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\nconst JS_MIME_TYPE = 'application/javascript';\n const HTML_MIME_TYPE = 'text/html';\n const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n const CLASS_NAME = 'output_bokeh rendered_html';\n\n /**\n * Render data to the DOM node\n */\n function render(props, node) {\n const script = document.createElement(\"script\");\n node.appendChild(script);\n }\n\n /**\n * Handle when an output is cleared or removed\n */\n function handleClearOutput(event, handle) {\n function drop(id) {\n const view = Bokeh.index.get_by_id(id)\n if (view != null) {\n view.model.document.clear()\n Bokeh.index.delete(view)\n }\n }\n\n const cell = handle.cell;\n\n const id = cell.output_area._bokeh_element_id;\n const server_id = cell.output_area._bokeh_server_id;\n\n // Clean up Bokeh references\n if (id != null) {\n drop(id)\n }\n\n if (server_id !== undefined) {\n // Clean up Bokeh references\n const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n cell.notebook.kernel.execute(cmd_clean, {\n iopub: {\n output: function(msg) {\n const id = msg.content.text.trim()\n drop(id)\n }\n }\n });\n // Destroy server and session\n const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n cell.notebook.kernel.execute(cmd_destroy);\n }\n }\n\n /**\n * Handle when a new output is added\n */\n function handleAddOutput(event, handle) {\n const output_area = handle.output_area;\n const output = handle.output;\n\n // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n return\n }\n\n const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n\n if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n // store reference to embed id on output_area\n output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n }\n if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n const bk_div = document.createElement(\"div\");\n bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n const script_attrs = bk_div.children[0].attributes;\n for (let i = 0; i < script_attrs.length; i++) {\n toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n }\n // store reference to server id on output_area\n output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n }\n }\n\n function register_renderer(events, OutputArea) {\n\n function append_mime(data, metadata, element) {\n // create a DOM node to render to\n const toinsert = this.create_output_subarea(\n metadata,\n CLASS_NAME,\n EXEC_MIME_TYPE\n );\n this.keyboard_manager.register_events(toinsert);\n // Render to node\n const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n render(props, toinsert[toinsert.length - 1]);\n element.append(toinsert);\n return toinsert\n }\n\n /* Handle when an output is cleared or removed */\n events.on('clear_output.CodeCell', handleClearOutput);\n events.on('delete.Cell', handleClearOutput);\n\n /* Handle when a new output is added */\n events.on('output_added.OutputArea', handleAddOutput);\n\n /**\n * Register the mime type and append_mime function with output_area\n */\n OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n /* Is output safe? */\n safe: true,\n /* Index of renderer in `output_area.display_order` */\n index: 0\n });\n }\n\n // register the mime type if in Jupyter Notebook environment and previously unregistered\n if (root.Jupyter !== undefined) {\n const events = require('base/js/events');\n const OutputArea = require('notebook/js/outputarea').OutputArea;\n\n if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n register_renderer(events, OutputArea);\n }\n }\n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n const NB_LOAD_WARNING = {'data': {'text/html':\n \"
\\n\"+\n \"

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

\\n\"+\n \"\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\n\n function display_loaded(error = null) {\n const el = document.getElementById(null);\n if (el != null) {\n const html = (() => {\n if (typeof root.Bokeh === \"undefined\") {\n if (error == null) {\n return \"BokehJS is loading ...\";\n } else {\n return \"BokehJS failed to load.\";\n }\n } else {\n const prefix = `BokehJS ${root.Bokeh.version}`;\n if (error == null) {\n return `${prefix} successfully loaded.`;\n } else {\n return `${prefix} encountered errors while loading and may not function as expected.`;\n }\n }\n })();\n el.innerHTML = html;\n\n if (error != null) {\n const wrapper = document.createElement(\"div\");\n wrapper.style.overflow = \"auto\";\n wrapper.style.height = \"5em\";\n wrapper.style.resize = \"vertical\";\n const content = document.createElement(\"div\");\n content.style.fontFamily = \"monospace\";\n content.style.whiteSpace = \"pre-wrap\";\n content.style.backgroundColor = \"rgb(255, 221, 221)\";\n content.textContent = error.stack ?? error.toString();\n wrapper.append(content);\n el.append(wrapper);\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(() => display_loaded(error), 100);\n }\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n\n function on_error(url) {\n console.error(\"failed to load \" + url);\n }\n\n for (let i = 0; i < css_urls.length; i++) {\n const url = css_urls[i];\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n }\n\n for (let i = 0; i < js_urls.length; i++) {\n const url = js_urls[i];\n const element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n const js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-3.7.1.min.js\"];\n const css_urls = [];\n\n const inline_js = [ function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\nfunction(Bokeh) {\n }\n ];\n\n function run_inline_js() {\n if (root.Bokeh !== undefined || force === true) {\n try {\n for (let i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\n\n } catch (error) {throw error;\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n const cell = $(document.getElementById(null)).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n }\n\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(css_urls, js_urls, function() {\n console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));", "application/vnd.bokehjs_load.v0+json": "" }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "
\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": "(function(root) {\n function embed_document(root) {\n const docs_json = {\"5caf13a6-2475-48c4-9875-130fe7785351\":{\"version\":\"3.7.1\",\"title\":\"Bokeh Application\",\"roots\":[{\"type\":\"object\",\"name\":\"Figure\",\"id\":\"p1647\",\"attributes\":{\"width\":400,\"height\":400,\"x_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1648\"},\"y_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1649\"},\"x_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1656\"},\"y_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1657\"},\"title\":{\"type\":\"object\",\"name\":\"Title\",\"id\":\"p1654\"},\"renderers\":[{\"type\":\"object\",\"name\":\"GraphRenderer\",\"id\":\"p1679\",\"attributes\":{\"layout_provider\":{\"type\":\"object\",\"name\":\"StaticLayoutProvider\",\"id\":\"p1696\",\"attributes\":{\"graph_layout\":{\"type\":\"map\",\"entries\":[[1,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"PYFG1OCpzz8rT2tRMzfhPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[2,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"pUMvWywn1T/AKZHL5XHpPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[3,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"VExXNEjL3T/QdY7GjGPoPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[4,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"YiqxuI8O2j8ey2yoZ9/pPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[5,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"yQWr5IVk3j9IrxvAVPvlPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[6,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"oYURfd+95D+KqwrCT4fRvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[7,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"ZtKZppT77D+bHrERSyHUvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[8,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"KgajD02K7D9ncsHnOHrBvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[9,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"MKyZ2K+/7j+yHBy7JprQvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[10,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"8aHQm7GB7j8kQTKb2KbHvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[11,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"O91p7u2OzD9ttPW39d3mvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[12,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"pp/yHQwj2z8QNvPVGpnuvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[13,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"C/U7Pq4c0j/omGx2q77vvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[14,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"CPFPt7rv2z8iRbt7HBTsvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[15,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"IBRbwtsQ1z8AAAAAAADwvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[16,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"LJ+3ggoa578zrMa7Ec/hPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[17,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"MoZDTbGL5r8pojMRZ63nPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[18,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"DCJhcOWe4b+9AsCV2x3oPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[19,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"TFKnsicy5L93dzFEXO3oPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[20,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"Gmv3ekdR4L95UHOy8sXjPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[21,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"rhhlx296er/SDBqO6jHXvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[22,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"5OuL+LiY0b/dvnHQ8zGmvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[23,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"nyUc2okD4r9XwpTSq+LCPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[24,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"BFKU0ICF67+dWmQKf7rLPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[25,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"1YftINvl7b+gVz9B0dvYPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[26,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"/IvCWCKzhj9AkSwvng3OPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[27,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"C4thZDB5y7/EHlHLeiW2vw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[28,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"xWPYilj007/ZXXHs3QzZvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[29,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"aG7Sn18rsr/HnEKr1fffvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[30,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"jSI44knk0T/xyB0UNAfZvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[31,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"Lm5GMBh31z/TW3ctsRjmPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[32,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"HFMK08TK6j+blIvN62/Nvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[33,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"s+fxMkcn1T/52NcLFyXsvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[34,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"WHaCQkKR47/I9OJK0TDlPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[35,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"+m/oQEvf5r8pgl48sdTHPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[36,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"mpQ46C6T2r/m/G8PyZ+yPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[37,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"3liMwUz7wL8Z0cHCsNnIvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[38,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"in1Yva2x7r/e9Ih6AVDSPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[39,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"LcNtky80zL/FSAtT8Ejfvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[40,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"7j+cRZkj07/MMAjXUTDPvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[41,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"rJzBITNpur8HKFH6pSW0Pw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[42,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"+dnQJQzOuD+L0j0B7NLcvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[43,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"qNoRKV9v6r+Unuo3w07dPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[44,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"CSGZS1wkwD+lO3rb53TYPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[45,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"MLaAxErcvD/92aD+GFfhvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[46,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"4woUMkih3T+CP1KdCBjVvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"node_renderer\":{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1684\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1681\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1682\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1683\"},\"data\":{\"type\":\"map\",\"entries\":[[\"label\",[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,\"Bell\",\"Bell\",\"Bell\",\"Bell\",\"Bar\",\"Bar\",\"Bar\",\"Bar\",\"Bar\",\"Bar\",\"Bar\",\"Bar\",\"Bridge\",\"Bridge\",\"Bridge\",\"Bridge\"]],[\"type\",[\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\"]],[\"bipartite\",[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"index\",[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]],[\"_marker\",[\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\"]],[\"_color\",[\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\"]],[\"_alpha\",[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5]],[\"_size\",[10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10]],[\"start_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"end_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"weight_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"index_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"label_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"type_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1685\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1686\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1698\",\"attributes\":{\"size\":{\"type\":\"field\",\"field\":\"_size\"},\"line_color\":{\"type\":\"field\",\"field\":\"_color\"},\"line_alpha\":{\"type\":\"field\",\"field\":\"_alpha\"},\"fill_color\":{\"type\":\"field\",\"field\":\"_color\"},\"fill_alpha\":{\"type\":\"field\",\"field\":\"_alpha\"},\"marker\":{\"type\":\"field\",\"field\":\"_marker\"}}}}},\"edge_renderer\":{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1691\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1688\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1689\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1690\"},\"data\":{\"type\":\"map\",\"entries\":[[\"weight\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"start\",[1,1,2,3,4,5,6,6,7,8,9,10,11,11,12,13,14,15,16,16,17,18,19,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,30,30]],[\"end\",[31,44,31,31,31,31,32,46,32,32,32,32,33,45,33,33,33,33,34,43,34,34,34,34,37,45,36,37,35,36,35,38,38,43,41,44,40,41,39,40,39,42,42,46]],[\"_color\",[\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\"]],[\"_alpha\",[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]],[\"_size\",[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]],[\"start_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"end_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"weight_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"index_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"label_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"type_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1692\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1693\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"MultiLine\",\"id\":\"p1697\",\"attributes\":{\"line_color\":{\"type\":\"field\",\"field\":\"_color\"},\"line_alpha\":{\"type\":\"field\",\"field\":\"_alpha\"},\"line_width\":{\"type\":\"field\",\"field\":\"_size\"}}}}},\"selection_policy\":{\"type\":\"object\",\"name\":\"NodesOnly\",\"id\":\"p1694\"},\"inspection_policy\":{\"type\":\"object\",\"name\":\"NodesOnly\",\"id\":\"p1695\"}}}],\"toolbar\":{\"type\":\"object\",\"name\":\"Toolbar\",\"id\":\"p1655\",\"attributes\":{\"tools\":[{\"type\":\"object\",\"name\":\"BoxZoomTool\",\"id\":\"p1668\",\"attributes\":{\"dimensions\":\"both\",\"overlay\":{\"type\":\"object\",\"name\":\"BoxAnnotation\",\"id\":\"p1669\",\"attributes\":{\"syncable\":false,\"line_color\":\"black\",\"line_alpha\":1.0,\"line_width\":2,\"line_dash\":[4,4],\"fill_color\":\"lightgrey\",\"fill_alpha\":0.5,\"level\":\"overlay\",\"visible\":false,\"left\":{\"type\":\"number\",\"value\":\"nan\"},\"right\":{\"type\":\"number\",\"value\":\"nan\"},\"top\":{\"type\":\"number\",\"value\":\"nan\"},\"bottom\":{\"type\":\"number\",\"value\":\"nan\"},\"left_units\":\"canvas\",\"right_units\":\"canvas\",\"top_units\":\"canvas\",\"bottom_units\":\"canvas\",\"handles\":{\"type\":\"object\",\"name\":\"BoxInteractionHandles\",\"id\":\"p1675\",\"attributes\":{\"all\":{\"type\":\"object\",\"name\":\"AreaVisuals\",\"id\":\"p1674\",\"attributes\":{\"fill_color\":\"white\",\"hover_fill_color\":\"lightgray\"}}}}}}}},{\"type\":\"object\",\"name\":\"ResetTool\",\"id\":\"p1676\"},{\"type\":\"object\",\"name\":\"WheelZoomTool\",\"id\":\"p1677\",\"attributes\":{\"renderers\":\"auto\"}},{\"type\":\"object\",\"name\":\"PanTool\",\"id\":\"p1678\"},{\"type\":\"object\",\"name\":\"HoverTool\",\"id\":\"p1699\",\"attributes\":{\"renderers\":[{\"id\":\"p1691\"},{\"id\":\"p1684\"}],\"tooltips\":\"
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
start:@start
end:@end
weight:@weight
index:@index
label:@label
type:@type
\",\"line_policy\":\"interp\"}}],\"logo\":null}},\"left\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1663\",\"attributes\":{\"visible\":false,\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1664\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1665\"},\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1666\"}}}],\"below\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1658\",\"attributes\":{\"visible\":false,\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1659\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1660\"},\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1661\"}}}],\"center\":[{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1662\",\"attributes\":{\"axis\":{\"id\":\"p1658\"},\"grid_line_color\":null}},{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1667\",\"attributes\":{\"dimension\":1,\"axis\":{\"id\":\"p1663\"},\"grid_line_color\":null}}]}}]}};\n const render_items = [{\"docid\":\"5caf13a6-2475-48c4-9875-130fe7785351\",\"roots\":{\"p1647\":\"e0495b76-20f5-4b26-b9b8-7555aa0c9315\"},\"root_ids\":[\"p1647\"],\"notebook_comms_target\":\"p1700\"}];\n void root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n }\n if (root.Bokeh !== undefined) {\n embed_document(root);\n } else {\n let attempts = 0;\n const timer = setInterval(function(root) {\n if (root.Bokeh !== undefined) {\n clearInterval(timer);\n embed_document(root);\n } else {\n attempts++;\n if (attempts > 100) {\n clearInterval(timer);\n console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n }\n }\n }, 10, root)\n }\n})(window);", "application/vnd.bokehjs_exec.v0+json": "" }, "metadata": {}, "output_type": "display_data" } ], "source": [ "inspector.plot_bipartite_network()" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "application/javascript": "'use strict';\n(function(root) {\n function now() {\n return new Date();\n }\n\n const force = true;\n\n if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\nconst JS_MIME_TYPE = 'application/javascript';\n const HTML_MIME_TYPE = 'text/html';\n const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n const CLASS_NAME = 'output_bokeh rendered_html';\n\n /**\n * Render data to the DOM node\n */\n function render(props, node) {\n const script = document.createElement(\"script\");\n node.appendChild(script);\n }\n\n /**\n * Handle when an output is cleared or removed\n */\n function handleClearOutput(event, handle) {\n function drop(id) {\n const view = Bokeh.index.get_by_id(id)\n if (view != null) {\n view.model.document.clear()\n Bokeh.index.delete(view)\n }\n }\n\n const cell = handle.cell;\n\n const id = cell.output_area._bokeh_element_id;\n const server_id = cell.output_area._bokeh_server_id;\n\n // Clean up Bokeh references\n if (id != null) {\n drop(id)\n }\n\n if (server_id !== undefined) {\n // Clean up Bokeh references\n const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n cell.notebook.kernel.execute(cmd_clean, {\n iopub: {\n output: function(msg) {\n const id = msg.content.text.trim()\n drop(id)\n }\n }\n });\n // Destroy server and session\n const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n cell.notebook.kernel.execute(cmd_destroy);\n }\n }\n\n /**\n * Handle when a new output is added\n */\n function handleAddOutput(event, handle) {\n const output_area = handle.output_area;\n const output = handle.output;\n\n // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n return\n }\n\n const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n\n if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n // store reference to embed id on output_area\n output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n }\n if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n const bk_div = document.createElement(\"div\");\n bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n const script_attrs = bk_div.children[0].attributes;\n for (let i = 0; i < script_attrs.length; i++) {\n toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n }\n // store reference to server id on output_area\n output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n }\n }\n\n function register_renderer(events, OutputArea) {\n\n function append_mime(data, metadata, element) {\n // create a DOM node to render to\n const toinsert = this.create_output_subarea(\n metadata,\n CLASS_NAME,\n EXEC_MIME_TYPE\n );\n this.keyboard_manager.register_events(toinsert);\n // Render to node\n const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n render(props, toinsert[toinsert.length - 1]);\n element.append(toinsert);\n return toinsert\n }\n\n /* Handle when an output is cleared or removed */\n events.on('clear_output.CodeCell', handleClearOutput);\n events.on('delete.Cell', handleClearOutput);\n\n /* Handle when a new output is added */\n events.on('output_added.OutputArea', handleAddOutput);\n\n /**\n * Register the mime type and append_mime function with output_area\n */\n OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n /* Is output safe? */\n safe: true,\n /* Index of renderer in `output_area.display_order` */\n index: 0\n });\n }\n\n // register the mime type if in Jupyter Notebook environment and previously unregistered\n if (root.Jupyter !== undefined) {\n const events = require('base/js/events');\n const OutputArea = require('notebook/js/outputarea').OutputArea;\n\n if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n register_renderer(events, OutputArea);\n }\n }\n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n const NB_LOAD_WARNING = {'data': {'text/html':\n \"
\\n\"+\n \"

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

\\n\"+\n \"\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"\\n\"+\n \"
\"}};\n\n function display_loaded(error = null) {\n const el = document.getElementById(null);\n if (el != null) {\n const html = (() => {\n if (typeof root.Bokeh === \"undefined\") {\n if (error == null) {\n return \"BokehJS is loading ...\";\n } else {\n return \"BokehJS failed to load.\";\n }\n } else {\n const prefix = `BokehJS ${root.Bokeh.version}`;\n if (error == null) {\n return `${prefix} successfully loaded.`;\n } else {\n return `${prefix} encountered errors while loading and may not function as expected.`;\n }\n }\n })();\n el.innerHTML = html;\n\n if (error != null) {\n const wrapper = document.createElement(\"div\");\n wrapper.style.overflow = \"auto\";\n wrapper.style.height = \"5em\";\n wrapper.style.resize = \"vertical\";\n const content = document.createElement(\"div\");\n content.style.fontFamily = \"monospace\";\n content.style.whiteSpace = \"pre-wrap\";\n content.style.backgroundColor = \"rgb(255, 221, 221)\";\n content.textContent = error.stack ?? error.toString();\n wrapper.append(content);\n el.append(wrapper);\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(() => display_loaded(error), 100);\n }\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n\n function on_error(url) {\n console.error(\"failed to load \" + url);\n }\n\n for (let i = 0; i < css_urls.length; i++) {\n const url = css_urls[i];\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n }\n\n for (let i = 0; i < js_urls.length; i++) {\n const url = js_urls[i];\n const element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error.bind(null, url);\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n const js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.7.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-3.7.1.min.js\"];\n const css_urls = [];\n\n const inline_js = [ function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\nfunction(Bokeh) {\n }\n ];\n\n function run_inline_js() {\n if (root.Bokeh !== undefined || force === true) {\n try {\n for (let i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\n\n } catch (error) {throw error;\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n const cell = $(document.getElementById(null)).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n }\n\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(css_urls, js_urls, function() {\n console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));", "application/vnd.bokehjs_load.v0+json": "" }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "\n", "
\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": "(function(root) {\n function embed_document(root) {\n const docs_json = {\"b508e17d-39ad-4b12-b6ae-45b9e3bcc547\":{\"version\":\"3.7.1\",\"title\":\"Bokeh Application\",\"roots\":[{\"type\":\"object\",\"name\":\"Figure\",\"id\":\"p1747\",\"attributes\":{\"width\":400,\"height\":400,\"x_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1748\"},\"y_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1749\"},\"x_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1756\"},\"y_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1757\"},\"title\":{\"type\":\"object\",\"name\":\"Title\",\"id\":\"p1754\"},\"renderers\":[{\"type\":\"object\",\"name\":\"GraphRenderer\",\"id\":\"p1779\",\"attributes\":{\"layout_provider\":{\"type\":\"object\",\"name\":\"StaticLayoutProvider\",\"id\":\"p1796\",\"attributes\":{\"graph_layout\":{\"type\":\"map\",\"entries\":[[1,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"cfJWqJP2tj8HFXH5S3Lovw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[2,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"7JJKRduawD/xEZWju5Dqvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[3,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"k/cwVZwRxj/hNFVHTlPrvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[4,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"aLXRu+ypxT/WnKYYncHovw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[5,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"rm6Q3RI2yj/6qwPT08rpvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[6,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"g+zJRJa16L9j0frcYxzNvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[7,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"4o0T7dxf7L+Ske6m+EHJvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[8,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"zKgcNAWc679zgtlFxyrCvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[9,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"V+fmoxv66b8D/2T3KbzCvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[10,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"mH6sl87X6r8niRXlOV7Kvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[11,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"cLXX5MOilj+coLjDgyDsPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[12,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"kAt+WwYMjL8AAAAAAADwPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[13,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"wDhFMsm5rr9LLnGGsaXuPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[14,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"SQithBFZnj+Q3aRz1vPuPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[15,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"nLeLGXRql7+p8Oz7H8rtPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[16,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"Cd3T++sG5j9jNxl9WNPCPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[17,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"98PiThhC6D8H817JD0vBPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[18,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"7W+Rh+jY6T+MN/TBaenAPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[19,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"TAe+LOab5z97hDGfEHiyPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[20,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"EQnVNH0/6T/ojzAnpg+zPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[21,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"Y1MaErIauD8gUGOo5xPnPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[22,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"JLn+APD+xj+efHnebITiPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[23,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"CHRUWyaE0j+xwu7rMUfdPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[24,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"K1hA4+aI2j8rERnbn2TWPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[25,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"KinN8tCH4T9cYfOffrjPPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[26,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"NlEXNnmvsr/VcSn3v2bmvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[27,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"E7ui8wuNzb/d8G/tx1Lkvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[28,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"eDs9TGJq2L9QpVy0NdXhvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[29,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"utHvQ0Gt4L9MhDcddo/dvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[30,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"It4deWHC5L/hebOLpWLWvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"node_renderer\":{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1784\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1781\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1782\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1783\"},\"data\":{\"type\":\"map\",\"entries\":[[\"type\",[\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\",\"Agent\"]],[\"index\",[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]],[\"_marker\",[\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\",\"circle\"]],[\"_color\",[\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\",\"firebrick\"]],[\"_alpha\",[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5]],[\"_size\",[10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10]],[\"start_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"end_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"weight_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"index_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"type_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1785\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1786\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1798\",\"attributes\":{\"size\":{\"type\":\"field\",\"field\":\"_size\"},\"line_color\":{\"type\":\"field\",\"field\":\"_color\"},\"line_alpha\":{\"type\":\"field\",\"field\":\"_alpha\"},\"fill_color\":{\"type\":\"field\",\"field\":\"_color\"},\"fill_alpha\":{\"type\":\"field\",\"field\":\"_alpha\"},\"marker\":{\"type\":\"field\",\"field\":\"_marker\"}}}}},\"edge_renderer\":{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1791\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1788\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1789\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1790\"},\"data\":{\"type\":\"map\",\"entries\":[[\"weight\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"start\",[1,1,1,1,1,2,2,2,3,3,4,6,6,6,6,6,7,7,7,8,8,9,11,11,11,11,11,12,12,12,13,13,14,16,16,16,16,16,17,17,17,18,18,19,21,22,23,24,26,27,28,29]],[\"end\",[2,3,4,5,26,3,4,5,4,5,5,7,8,9,10,30,8,9,10,9,10,10,12,13,14,15,21,13,14,15,14,15,15,17,18,19,20,25,18,19,20,19,20,20,22,23,24,25,27,28,29,30]],[\"_color\",[\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\",\"#440154\"]],[\"_alpha\",[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]],[\"_size\",[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]],[\"start_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"end_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"weight_display\",[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],[\"index_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]],[\"type_display\",[\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\"]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1792\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1793\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"MultiLine\",\"id\":\"p1797\",\"attributes\":{\"line_color\":{\"type\":\"field\",\"field\":\"_color\"},\"line_alpha\":{\"type\":\"field\",\"field\":\"_alpha\"},\"line_width\":{\"type\":\"field\",\"field\":\"_size\"}}}}},\"selection_policy\":{\"type\":\"object\",\"name\":\"NodesOnly\",\"id\":\"p1794\"},\"inspection_policy\":{\"type\":\"object\",\"name\":\"NodesOnly\",\"id\":\"p1795\"}}}],\"toolbar\":{\"type\":\"object\",\"name\":\"Toolbar\",\"id\":\"p1755\",\"attributes\":{\"tools\":[{\"type\":\"object\",\"name\":\"BoxZoomTool\",\"id\":\"p1768\",\"attributes\":{\"dimensions\":\"both\",\"overlay\":{\"type\":\"object\",\"name\":\"BoxAnnotation\",\"id\":\"p1769\",\"attributes\":{\"syncable\":false,\"line_color\":\"black\",\"line_alpha\":1.0,\"line_width\":2,\"line_dash\":[4,4],\"fill_color\":\"lightgrey\",\"fill_alpha\":0.5,\"level\":\"overlay\",\"visible\":false,\"left\":{\"type\":\"number\",\"value\":\"nan\"},\"right\":{\"type\":\"number\",\"value\":\"nan\"},\"top\":{\"type\":\"number\",\"value\":\"nan\"},\"bottom\":{\"type\":\"number\",\"value\":\"nan\"},\"left_units\":\"canvas\",\"right_units\":\"canvas\",\"top_units\":\"canvas\",\"bottom_units\":\"canvas\",\"handles\":{\"type\":\"object\",\"name\":\"BoxInteractionHandles\",\"id\":\"p1775\",\"attributes\":{\"all\":{\"type\":\"object\",\"name\":\"AreaVisuals\",\"id\":\"p1774\",\"attributes\":{\"fill_color\":\"white\",\"hover_fill_color\":\"lightgray\"}}}}}}}},{\"type\":\"object\",\"name\":\"ResetTool\",\"id\":\"p1776\"},{\"type\":\"object\",\"name\":\"WheelZoomTool\",\"id\":\"p1777\",\"attributes\":{\"renderers\":\"auto\"}},{\"type\":\"object\",\"name\":\"PanTool\",\"id\":\"p1778\"},{\"type\":\"object\",\"name\":\"HoverTool\",\"id\":\"p1799\",\"attributes\":{\"renderers\":[{\"id\":\"p1791\"},{\"id\":\"p1784\"}],\"tooltips\":\"
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
start:@start
end:@end
weight:@weight
index:@index
type:@type
\",\"line_policy\":\"interp\"}}],\"logo\":null}},\"left\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1763\",\"attributes\":{\"visible\":false,\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1764\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1765\"},\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1766\"}}}],\"below\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1758\",\"attributes\":{\"visible\":false,\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1759\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1760\"},\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1761\"}}}],\"center\":[{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1762\",\"attributes\":{\"axis\":{\"id\":\"p1758\"},\"grid_line_color\":null}},{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1767\",\"attributes\":{\"dimension\":1,\"axis\":{\"id\":\"p1763\"},\"grid_line_color\":null}}]}}]}};\n const render_items = [{\"docid\":\"b508e17d-39ad-4b12-b6ae-45b9e3bcc547\",\"roots\":{\"p1747\":\"e51534fc-462a-40e5-8675-586c88d9b328\"},\"root_ids\":[\"p1747\"],\"notebook_comms_target\":\"p1800\"}];\n void root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n }\n if (root.Bokeh !== undefined) {\n embed_document(root);\n } else {\n let attempts = 0;\n const timer = setInterval(function(root) {\n if (root.Bokeh !== undefined) {\n clearInterval(timer);\n embed_document(root);\n } else {\n attempts++;\n if (attempts > 100) {\n clearInterval(timer);\n console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n }\n }\n }, 10, root)\n }\n})(window);", "application/vnd.bokehjs_exec.v0+json": "" }, "metadata": {}, "output_type": "display_data" } ], "source": [ "inspector.plot_agent_network()" ] } ], "metadata": { "kernelspec": { "display_name": ".venv", "language": "python", "name": "python3" }, "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 2 }