(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("6e613d24-e3bf-4248-84c0-e8a6f85f6fbc");
      if (element == null) {
        console.log("Bokeh: ERROR: autoload.js configured with elementid '6e613d24-e3bf-4248-84c0-e8a6f85f6fbc' 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 = {"25b43663-a975-4875-bba3-11de8e446c2c":{"roots":{"references":[{"attributes":{"days":[1,15]},"id":"b950cc07-3d74-4233-bc2e-658643d4509e","type":"DaysTicker"},{"attributes":{},"id":"5b126f9d-9a06-40b1-86cb-3590f073bad0","type":"SaveTool"},{"attributes":{"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"x":{"field":"x"},"y":{"field":"y"}},"id":"306d97a6-1263-4a91-ac8b-b8a21dadd800","type":"Line"},{"attributes":{},"id":"751fd45e-70be-4930-96a9-2fcb438c354d","type":"WheelZoomTool"},{"attributes":{"source":{"id":"37878f35-c5c0-448b-8bfc-5d00e3c2996c","type":"ColumnDataSource"}},"id":"81524f0f-64dd-423d-a90f-ba40e0bc19e8","type":"CDSView"},{"attributes":{},"id":"59a9748e-14dd-43f9-ad3e-7e208b893770","type":"DatetimeTickFormatter"},{"attributes":{"base":60,"mantissas":[1,2,5,10,15,20,30],"max_interval":1800000.0,"min_interval":1000.0,"num_minor_ticks":0},"id":"0676d6e6-d19d-4291-88f0-ce8623d75688","type":"AdaptiveTicker"},{"attributes":{"axis_label":"Price","formatter":{"id":"b499a6cd-e939-43a6-a14a-f1751901178d","type":"BasicTickFormatter"},"plot":{"id":"1c61df70-bdc4-438b-8257-c3203779bb81","subtype":"Figure","type":"Plot"},"ticker":{"id":"6a46eb35-11f3-4fee-8159-94bc588ac831","type":"BasicTicker"}},"id":"58920834-9a1d-4ac3-9ad4-e650b0b7f06e","type":"LinearAxis"},{"attributes":{"band_fill_alpha":{"value":0.1},"band_fill_color":{"value":"olive"},"dimension":1,"grid_line_alpha":{"value":0},"plot":{"id":"1c61df70-bdc4-438b-8257-c3203779bb81","subtype":"Figure","type":"Plot"},"ticker":{"id":"6a46eb35-11f3-4fee-8159-94bc588ac831","type":"BasicTicker"}},"id":"f9a22b7e-822f-4a33-9cac-de4605c9ee96","type":"Grid"},{"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":"8067e3a4-a70f-4b71-8544-881444f1a449","type":"BoxAnnotation"},{"attributes":{},"id":"997caf1a-df71-4fe5-afee-6afb38b6bdc9","type":"LinearScale"},{"attributes":{"months":[0,1,2,3,4,5,6,7,8,9,10,11]},"id":"117cd79f-7e1b-43fc-ac9e-77b8fcdf6794","type":"MonthsTicker"},{"attributes":{"days":[1,8,15,22]},"id":"10d2549b-b7e3-478b-b8d6-023988c51800","type":"DaysTicker"},{"attributes":{"below":[{"id":"085a6543-498b-404c-a9db-3a4a4dcdcfac","type":"DatetimeAxis"}],"left":[{"id":"58920834-9a1d-4ac3-9ad4-e650b0b7f06e","type":"LinearAxis"}],"plot_height":350,"plot_width":800,"renderers":[{"id":"085a6543-498b-404c-a9db-3a4a4dcdcfac","type":"DatetimeAxis"},{"id":"6e02f4cc-9710-4ba9-bc92-3724bffe6fce","type":"Grid"},{"id":"58920834-9a1d-4ac3-9ad4-e650b0b7f06e","type":"LinearAxis"},{"id":"f9a22b7e-822f-4a33-9cac-de4605c9ee96","type":"Grid"},{"id":"8067e3a4-a70f-4b71-8544-881444f1a449","type":"BoxAnnotation"},{"id":"24749f01-409a-4d17-bbcb-4bbe26f2d8ae","type":"Legend"},{"id":"158b1e16-c204-4be5-87bb-ba7e4d0d351e","type":"GlyphRenderer"},{"id":"cf7353f8-96e8-40bb-afe7-a4576f4f7884","type":"GlyphRenderer"}],"title":{"id":"81ede6bc-3178-42de-aa40-3dc8388182cb","type":"Title"},"toolbar":{"id":"9021034f-774f-4bbf-bc73-ed96bed33ee0","type":"Toolbar"},"x_range":{"id":"f2a7393f-34cb-4af1-87fb-87d2d9336aeb","type":"DataRange1d"},"x_scale":{"id":"997caf1a-df71-4fe5-afee-6afb38b6bdc9","type":"LinearScale"},"y_range":{"id":"101c3445-a169-432d-84cd-72b93bafbe1b","type":"DataRange1d"},"y_scale":{"id":"2916253a-a3f4-442e-95e7-33a93c4cdfb4","type":"LinearScale"}},"id":"1c61df70-bdc4-438b-8257-c3203779bb81","subtype":"Figure","type":"Plot"},{"attributes":{"mantissas":[1,2,5],"max_interval":500.0,"num_minor_ticks":0},"id":"e951f588-e2b3-40d0-a30e-a17ccf13e8e8","type":"AdaptiveTicker"},{"attributes":{"callback":null},"id":"101c3445-a169-432d-84cd-72b93bafbe1b","type":"DataRange1d"},{"attributes":{"grid_line_alpha":{"value":0},"plot":{"id":"1c61df70-bdc4-438b-8257-c3203779bb81","subtype":"Figure","type":"Plot"},"ticker":{"id":"8180ad51-b353-4d43-b817-305c7df5d722","type":"DatetimeTicker"}},"id":"6e02f4cc-9710-4ba9-bc92-3724bffe6fce","type":"Grid"},{"attributes":{"line_color":{"value":"navy"},"x":{"field":"x"},"y":{"field":"y"}},"id":"90bf8ab8-fefd-4449-adb2-1698606eb21b","type":"Line"},{"attributes":{"days":[1,4,7,10,13,16,19,22,25,28]},"id":"292da8a7-3968-4b25-890a-fcd7343f8f52","type":"DaysTicker"},{"attributes":{},"id":"51db1ed4-3a3e-43e3-8e3e-f13c03459547","type":"HelpTool"},{"attributes":{},"id":"2390da06-2c64-41c3-82e2-a5fb1c7c5fc7","type":"YearsTicker"},{"attributes":{"months":[0,6]},"id":"c6636e8e-79e3-4d86-9c5e-6ea7e2f6680c","type":"MonthsTicker"},{"attributes":{"label":{"value":"avg"},"renderers":[{"id":"cf7353f8-96e8-40bb-afe7-a4576f4f7884","type":"GlyphRenderer"}]},"id":"8b6bca39-8e19-47b2-b8af-8f662f61c934","type":"LegendItem"},{"attributes":{},"id":"6a46eb35-11f3-4fee-8159-94bc588ac831","type":"BasicTicker"},{"attributes":{"callback":null},"id":"f2a7393f-34cb-4af1-87fb-87d2d9336aeb","type":"DataRange1d"},{"attributes":{"data_source":{"id":"84b9ad84-03f0-43cc-b865-f9b70e8f9d2e","type":"ColumnDataSource"},"glyph":{"id":"90bf8ab8-fefd-4449-adb2-1698606eb21b","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"306d97a6-1263-4a91-ac8b-b8a21dadd800","type":"Line"},"selection_glyph":null,"view":{"id":"c0c32d95-7aab-496d-8d42-18a316a4a2e5","type":"CDSView"}},"id":"cf7353f8-96e8-40bb-afe7-a4576f4f7884","type":"GlyphRenderer"},{"attributes":{"label":{"value":"close"},"renderers":[{"id":"158b1e16-c204-4be5-87bb-ba7e4d0d351e","type":"GlyphRenderer"}]},"id":"615517de-36d6-472a-acfb-6c45975d9915","type":"LegendItem"},{"attributes":{"axis_label":"Date","formatter":{"id":"59a9748e-14dd-43f9-ad3e-7e208b893770","type":"DatetimeTickFormatter"},"plot":{"id":"1c61df70-bdc4-438b-8257-c3203779bb81","subtype":"Figure","type":"Plot"},"ticker":{"id":"8180ad51-b353-4d43-b817-305c7df5d722","type":"DatetimeTicker"}},"id":"085a6543-498b-404c-a9db-3a4a4dcdcfac","type":"DatetimeAxis"},{"attributes":{"plot":null,"text":"AAPL One-Month Average"},"id":"81ede6bc-3178-42de-aa40-3dc8388182cb","type":"Title"},{"attributes":{"base":24,"mantissas":[1,2,4,6,8,12],"max_interval":43200000.0,"min_interval":3600000.0,"num_minor_ticks":0},"id":"48253def-f52b-493e-8f73-f501d4da4983","type":"AdaptiveTicker"},{"attributes":{"data_source":{"id":"37878f35-c5c0-448b-8bfc-5d00e3c2996c","type":"ColumnDataSource"},"glyph":{"id":"1c6c4b42-b6b3-4cb8-99ec-deaf95080b0e","type":"Circle"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"b42256e4-cfdc-40a7-8a9f-cad2d3b32521","type":"Circle"},"selection_glyph":null,"view":{"id":"81524f0f-64dd-423d-a90f-ba40e0bc19e8","type":"CDSView"}},"id":"158b1e16-c204-4be5-87bb-ba7e4d0d351e","type":"GlyphRenderer"},{"attributes":{},"id":"b499a6cd-e939-43a6-a14a-f1751901178d","type":"BasicTickFormatter"},{"attributes":{"items":[{"id":"615517de-36d6-472a-acfb-6c45975d9915","type":"LegendItem"},{"id":"8b6bca39-8e19-47b2-b8af-8f662f61c934","type":"LegendItem"}],"location":"top_left","plot":{"id":"1c61df70-bdc4-438b-8257-c3203779bb81","subtype":"Figure","type":"Plot"}},"id":"24749f01-409a-4d17-bbcb-4bbe26f2d8ae","type":"Legend"},{"attributes":{"months":[0,4,8]},"id":"e48acc63-37dd-4901-bd17-3a14be7637d9","type":"MonthsTicker"},{"attributes":{},"id":"c6057e94-d731-457e-92c6-cb158cd21a96","type":"ResetTool"},{"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":"1c6c4b42-b6b3-4cb8-99ec-deaf95080b0e","type":"Circle"},{"attributes":{"months":[0,2,4,6,8,10]},"id":"4c74c14e-7ff6-4d83-b440-81a0fe8c6d99","type":"MonthsTicker"},{"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":"b42256e4-cfdc-40a7-8a9f-cad2d3b32521","type":"Circle"},{"attributes":{"overlay":{"id":"8067e3a4-a70f-4b71-8544-881444f1a449","type":"BoxAnnotation"}},"id":"758e3343-a500-481a-b1ab-fb31432844c7","type":"BoxZoomTool"},{"attributes":{},"id":"2916253a-a3f4-442e-95e7-33a93c4cdfb4","type":"LinearScale"},{"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":"84b9ad84-03f0-43cc-b865-f9b70e8f9d2e","type":"ColumnDataSource"},{"attributes":{"source":{"id":"84b9ad84-03f0-43cc-b865-f9b70e8f9d2e","type":"ColumnDataSource"}},"id":"c0c32d95-7aab-496d-8d42-18a316a4a2e5","type":"CDSView"},{"attributes":{"num_minor_ticks":5,"tickers":[{"id":"e951f588-e2b3-40d0-a30e-a17ccf13e8e8","type":"AdaptiveTicker"},{"id":"0676d6e6-d19d-4291-88f0-ce8623d75688","type":"AdaptiveTicker"},{"id":"48253def-f52b-493e-8f73-f501d4da4983","type":"AdaptiveTicker"},{"id":"424d8361-c4bf-4ffe-9a53-6e45097959f7","type":"DaysTicker"},{"id":"292da8a7-3968-4b25-890a-fcd7343f8f52","type":"DaysTicker"},{"id":"10d2549b-b7e3-478b-b8d6-023988c51800","type":"DaysTicker"},{"id":"b950cc07-3d74-4233-bc2e-658643d4509e","type":"DaysTicker"},{"id":"117cd79f-7e1b-43fc-ac9e-77b8fcdf6794","type":"MonthsTicker"},{"id":"4c74c14e-7ff6-4d83-b440-81a0fe8c6d99","type":"MonthsTicker"},{"id":"e48acc63-37dd-4901-bd17-3a14be7637d9","type":"MonthsTicker"},{"id":"c6636e8e-79e3-4d86-9c5e-6ea7e2f6680c","type":"MonthsTicker"},{"id":"2390da06-2c64-41c3-82e2-a5fb1c7c5fc7","type":"YearsTicker"}]},"id":"8180ad51-b353-4d43-b817-305c7df5d722","type":"DatetimeTicker"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_scroll":"auto","active_tap":"auto","tools":[{"id":"94691751-8e37-4256-a59f-f182d45ba92b","type":"PanTool"},{"id":"751fd45e-70be-4930-96a9-2fcb438c354d","type":"WheelZoomTool"},{"id":"758e3343-a500-481a-b1ab-fb31432844c7","type":"BoxZoomTool"},{"id":"5b126f9d-9a06-40b1-86cb-3590f073bad0","type":"SaveTool"},{"id":"c6057e94-d731-457e-92c6-cb158cd21a96","type":"ResetTool"},{"id":"51db1ed4-3a3e-43e3-8e3e-f13c03459547","type":"HelpTool"}]},"id":"9021034f-774f-4bbf-bc73-ed96bed33ee0","type":"Toolbar"},{"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":"37878f35-c5c0-448b-8bfc-5d00e3c2996c","type":"ColumnDataSource"},{"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":"424d8361-c4bf-4ffe-9a53-6e45097959f7","type":"DaysTicker"},{"attributes":{},"id":"94691751-8e37-4256-a59f-f182d45ba92b","type":"PanTool"}],"root_ids":["1c61df70-bdc4-438b-8257-c3203779bb81"]},"title":"Bokeh Application","version":"0.12.9"}};
                    var render_items = [{"docid":"25b43663-a975-4875-bba3-11de8e446c2c","elementid":"6e613d24-e3bf-4248-84c0-e8a6f85f6fbc","modelid":"1c61df70-bdc4-438b-8257-c3203779bb81"}];
                
                    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);
})();
