(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("f9c95284-ee54-4181-b453-b80ffd5fdb12");
      if (element == null) {
        console.log("Bokeh: ERROR: autoload.js configured with elementid 'f9c95284-ee54-4181-b453-b80ffd5fdb12' 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 = {"4ce276d0-55bf-4d71-a506-0c383731ac3e":{"roots":{"references":[{"attributes":{"axis_label":"Price","formatter":{"id":"fa861455-0c07-4a9c-ba08-d6f9a1d0da25","type":"BasicTickFormatter"},"plot":{"id":"3c62969f-a09e-486f-91c9-9a54819ff142","subtype":"Figure","type":"Plot"},"ticker":{"id":"b3059d9a-ea7b-45b1-85d2-944e2a072715","type":"BasicTicker"}},"id":"79fd3479-db4a-41ae-bc12-3d8816a394db","type":"LinearAxis"},{"attributes":{"mantissas":[1,2,5],"max_interval":500.0,"num_minor_ticks":0},"id":"162afe25-5f9a-4b37-8034-bdee2066df96","type":"AdaptiveTicker"},{"attributes":{"data_source":{"id":"0677c092-9fff-48d8-88d2-19ea6e1bfc49","type":"ColumnDataSource"},"glyph":{"id":"e48fae55-03f7-4016-9f74-b8c690ad2ed6","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"0744468e-f801-4063-a178-d8c8fb310dc6","type":"Line"},"selection_glyph":null,"view":{"id":"d30d5cf1-625e-461a-8a55-3b0f928fac52","type":"CDSView"}},"id":"ee223926-ed53-4cad-8f19-650a0ba50898","type":"GlyphRenderer"},{"attributes":{"callback":null},"id":"e4403d79-f90a-40ff-bfee-f8d021bce1e3","type":"DataRange1d"},{"attributes":{"callback":null},"id":"1e9f83a8-17c8-425b-9d06-e64d87b9ee9c","type":"DataRange1d"},{"attributes":{},"id":"5822b4e4-ab72-4749-bf9e-36fc3c3bcd8c","type":"LinearScale"},{"attributes":{"below":[{"id":"583f90b5-733b-4426-97f4-aa2d686f3af2","type":"DatetimeAxis"}],"left":[{"id":"79fd3479-db4a-41ae-bc12-3d8816a394db","type":"LinearAxis"}],"plot_height":350,"plot_width":800,"renderers":[{"id":"583f90b5-733b-4426-97f4-aa2d686f3af2","type":"DatetimeAxis"},{"id":"eb2e8812-90f2-4869-b348-a4dc0d87ab4d","type":"Grid"},{"id":"79fd3479-db4a-41ae-bc12-3d8816a394db","type":"LinearAxis"},{"id":"c6ce6473-61f1-47d6-8a39-878d419fdf17","type":"Grid"},{"id":"f731216d-51f3-43f2-b656-bd8cb1db2428","type":"BoxAnnotation"},{"id":"4840c59b-888f-4172-83e2-1dfbbc8507b0","type":"Legend"},{"id":"b46fb3c3-b7ca-497f-a194-00a540746ab1","type":"GlyphRenderer"},{"id":"ee223926-ed53-4cad-8f19-650a0ba50898","type":"GlyphRenderer"}],"title":{"id":"0ed82205-a679-4e39-a0b4-a72eadae36bf","type":"Title"},"toolbar":{"id":"66cca441-c3b6-46fb-a8e1-b93e756178f2","type":"Toolbar"},"x_range":{"id":"1e9f83a8-17c8-425b-9d06-e64d87b9ee9c","type":"DataRange1d"},"x_scale":{"id":"5822b4e4-ab72-4749-bf9e-36fc3c3bcd8c","type":"LinearScale"},"y_range":{"id":"e4403d79-f90a-40ff-bfee-f8d021bce1e3","type":"DataRange1d"},"y_scale":{"id":"681a40db-12a3-4f36-8cae-e719313a1dfb","type":"LinearScale"}},"id":"3c62969f-a09e-486f-91c9-9a54819ff142","subtype":"Figure","type":"Plot"},{"attributes":{},"id":"f9482114-0b28-49a7-8075-0988683f440a","type":"SaveTool"},{"attributes":{"plot":null,"text":"AAPL One-Month Average"},"id":"0ed82205-a679-4e39-a0b4-a72eadae36bf","type":"Title"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"#1f77b4"},"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"x":{"field":"x"},"y":{"field":"y"}},"id":"a0b078bf-c65c-437e-bb21-6812e18ea5cb","type":"Circle"},{"attributes":{"source":{"id":"2028344d-bc20-4bb3-b1ed-475079caa59f","type":"ColumnDataSource"}},"id":"e0e3df80-702c-42ea-b0bb-023a8a68e31b","type":"CDSView"},{"attributes":{},"id":"b3059d9a-ea7b-45b1-85d2-944e2a072715","type":"BasicTicker"},{"attributes":{"data_source":{"id":"2028344d-bc20-4bb3-b1ed-475079caa59f","type":"ColumnDataSource"},"glyph":{"id":"a0c63ef9-f472-44ca-a26a-b69ab43eb1a9","type":"Circle"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"a0b078bf-c65c-437e-bb21-6812e18ea5cb","type":"Circle"},"selection_glyph":null,"view":{"id":"e0e3df80-702c-42ea-b0bb-023a8a68e31b","type":"CDSView"}},"id":"b46fb3c3-b7ca-497f-a194-00a540746ab1","type":"GlyphRenderer"},{"attributes":{"days":[1,15]},"id":"4233a776-ce95-4dcd-aaad-613cdc59451d","type":"DaysTicker"},{"attributes":{},"id":"7e0cb6f4-c355-434c-a00e-4df72a07348d","type":"YearsTicker"},{"attributes":{},"id":"f0f4cc12-f996-4aff-b428-53bc51fb07b2","type":"DatetimeTickFormatter"},{"attributes":{},"id":"bb4a5a3e-113e-45a7-a272-8d6dc928f269","type":"WheelZoomTool"},{"attributes":{"axis_label":"Date","formatter":{"id":"f0f4cc12-f996-4aff-b428-53bc51fb07b2","type":"DatetimeTickFormatter"},"plot":{"id":"3c62969f-a09e-486f-91c9-9a54819ff142","subtype":"Figure","type":"Plot"},"ticker":{"id":"22e9e464-5269-48a0-a874-c5fa4a506099","type":"DatetimeTicker"}},"id":"583f90b5-733b-4426-97f4-aa2d686f3af2","type":"DatetimeAxis"},{"attributes":{"months":[0,6]},"id":"88a905ba-9850-4742-b844-17a7eeb13c9b","type":"MonthsTicker"},{"attributes":{},"id":"e401fbf2-1338-4630-8b46-e684c3eaff58","type":"HelpTool"},{"attributes":{},"id":"357ae7f7-5469-4fa8-ab09-9bca581860fc","type":"PanTool"},{"attributes":{"grid_line_alpha":{"value":0},"plot":{"id":"3c62969f-a09e-486f-91c9-9a54819ff142","subtype":"Figure","type":"Plot"},"ticker":{"id":"22e9e464-5269-48a0-a874-c5fa4a506099","type":"DatetimeTicker"}},"id":"eb2e8812-90f2-4869-b348-a4dc0d87ab4d","type":"Grid"},{"attributes":{"label":{"value":"close"},"renderers":[{"id":"b46fb3c3-b7ca-497f-a194-00a540746ab1","type":"GlyphRenderer"}]},"id":"7ae0a92b-4e99-4020-8c67-fea2790a14c5","type":"LegendItem"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_scroll":"auto","active_tap":"auto","tools":[{"id":"357ae7f7-5469-4fa8-ab09-9bca581860fc","type":"PanTool"},{"id":"bb4a5a3e-113e-45a7-a272-8d6dc928f269","type":"WheelZoomTool"},{"id":"c550ac45-17e1-45a7-a7bd-9c6a6d02a7fe","type":"BoxZoomTool"},{"id":"f9482114-0b28-49a7-8075-0988683f440a","type":"SaveTool"},{"id":"cccd67d8-3220-44d4-bcae-91dcfac20ece","type":"ResetTool"},{"id":"e401fbf2-1338-4630-8b46-e684c3eaff58","type":"HelpTool"}]},"id":"66cca441-c3b6-46fb-a8e1-b93e756178f2","type":"Toolbar"},{"attributes":{"overlay":{"id":"f731216d-51f3-43f2-b656-bd8cb1db2428","type":"BoxAnnotation"}},"id":"c550ac45-17e1-45a7-a7bd-9c6a6d02a7fe","type":"BoxZoomTool"},{"attributes":{"line_color":{"value":"navy"},"x":{"field":"x"},"y":{"field":"y"}},"id":"e48fae55-03f7-4016-9f74-b8c690ad2ed6","type":"Line"},{"attributes":{"callback":null,"column_names":["x","y"],"data":{"x":{"__ndarray__":"[encoded data, 34880 characters]","dtype":"float64","shape":[3270]},"y":{"__ndarray__":"[encoded data, 34880 characters]","dtype":"float64","shape":[3270]}}},"id":"0677c092-9fff-48d8-88d2-19ea6e1bfc49","type":"ColumnDataSource"},{"attributes":{"bottom_units":"screen","fill_alpha":{"value":0.5},"fill_color":{"value":"lightgrey"},"left_units":"screen","level":"overlay","line_alpha":{"value":1.0},"line_color":{"value":"black"},"line_dash":[4,4],"line_width":{"value":2},"plot":null,"render_mode":"css","right_units":"screen","top_units":"screen"},"id":"f731216d-51f3-43f2-b656-bd8cb1db2428","type":"BoxAnnotation"},{"attributes":{"months":[0,4,8]},"id":"12230e5c-ff4c-466d-9d95-bce423a1dee2","type":"MonthsTicker"},{"attributes":{"source":{"id":"0677c092-9fff-48d8-88d2-19ea6e1bfc49","type":"ColumnDataSource"}},"id":"d30d5cf1-625e-461a-8a55-3b0f928fac52","type":"CDSView"},{"attributes":{"fill_alpha":{"value":0.2},"fill_color":{"value":"darkgrey"},"line_alpha":{"value":0.2},"line_color":{"value":"darkgrey"},"x":{"field":"x"},"y":{"field":"y"}},"id":"a0c63ef9-f472-44ca-a26a-b69ab43eb1a9","type":"Circle"},{"attributes":{"label":{"value":"avg"},"renderers":[{"id":"ee223926-ed53-4cad-8f19-650a0ba50898","type":"GlyphRenderer"}]},"id":"49c0a676-2082-4fb2-b8cb-2a47c0b1543b","type":"LegendItem"},{"attributes":{"days":[1,8,15,22]},"id":"314982c1-9622-4840-8d1d-835e61acc94d","type":"DaysTicker"},{"attributes":{"months":[0,1,2,3,4,5,6,7,8,9,10,11]},"id":"2702a509-6d94-46e4-8632-9470cbcbb40e","type":"MonthsTicker"},{"attributes":{"base":24,"mantissas":[1,2,4,6,8,12],"max_interval":43200000.0,"min_interval":3600000.0,"num_minor_ticks":0},"id":"1aac2759-d47c-4407-8ad7-373e218b0928","type":"AdaptiveTicker"},{"attributes":{"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"x":{"field":"x"},"y":{"field":"y"}},"id":"0744468e-f801-4063-a178-d8c8fb310dc6","type":"Line"},{"attributes":{"items":[{"id":"7ae0a92b-4e99-4020-8c67-fea2790a14c5","type":"LegendItem"},{"id":"49c0a676-2082-4fb2-b8cb-2a47c0b1543b","type":"LegendItem"}],"location":"top_left","plot":{"id":"3c62969f-a09e-486f-91c9-9a54819ff142","subtype":"Figure","type":"Plot"}},"id":"4840c59b-888f-4172-83e2-1dfbbc8507b0","type":"Legend"},{"attributes":{"num_minor_ticks":5,"tickers":[{"id":"162afe25-5f9a-4b37-8034-bdee2066df96","type":"AdaptiveTicker"},{"id":"9880dea1-fde0-4f97-8f82-9251b0d4b7d0","type":"AdaptiveTicker"},{"id":"1aac2759-d47c-4407-8ad7-373e218b0928","type":"AdaptiveTicker"},{"id":"073ccbac-c50a-4697-a492-59345438a297","type":"DaysTicker"},{"id":"2c780ed5-8dd9-42cb-a711-a32838f1e9ee","type":"DaysTicker"},{"id":"314982c1-9622-4840-8d1d-835e61acc94d","type":"DaysTicker"},{"id":"4233a776-ce95-4dcd-aaad-613cdc59451d","type":"DaysTicker"},{"id":"2702a509-6d94-46e4-8632-9470cbcbb40e","type":"MonthsTicker"},{"id":"6515adb0-0dab-4e99-9cab-57f0d5f33062","type":"MonthsTicker"},{"id":"12230e5c-ff4c-466d-9d95-bce423a1dee2","type":"MonthsTicker"},{"id":"88a905ba-9850-4742-b844-17a7eeb13c9b","type":"MonthsTicker"},{"id":"7e0cb6f4-c355-434c-a00e-4df72a07348d","type":"YearsTicker"}]},"id":"22e9e464-5269-48a0-a874-c5fa4a506099","type":"DatetimeTicker"},{"attributes":{"days":[1,4,7,10,13,16,19,22,25,28]},"id":"2c780ed5-8dd9-42cb-a711-a32838f1e9ee","type":"DaysTicker"},{"attributes":{},"id":"cccd67d8-3220-44d4-bcae-91dcfac20ece","type":"ResetTool"},{"attributes":{"callback":null,"column_names":["y","x"],"data":{"x":{"__ndarray__":"[encoded data, 34880 characters]","dtype":"float64","shape":[3270]},"y":{"__ndarray__":"[encoded data, 34880 characters]","dtype":"float64","shape":[3270]}}},"id":"2028344d-bc20-4bb3-b1ed-475079caa59f","type":"ColumnDataSource"},{"attributes":{},"id":"fa861455-0c07-4a9c-ba08-d6f9a1d0da25","type":"BasicTickFormatter"},{"attributes":{"days":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]},"id":"073ccbac-c50a-4697-a492-59345438a297","type":"DaysTicker"},{"attributes":{"months":[0,2,4,6,8,10]},"id":"6515adb0-0dab-4e99-9cab-57f0d5f33062","type":"MonthsTicker"},{"attributes":{"base":60,"mantissas":[1,2,5,10,15,20,30],"max_interval":1800000.0,"min_interval":1000.0,"num_minor_ticks":0},"id":"9880dea1-fde0-4f97-8f82-9251b0d4b7d0","type":"AdaptiveTicker"},{"attributes":{"band_fill_alpha":{"value":0.1},"band_fill_color":{"value":"olive"},"dimension":1,"grid_line_alpha":{"value":0},"plot":{"id":"3c62969f-a09e-486f-91c9-9a54819ff142","subtype":"Figure","type":"Plot"},"ticker":{"id":"b3059d9a-ea7b-45b1-85d2-944e2a072715","type":"BasicTicker"}},"id":"c6ce6473-61f1-47d6-8a39-878d419fdf17","type":"Grid"},{"attributes":{},"id":"681a40db-12a3-4f36-8cae-e719313a1dfb","type":"LinearScale"}],"root_ids":["3c62969f-a09e-486f-91c9-9a54819ff142"]},"title":"Bokeh Application","version":"0.12.9"}};
                    var render_items = [{"docid":"4ce276d0-55bf-4d71-a506-0c383731ac3e","elementid":"f9c95284-ee54-4181-b453-b80ffd5fdb12","modelid":"3c62969f-a09e-486f-91c9-9a54819ff142"}];
                
                    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);
})();
