{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Network model export\n", "\n", "A network generated with Pop2net can be exported as a networkx graph object using `model.export_bipartite_network()` and `model.export__network()`.\n", "\n", "First, let us create a example network:" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[,\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", " ]" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import random\n", "\n", "import networkx as nx\n", "\n", "import pop2net as p2n\n", "\n", "N_RINGS = 5\n", "N_ACTORS = 25\n", "env = p2n.Environment()\n", "creator = p2n.Creator(env)\n", "inspector = p2n.NetworkInspector(env)\n", "\n", "\n", "class MyActor(p2n.Actor):\n", " def __init__(self):\n", " super().__init__()\n", " self.age = random.randint(20, 80)\n", "\n", "\n", "class Ring(p2n.LocationDesigner):\n", " n_locations = N_RINGS\n", " nxgraph = nx.cycle_graph(int(N_ACTORS / N_RINGS))\n", "\n", " def weight(self, actor):\n", " return 10\n", "\n", "\n", "class Bridge(p2n.LocationDesigner):\n", " def mutate(self):\n", " return {\"focal_ring_id\": list(range(N_RINGS))}\n", "\n", " def filter(self, actor):\n", " return actor.Ring_id in [self.focal_ring_id, self.focal_ring_id + 1]\n", "\n", " def split(self, actor):\n", " return actor.Ring_position\n", "\n", "\n", "creator.create_actors(n=N_ACTORS, actor_class=MyActor)\n", "creator.create_locations(location_designers=[Ring, Bridge])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's have look on the network before we export it:" ] }, { "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 \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n \"
  • use INLINE resources instead, as so:
  • \\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 = {\"6322ae5f-143b-4bef-8834-ccace70b05af\":{\"version\":\"3.7.1\",\"title\":\"Bokeh Application\",\"roots\":[{\"type\":\"object\",\"name\":\"Figure\",\"id\":\"p1209\",\"attributes\":{\"width\":400,\"height\":400,\"x_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1210\"},\"y_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1211\"},\"x_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1218\"},\"y_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1219\"},\"title\":{\"type\":\"object\",\"name\":\"Title\",\"id\":\"p1216\"},\"renderers\":[{\"type\":\"object\",\"name\":\"GraphRenderer\",\"id\":\"p1241\",\"attributes\":{\"layout_provider\":{\"type\":\"object\",\"name\":\"StaticLayoutProvider\",\"id\":\"p1258\",\"attributes\":{\"graph_layout\":{\"type\":\"map\",\"entries\":[[0,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"Voxk2zL2vT9DxJZ54X/oPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[1,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"FVuRRvKepr/vletENAHnPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[2,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"nVCTnLdIzb860uj0uZjkPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[3,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"xowLtR0Mxr8NQBZ/i4zkPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[4,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"NJGd/bttkD9WUAyDh8rlPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[5,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"1O54S1CnsL++TK23Dl7APw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[6,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"jEyWXcyqwb8ezvlaW1Cwvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[7,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"ECxf/gBR1r9akNt/3OLAvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[8,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"ynxMJDxn3b/EoGfLgniAPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[9,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"JafM4y7/0b+JhKIqzSTBPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[10,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"6ZhqoC+WzL+Cg+Dy1kSWPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[11,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"X21o/Ch71L/1H50bCvPMvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[12,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"UmBuBfiT4L+5kwqzQKjSvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[13,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"MTggpJQx4r9cbYduapzFvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[14,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"+PKwG3uk2r9CiWZvyJOPPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[15,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"Er046c+S0D9YkF010gbKvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[16,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"vmzwBFDwsz+FUU/51ibSvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[17,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"t8WQW4VlwL9lQB9KKZjOvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[18,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"CopT87+Whj+PWQgnugLYvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[19,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"oEsWtOzVyD8o46JjANLUvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[20,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"3Ar6ppyh5D/EtwxWHJPSvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[21,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"jKYfDlrS2j9XnW3yHwTKvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[22,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"GElYfPyu1T+9jwR/00WnPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[23,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"qxf2O6pM4j/FaAh7Lg6Yvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[24,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"POMIRTMf5z/IUM3/rrDFvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[25,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"UEI9pMv5tj/iZTJyu5DnPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[26,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"XXLxMu9Osr+YwU6Z1nXlPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[27,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"Acom2sfbpD+D0p994xbpPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[28,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"oobQ9pBKwr/HFMnhSsnmPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[29,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"HR6/aQz2zL+5AVjDg2LmPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[30,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"eXfS/gB+xb8E3CheJD7APw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[31,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"gOYHAmvy179IJqWf8jyuPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[32,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"/t70m3BTsr813l/yxNiPPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[33,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"euNjVz9Tzb9SFEo3jafCvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[34,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"TxXlviiD27/UzC6RMRq5vw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[35,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"UOBiQCau1L+4MHIuP/KuPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[36,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"Gc+meZHI4L+PO6BPnYetvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[37,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"sfXOMnH/0L9gBq+hgr+4vw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[38,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"jC9YC00y278ig5wxSgHSvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[39,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"NqYlygnR4r8/xmuNKaPPvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[40,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"oyLu3dtJ0D+QClNoLe7Rvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[41,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"2OG3O75Huz/8n+Xj6uLXvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[42,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"CF8cdSj1xT9yvoA3FczNvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[43,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"M3ckfKFQmr9Od5k3/P/Qvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[44,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"TK7OX7+vs7/A4BCAM/nUvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[45,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"VHvSEQCR5j8FzIFlUt3Ovw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[46,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"tmUtLAVM5T+rub/ag220vw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[47,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"jMcTZgMh4T8eFF0+lZbQvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[48,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"qgz92wQ31z/qbOYJ64yyvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[49,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"RjWJGHS33T8ondtzm7agPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[50,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"OmJzVBR8tT+Zqeq7+znePw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[51,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"bSC/YNfetb9Mo5Nx8+HWPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[52,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"vXwtiR1g1r/a4XBi7pTSPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[53,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"B+roqRrg2b/iJ9CEUuXYPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[54,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"mBl681uQxr9CtMtXsZvdPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[55,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"yZEKelSbtL9SMNbLQbXMPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[56,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"a1LNeNW+z7/v6oU7zPDUvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[57,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"zCb4moOn4b9UFjcZ0kXZvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[58,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"GZk4MQ4R57/9zE8pUkG2vw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[59,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"zhROG+8C4b/QUnSTrvnHPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[60,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"TuxJgXqquz9o6vC6aTSYPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[61,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"Jkv0ILsDw78LCTQ2nRzcvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[62,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"5vcxZR6g378nP6ZOrzTVvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[63,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"+dYJOuF61b+fQlvKkz/avw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[64,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"3ffK8QBGtL9rXTHw+WvAvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[65,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"Fq6eNRpV4T/dYx6GtpjLvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[66,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"JT99j5/h0z/TNqsR+G7avw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[67,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"sAQZfTICoj/oM/PO4biuPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[68,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"xWJHn2hr1j/E+bHxJC7Rvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[69,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"tG0gvfva4D+5P6wYO17Xvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[70,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"u/fF9c7C6z/tpPJt77Dcvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[71,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"HFOTNWye3T9ccwDRZCHfvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[72,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"d5j2Nl6Gxj/wTYmszs7TPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[73,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"27csiACG6j9i6NqdfwW2Pw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[74,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAAA8D+XTPUnRPHIvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"node_renderer\":{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1246\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1243\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1244\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1245\"},\"data\":{\"type\":\"map\",\"entries\":[[\"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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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\",[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,\"Ring\",\"Ring\",\"Ring\",\"Ring\",\"Ring\",\"Ring\",\"Ring\",\"Ring\",\"Ring\",\"Ring\",\"Ring\",\"Ring\",\"Ring\",\"Ring\",\"Ring\",\"Ring\",\"Ring\",\"Ring\",\"Ring\",\"Ring\",\"Ring\",\"Ring\",\"Ring\",\"Ring\",\"Ring\",\"Bridge0\",\"Bridge0\",\"Bridge0\",\"Bridge0\",\"Bridge0\",\"Bridge1\",\"Bridge1\",\"Bridge1\",\"Bridge1\",\"Bridge1\",\"Bridge2\",\"Bridge2\",\"Bridge2\",\"Bridge2\",\"Bridge2\",\"Bridge3\",\"Bridge3\",\"Bridge3\",\"Bridge3\",\"Bridge3\",\"Bridge4\",\"Bridge4\",\"Bridge4\",\"Bridge4\",\"Bridge4\"]],[\"type\",[\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\",\"Location\"]],[\"index\",[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74]],[\"_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\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"square\",\"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\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"steelblue\",\"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,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,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\",\"none\",\"none\",\"none\",\"none\",\"none\",\"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\",\"none\",\"none\",\"none\",\"none\",\"none\",\"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\",\"none\",\"none\",\"none\",\"none\",\"none\",\"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,1,1,1,1,1,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\",1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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\":\"p1247\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1248\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1260\",\"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\":\"p1253\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1250\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1251\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1252\"},\"data\":{\"type\":\"map\",\"entries\":[[\"weight\",[10,10,1,10,10,1,10,10,1,10,10,1,10,10,1,10,10,1,1,10,10,1,1,10,10,1,1,10,10,1,1,10,10,1,1,10,10,1,1,10,10,1,1,10,10,1,1,10,10,1,1,10,10,1,1,10,10,1,1,10,10,1,1,10,10,1,1,10,10,1,1,10,10,1,1,10,10,1,1,10,10,1,1,10,10,1,1,10,10,1,1,10,10,1,1]],[\"start\",[0,0,0,1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24]],[\"end\",[25,27,50,27,28,51,28,29,52,26,29,53,25,26,54,30,32,50,55,32,33,51,56,33,34,52,57,31,34,53,58,30,31,54,59,35,37,55,60,37,38,56,61,38,39,57,62,36,39,58,63,35,36,59,64,40,42,60,65,42,43,61,66,43,44,62,67,41,44,63,68,40,41,64,69,45,47,65,70,47,48,66,71,48,49,67,72,46,49,68,73,45,46,69,74]],[\"_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\"]],[\"_alpha\",[1.0,1.0,0.5,1.0,1.0,0.5,1.0,1.0,0.5,1.0,1.0,0.5,1.0,1.0,0.5,1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.5,1.0,1.0,0.5,0.5]],[\"_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]],[\"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]],[\"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]],[\"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]],[\"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\"]],[\"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\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"none\",\"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\"]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1254\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1255\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"MultiLine\",\"id\":\"p1259\",\"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\":\"p1256\"},\"inspection_policy\":{\"type\":\"object\",\"name\":\"NodesOnly\",\"id\":\"p1257\"}}}],\"toolbar\":{\"type\":\"object\",\"name\":\"Toolbar\",\"id\":\"p1217\",\"attributes\":{\"tools\":[{\"type\":\"object\",\"name\":\"BoxZoomTool\",\"id\":\"p1230\",\"attributes\":{\"dimensions\":\"both\",\"overlay\":{\"type\":\"object\",\"name\":\"BoxAnnotation\",\"id\":\"p1231\",\"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\":\"p1237\",\"attributes\":{\"all\":{\"type\":\"object\",\"name\":\"AreaVisuals\",\"id\":\"p1236\",\"attributes\":{\"fill_color\":\"white\",\"hover_fill_color\":\"lightgray\"}}}}}}}},{\"type\":\"object\",\"name\":\"ResetTool\",\"id\":\"p1238\"},{\"type\":\"object\",\"name\":\"WheelZoomTool\",\"id\":\"p1239\",\"attributes\":{\"renderers\":\"auto\"}},{\"type\":\"object\",\"name\":\"PanTool\",\"id\":\"p1240\"},{\"type\":\"object\",\"name\":\"HoverTool\",\"id\":\"p1261\",\"attributes\":{\"renderers\":[{\"id\":\"p1253\"},{\"id\":\"p1246\"}],\"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\":\"p1225\",\"attributes\":{\"visible\":false,\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1226\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1227\"},\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1228\"}}}],\"below\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1220\",\"attributes\":{\"visible\":false,\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1221\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1222\"},\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1223\"}}}],\"center\":[{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1224\",\"attributes\":{\"axis\":{\"id\":\"p1220\"},\"grid_line_color\":null}},{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1229\",\"attributes\":{\"dimension\":1,\"axis\":{\"id\":\"p1225\"},\"grid_line_color\":null}}]}}]}};\n const render_items = [{\"docid\":\"6322ae5f-143b-4bef-8834-ccace70b05af\",\"roots\":{\"p1209\":\"db5f8eed-6406-4ab6-8562-1c218ad0402c\"},\"root_ids\":[\"p1209\"],\"notebook_comms_target\":\"p1262\"}];\n void root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n }\n if (root.Bokeh !== undefined) {\n embed_document(root);\n } else {\n let attempts = 0;\n const timer = setInterval(function(root) {\n if (root.Bokeh !== undefined) {\n clearInterval(timer);\n embed_document(root);\n } else {\n attempts++;\n if (attempts > 100) {\n clearInterval(timer);\n console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n }\n }\n }, 10, root)\n }\n})(window);", "application/vnd.bokehjs_exec.v0+json": "" }, "metadata": { "application/vnd.bokehjs_exec.v0+json": { "id": "p1209" } }, "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 \"
  • re-rerun `output_notebook()` to attempt to load from CDN again, or
  • \\n\"+\n \"
  • use INLINE resources instead, as so:
  • \\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 = {\"e42fa92d-31af-49df-8a88-32583047e239\":{\"version\":\"3.7.1\",\"title\":\"Bokeh Application\",\"roots\":[{\"type\":\"object\",\"name\":\"Figure\",\"id\":\"p1338\",\"attributes\":{\"width\":400,\"height\":400,\"x_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1339\"},\"y_range\":{\"type\":\"object\",\"name\":\"DataRange1d\",\"id\":\"p1340\"},\"x_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1347\"},\"y_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1348\"},\"title\":{\"type\":\"object\",\"name\":\"Title\",\"id\":\"p1345\"},\"renderers\":[{\"type\":\"object\",\"name\":\"GraphRenderer\",\"id\":\"p1370\",\"attributes\":{\"layout_provider\":{\"type\":\"object\",\"name\":\"StaticLayoutProvider\",\"id\":\"p1387\",\"attributes\":{\"graph_layout\":{\"type\":\"map\",\"entries\":[[0,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"111ohzSf6b9VSiscCnjqPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[1,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"3IhEDOHx6L9WIEvu/xjmPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[2,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"q31scUUV5L/U2yhAO6rmPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[3,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"jvMFwJhf4b8I/90PLX/qPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[4,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"KZBAt3VF5b8N5nmJhtPsPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[5,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"61buh5C/4r/wafEEbbTWPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[6,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"2U45HJVk47+eege2guvLPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[7,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"Ny5sn4Ux3b/Suisu8/jLPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[8,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"UtavN5Ee1r9NIVeO+4DVPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[9,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"TF8z2Zl23L9SY50tbAjbPw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[10,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"6n3bG1imxr+vvCC7tm2wvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[11,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"A4Ls3QQPz782pFThpB/Kvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[12,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"R9eRdd6xwL/MawdjgU7Rvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[13,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"Gn/Eq1rBkr/pyuX9Rd7Evw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[14,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"MzVA781Yo7+WrQCp/xibvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[15,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"kjyOVpBN2D/HBsr0JZLSvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[16,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"JFgzxawO0z/PmM/xjC7bvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[17,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"3tH7VUKH1T8Zb9bai/rhvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[18,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"MYKDDuCt3T9DdytBxA3gvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[19,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"N17l5Vh33z/I2gZPbCXWvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[20,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"sNa/G4Fq7T8MKT6Ht6rYvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[21,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"YUdqstTu6T/6aUOZUlTevw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[22,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"KRK8sfMI6j9dRLPTyjrkvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[23,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"GIneVahR7j/6KQooju/kvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}],[24,{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAAA8D8RJqi8iDPgvw==\"},\"shape\":[2],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"node_renderer\":{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1375\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1372\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1373\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1374\"},\"data\":{\"type\":\"map\",\"entries\":[[\"type\",[\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\",\"MyActor\"]],[\"index\",[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]],[\"_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\"]],[\"_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\"]],[\"_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]],[\"_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]],[\"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\"]],[\"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\"]],[\"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\"]],[\"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]],[\"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]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1376\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1377\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Scatter\",\"id\":\"p1389\",\"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\":\"p1382\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1379\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1380\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1381\"},\"data\":{\"type\":\"map\",\"entries\":[[\"weight\",[10,10,1,10,1,10,1,1,10,1,10,10,1,10,1,10,1,10,1,1,10,10,1,10,1,10,1,10,1,1,10,10,1,10,1,10,1,10,1,1,10,10,10,10,10]],[\"start\",[0,0,0,1,1,2,2,3,3,4,5,5,5,6,6,7,7,8,8,9,10,10,10,11,11,12,12,13,13,14,15,15,15,16,16,17,17,18,18,19,20,20,21,22,23]],[\"end\",[1,4,5,2,6,3,7,8,4,9,6,9,10,7,11,8,12,9,13,14,11,14,15,12,16,13,17,14,18,19,16,19,20,17,21,18,22,19,23,24,24,21,22,23,24]],[\"_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\"]],[\"_alpha\",[1.0,1.0,0.5,1.0,0.5,1.0,0.5,0.5,1.0,0.5,1.0,1.0,0.5,1.0,0.5,1.0,0.5,1.0,0.5,0.5,1.0,1.0,0.5,1.0,0.5,1.0,0.5,1.0,0.5,0.5,1.0,1.0,0.5,1.0,0.5,1.0,0.5,1.0,0.5,0.5,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]],[\"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]],[\"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]],[\"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]],[\"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\"]],[\"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\"]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1383\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1384\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"MultiLine\",\"id\":\"p1388\",\"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\":\"p1385\"},\"inspection_policy\":{\"type\":\"object\",\"name\":\"NodesOnly\",\"id\":\"p1386\"}}}],\"toolbar\":{\"type\":\"object\",\"name\":\"Toolbar\",\"id\":\"p1346\",\"attributes\":{\"tools\":[{\"type\":\"object\",\"name\":\"BoxZoomTool\",\"id\":\"p1359\",\"attributes\":{\"dimensions\":\"both\",\"overlay\":{\"type\":\"object\",\"name\":\"BoxAnnotation\",\"id\":\"p1360\",\"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\":\"p1366\",\"attributes\":{\"all\":{\"type\":\"object\",\"name\":\"AreaVisuals\",\"id\":\"p1365\",\"attributes\":{\"fill_color\":\"white\",\"hover_fill_color\":\"lightgray\"}}}}}}}},{\"type\":\"object\",\"name\":\"ResetTool\",\"id\":\"p1367\"},{\"type\":\"object\",\"name\":\"WheelZoomTool\",\"id\":\"p1368\",\"attributes\":{\"renderers\":\"auto\"}},{\"type\":\"object\",\"name\":\"PanTool\",\"id\":\"p1369\"},{\"type\":\"object\",\"name\":\"HoverTool\",\"id\":\"p1390\",\"attributes\":{\"renderers\":[{\"id\":\"p1382\"},{\"id\":\"p1375\"}],\"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\":\"p1354\",\"attributes\":{\"visible\":false,\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1355\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1356\"},\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1357\"}}}],\"below\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1349\",\"attributes\":{\"visible\":false,\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1350\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1351\"},\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1352\"}}}],\"center\":[{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1353\",\"attributes\":{\"axis\":{\"id\":\"p1349\"},\"grid_line_color\":null}},{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1358\",\"attributes\":{\"dimension\":1,\"axis\":{\"id\":\"p1354\"},\"grid_line_color\":null}}]}}]}};\n const render_items = [{\"docid\":\"e42fa92d-31af-49df-8a88-32583047e239\",\"roots\":{\"p1338\":\"bc72f523-6ceb-4d31-9255-c7bc9793a22b\"},\"root_ids\":[\"p1338\"],\"notebook_comms_target\":\"p1391\"}];\n void root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n }\n if (root.Bokeh !== undefined) {\n embed_document(root);\n } else {\n let attempts = 0;\n const timer = setInterval(function(root) {\n if (root.Bokeh !== undefined) {\n clearInterval(timer);\n embed_document(root);\n } else {\n attempts++;\n if (attempts > 100) {\n clearInterval(timer);\n console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n }\n }\n }, 10, root)\n }\n})(window);", "application/vnd.bokehjs_exec.v0+json": "" }, "metadata": { "application/vnd.bokehjs_exec.v0+json": { "id": "p1338" } }, "output_type": "display_data" } ], "source": [ "inspector.plot_networks()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In order to export the bipartite network as a networkx graph object, use `model.export_bipartite_network()`.\n", "Using the arguments `location_attrs` and `agent_attrs`, location attributes and agent attributes will be saved as node attributes." ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "bipartite_graph = env.export_bipartite_network(actor_attrs=[\"age\"])\n", "bipartite_graph" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "To transform the network into a agent-level network and save it as a networkx graph object, use `model.export_agent_network()`." ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "actor_graph = env.export_actor_network(node_attrs=[\"age\"])\n", "actor_graph" ] } ], "metadata": { "kernelspec": { "display_name": ".venv", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.3" } }, "nbformat": 4, "nbformat_minor": 2 }