(function() {
  var fn = function() {
    
    (function(root) {
      function now() {
        return new Date();
      }
    
      var force = false;
    
      if (typeof (root._bokeh_onload_callbacks) === "undefined" || force === true) {
        root._bokeh_onload_callbacks = [];
        root._bokeh_is_loading = undefined;
      }
    
      
      
    
      
      
    
      function run_callbacks() {
        try {
          root._bokeh_onload_callbacks.forEach(function(callback) { callback() });
        }
        finally {
          delete root._bokeh_onload_callbacks
        }
        console.info("Bokeh: all callbacks have finished");
      }
    
      function load_libs(js_urls, callback) {
        root._bokeh_onload_callbacks.push(callback);
        if (root._bokeh_is_loading > 0) {
          console.log("Bokeh: BokehJS is being loaded, scheduling callback at", now());
          return null;
        }
        if (js_urls == null || js_urls.length === 0) {
          run_callbacks();
          return null;
        }
        console.log("Bokeh: BokehJS not loaded, scheduling load and callback at", now());
        root._bokeh_is_loading = js_urls.length;
        for (var i = 0; i < js_urls.length; i++) {
          var url = js_urls[i];
          var s = document.createElement('script');
          s.src = url;
          s.async = false;
          s.onreadystatechange = s.onload = function() {
            root._bokeh_is_loading--;
            if (root._bokeh_is_loading === 0) {
              console.log("Bokeh: all BokehJS libraries loaded");
              run_callbacks()
            }
          };
          s.onerror = function() {
            console.warn("failed to load library " + url);
          };
          console.log("Bokeh: injecting script tag for BokehJS library: ", url);
          document.getElementsByTagName("head")[0].appendChild(s);
        }
      };var element = document.getElementById("0247bd45-81d3-462d-874c-3973f5e65d8a");
      if (element == null) {
        console.log("Bokeh: ERROR: autoload.js configured with elementid '0247bd45-81d3-462d-874c-3973f5e65d8a' but no matching script tag was found. ")
        return false;
      }
    
      var js_urls = ["https://cdn.pydata.org/bokeh/release/bokeh-0.12.9.min.js", "https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.9.min.js", "https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.9.min.js", "https://cdn.pydata.org/bokeh/release/bokeh-gl-0.12.9.min.js"];
    
      var inline_js = [
        function(Bokeh) {
          Bokeh.set_log_level("info");
        },
        
        function(Bokeh) {
          
        },
        
        function(Bokeh) {
          (function() {
            var fn = function() {
              Bokeh.safely(function() {
                (function(root) {
                  function embed_document(root) {
                    var docs_json = {"d004ab40-597a-45d6-a048-529d854c1b17":{"roots":{"references":[{"attributes":{"data_source":{"id":"b47e9181-b513-483f-a54f-ef5eccf22064","type":"ColumnDataSource"},"glyph":{"id":"ad36a53d-b0cc-4ba3-9297-5fd3af893ea1","type":"Segment"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"43289bb5-53ae-4a8f-93a9-b501f3bcf527","type":"Segment"},"selection_glyph":null,"view":{"id":"9a819831-d9a0-4834-be7e-e2256d42adca","type":"CDSView"}},"id":"c7b4270e-5e7c-46ab-8e7a-5ba6de69d48f","type":"GlyphRenderer"},{"attributes":{"fill_alpha":{"value":0.4},"fill_color":{"value":"olive"},"line_alpha":{"value":0.4},"line_color":{"value":"olive"},"size":{"units":"screen","value":30},"x":{"field":"x"},"y":{"field":"y"}},"id":"7c0542b8-9ca8-4c0c-a32e-ca3a71a2ed30","type":"Circle"},{"attributes":{"plot":null,"text":"Hover over points"},"id":"454e2f5e-a04f-40fd-b3be-bc490987783d","type":"Title"},{"attributes":{"callback":null},"id":"e436cfb9-83a2-4dcb-9edb-90b650f06104","type":"DataRange1d"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_scroll":"auto","active_tap":"auto","tools":[{"id":"e853a272-7a37-4eb4-8ff2-e403ae9b8f42","type":"HoverTool"}]},"id":"0ab968dc-295d-4424-881d-7283012f98e4","type":"Toolbar"},{"attributes":{"callback":null},"id":"63affea4-1ae1-4254-8acf-753361abe323","type":"DataRange1d"},{"attributes":{},"id":"4794668e-e4a3-425b-93be-aebb394f32ce","type":"BasicTicker"},{"attributes":{"callback":{"id":"6ae20726-3bee-44a8-b064-c77d57c9c026","type":"CustomJS"},"renderers":[{"id":"21fc9ea0-0bf9-47b1-83f2-9d9fc058ada1","type":"GlyphRenderer"}],"tooltips":null},"id":"e853a272-7a37-4eb4-8ff2-e403ae9b8f42","type":"HoverTool"},{"attributes":{"data_source":{"id":"af41b233-3b8e-4c6d-a9bb-323c1bdd829f","type":"ColumnDataSource"},"glyph":{"id":"7c0542b8-9ca8-4c0c-a32e-ca3a71a2ed30","type":"Circle"},"hover_glyph":{"id":"f528398b-9662-445e-b3e9-e330a93c2112","type":"Circle"},"muted_glyph":null,"nonselection_glyph":{"id":"9c81dbea-753b-4cbf-81ee-ab75baaacfae","type":"Circle"},"selection_glyph":null,"view":{"id":"8e6dff33-ff51-4d3a-a95f-37e33a4a08c3","type":"CDSView"}},"id":"21fc9ea0-0bf9-47b1-83f2-9d9fc058ada1","type":"GlyphRenderer"},{"attributes":{"line_alpha":{"value":0.6},"line_color":{"value":"olive"},"line_width":{"value":3},"x0":{"field":"x0"},"x1":{"field":"x1"},"y0":{"field":"y0"},"y1":{"field":"y1"}},"id":"ad36a53d-b0cc-4ba3-9297-5fd3af893ea1","type":"Segment"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"#1f77b4"},"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"size":{"units":"screen","value":30},"x":{"field":"x"},"y":{"field":"y"}},"id":"9c81dbea-753b-4cbf-81ee-ab75baaacfae","type":"Circle"},{"attributes":{},"id":"e09e0ea1-273e-4b5e-8e9f-56e48e823815","type":"LinearScale"},{"attributes":{},"id":"59ef6d75-16e2-4cc2-968b-a9df2fb13b47","type":"BasicTicker"},{"attributes":{},"id":"1d67152b-795c-4112-b47a-4b4cdf618928","type":"BasicTickFormatter"},{"attributes":{"source":{"id":"b47e9181-b513-483f-a54f-ef5eccf22064","type":"ColumnDataSource"}},"id":"9a819831-d9a0-4834-be7e-e2256d42adca","type":"CDSView"},{"attributes":{"callback":null,"column_names":["y1","y0","x0","x1"],"data":{"x0":[],"x1":[],"y0":[],"y1":[]}},"id":"b47e9181-b513-483f-a54f-ef5eccf22064","type":"ColumnDataSource"},{"attributes":{"formatter":{"id":"7b8647c3-f717-46d9-b522-b2c8715956c0","type":"BasicTickFormatter"},"plot":{"id":"e9215019-e6cd-4a23-8cfd-c4c6a701a8b5","subtype":"Figure","type":"Plot"},"ticker":{"id":"59ef6d75-16e2-4cc2-968b-a9df2fb13b47","type":"BasicTicker"}},"id":"64907ae7-680a-4b20-93c2-2967ed80c372","type":"LinearAxis"},{"attributes":{},"id":"7b8647c3-f717-46d9-b522-b2c8715956c0","type":"BasicTickFormatter"},{"attributes":{},"id":"96608f4a-3313-4837-b9b4-55a76fd21c5e","type":"LinearScale"},{"attributes":{"dimension":1,"plot":{"id":"e9215019-e6cd-4a23-8cfd-c4c6a701a8b5","subtype":"Figure","type":"Plot"},"ticker":{"id":"4794668e-e4a3-425b-93be-aebb394f32ce","type":"BasicTicker"}},"id":"9c43d7ce-4bf9-4a57-b3de-9b420356946e","type":"Grid"},{"attributes":{"fill_color":{"value":"olive"},"line_color":{"value":"olive"},"size":{"units":"screen","value":30},"x":{"field":"x"},"y":{"field":"y"}},"id":"f528398b-9662-445e-b3e9-e330a93c2112","type":"Circle"},{"attributes":{"plot":{"id":"e9215019-e6cd-4a23-8cfd-c4c6a701a8b5","subtype":"Figure","type":"Plot"},"ticker":{"id":"59ef6d75-16e2-4cc2-968b-a9df2fb13b47","type":"BasicTicker"}},"id":"a09b5a03-bd6b-4bf1-8efe-592a1eb73904","type":"Grid"},{"attributes":{"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"line_width":{"value":3},"x0":{"field":"x0"},"x1":{"field":"x1"},"y0":{"field":"y0"},"y1":{"field":"y1"}},"id":"43289bb5-53ae-4a8f-93a9-b501f3bcf527","type":"Segment"},{"attributes":{"args":{"circle":{"id":"af41b233-3b8e-4c6d-a9bb-323c1bdd829f","type":"ColumnDataSource"},"segment":{"id":"b47e9181-b513-483f-a54f-ef5eccf22064","type":"ColumnDataSource"}},"code":"\nvar links = {0: [1, 2], 1: [0, 3, 4], 2: [0, 5], 3: [1, 4], 4: [1, 3], 5: [2, 3, 4]};\nvar data = {'x0': [], 'y0': [], 'x1': [], 'y1': []};\nvar cdata = circle.data;\nvar indices = cb_data.index['1d'].indices;\nfor (i=0; i < indices.length; i++) {\n    ind0 = indices[i]\n    for (j=0; j < links[ind0].length; j++) {\n        ind1 = links[ind0][j];\n        data['x0'].push(cdata.x[ind0]);\n        data['y0'].push(cdata.y[ind0]);\n        data['x1'].push(cdata.x[ind1]);\n        data['y1'].push(cdata.y[ind1]);\n    }\n}\nsegment.data = data;\n"},"id":"6ae20726-3bee-44a8-b064-c77d57c9c026","type":"CustomJS"},{"attributes":{"below":[{"id":"64907ae7-680a-4b20-93c2-2967ed80c372","type":"LinearAxis"}],"left":[{"id":"8afb573c-6179-48d4-be57-a13990cf3b25","type":"LinearAxis"}],"plot_height":400,"plot_width":400,"renderers":[{"id":"64907ae7-680a-4b20-93c2-2967ed80c372","type":"LinearAxis"},{"id":"a09b5a03-bd6b-4bf1-8efe-592a1eb73904","type":"Grid"},{"id":"8afb573c-6179-48d4-be57-a13990cf3b25","type":"LinearAxis"},{"id":"9c43d7ce-4bf9-4a57-b3de-9b420356946e","type":"Grid"},{"id":"c7b4270e-5e7c-46ab-8e7a-5ba6de69d48f","type":"GlyphRenderer"},{"id":"21fc9ea0-0bf9-47b1-83f2-9d9fc058ada1","type":"GlyphRenderer"}],"title":{"id":"454e2f5e-a04f-40fd-b3be-bc490987783d","type":"Title"},"toolbar":{"id":"0ab968dc-295d-4424-881d-7283012f98e4","type":"Toolbar"},"toolbar_location":null,"x_range":{"id":"63affea4-1ae1-4254-8acf-753361abe323","type":"DataRange1d"},"x_scale":{"id":"e09e0ea1-273e-4b5e-8e9f-56e48e823815","type":"LinearScale"},"y_range":{"id":"e436cfb9-83a2-4dcb-9edb-90b650f06104","type":"DataRange1d"},"y_scale":{"id":"96608f4a-3313-4837-b9b4-55a76fd21c5e","type":"LinearScale"}},"id":"e9215019-e6cd-4a23-8cfd-c4c6a701a8b5","subtype":"Figure","type":"Plot"},{"attributes":{"callback":null,"column_names":["x","y"],"data":{"x":[2,3,5,6,8,7],"y":[6,4,3,8,7,5]}},"id":"af41b233-3b8e-4c6d-a9bb-323c1bdd829f","type":"ColumnDataSource"},{"attributes":{"formatter":{"id":"1d67152b-795c-4112-b47a-4b4cdf618928","type":"BasicTickFormatter"},"plot":{"id":"e9215019-e6cd-4a23-8cfd-c4c6a701a8b5","subtype":"Figure","type":"Plot"},"ticker":{"id":"4794668e-e4a3-425b-93be-aebb394f32ce","type":"BasicTicker"}},"id":"8afb573c-6179-48d4-be57-a13990cf3b25","type":"LinearAxis"},{"attributes":{"source":{"id":"af41b233-3b8e-4c6d-a9bb-323c1bdd829f","type":"ColumnDataSource"}},"id":"8e6dff33-ff51-4d3a-a95f-37e33a4a08c3","type":"CDSView"}],"root_ids":["e9215019-e6cd-4a23-8cfd-c4c6a701a8b5"]},"title":"Bokeh Application","version":"0.12.9"}};
                    var render_items = [{"docid":"d004ab40-597a-45d6-a048-529d854c1b17","elementid":"0247bd45-81d3-462d-874c-3973f5e65d8a","modelid":"e9215019-e6cd-4a23-8cfd-c4c6a701a8b5"}];
                
                    root.Bokeh.embed.embed_items(docs_json, render_items);
                  }
                
                  if (root.Bokeh !== undefined) {
                    embed_document(root);
                  } else {
                    var attempts = 0;
                    var timer = setInterval(function(root) {
                      if (root.Bokeh !== undefined) {
                        embed_document(root);
                        clearInterval(timer);
                      }
                      attempts++;
                      if (attempts > 100) {
                        console.log("Bokeh: ERROR: Unable to embed document because BokehJS library is missing")
                        clearInterval(timer);
                      }
                    }, 10, root)
                  }
                })(window);
              });
            };
            if (document.readyState != "loading") fn();
            else document.addEventListener("DOMContentLoaded", fn);
          })();
        },
        function(Bokeh) {
          console.log("Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.12.9.min.css");
          Bokeh.embed.inject_css("https://cdn.pydata.org/bokeh/release/bokeh-0.12.9.min.css");
          console.log("Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.9.min.css");
          Bokeh.embed.inject_css("https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.9.min.css");
          console.log("Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.9.min.css");
          Bokeh.embed.inject_css("https://cdn.pydata.org/bokeh/release/bokeh-tables-0.12.9.min.css");
        }
      ];
    
      function run_inline_js() {
        
        for (var i = 0; i < inline_js.length; i++) {
          inline_js[i].call(root, root.Bokeh);
        }
        
      }
    
      if (root._bokeh_is_loading === 0) {
        console.log("Bokeh: BokehJS loaded, going straight to plotting");
        run_inline_js();
      } else {
        load_libs(js_urls, function() {
          console.log("Bokeh: BokehJS plotting callback run at", now());
          run_inline_js();
        });
      }
    }(window));
  };
  if (document.readyState != "loading") fn();
  else document.addEventListener("DOMContentLoaded", fn);
})();
