(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("94d7641a-b6ee-4144-8142-b24caa1baa9a");
      if (element == null) {
        console.log("Bokeh: ERROR: autoload.js configured with elementid '94d7641a-b6ee-4144-8142-b24caa1baa9a' 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 = {"aeb43571-458f-4bf3-9cb9-55ffed3fc012":{"roots":{"references":[{"attributes":{"source":{"id":"708cd011-ffba-4fcc-b831-ae27ae462998","type":"ColumnDataSource"}},"id":"372d09a8-0e3f-4aa6-9086-bea932a148d1","type":"CDSView"},{"attributes":{},"id":"f316665e-8334-4946-a107-6b175cabe8ed","type":"ResetTool"},{"attributes":{"axis_label":"Price","formatter":{"id":"342ad59a-7980-4231-99de-0918f3290cd4","type":"BasicTickFormatter"},"plot":{"id":"1fd52f7c-0c03-4866-a5f1-03773ee4774c","subtype":"Figure","type":"Plot"},"ticker":{"id":"5dc14f7c-8622-4043-90a7-f0dd6fb2bee7","type":"BasicTicker"}},"id":"00de4baf-32f9-465b-9fe8-727359c3c92d","type":"LinearAxis"},{"attributes":{"mantissas":[1,2,5],"max_interval":500.0,"num_minor_ticks":0},"id":"61a0754a-e349-4022-9bf4-72eff998cf83","type":"AdaptiveTicker"},{"attributes":{},"id":"7f5f47a9-ac85-44b1-a5f0-20506bb0d9cf","type":"YearsTicker"},{"attributes":{},"id":"3e331743-aa6c-4b9d-a346-d7486018426b","type":"LinearScale"},{"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":"87d84d99-7a35-4dbe-8db9-59c8d14087c2","type":"DaysTicker"},{"attributes":{"data_source":{"id":"751a51d5-7c94-4a80-8cb9-277a349f2f01","type":"ColumnDataSource"},"glyph":{"id":"c2725f72-c3b9-435a-b557-2e5faf61d9bc","type":"Line"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"5126fcdf-ee67-4d48-8a00-a368dc1af96d","type":"Line"},"selection_glyph":null,"view":{"id":"093838a6-9636-4ece-a503-44940700958e","type":"CDSView"}},"id":"44925d0f-cbaf-4bc0-824d-73597b3bfa90","type":"GlyphRenderer"},{"attributes":{"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"x":{"field":"x"},"y":{"field":"y"}},"id":"5126fcdf-ee67-4d48-8a00-a368dc1af96d","type":"Line"},{"attributes":{"axis_label":"Date","formatter":{"id":"d376fd9d-6b02-4012-8a2d-bd7adfe1cca5","type":"DatetimeTickFormatter"},"plot":{"id":"1fd52f7c-0c03-4866-a5f1-03773ee4774c","subtype":"Figure","type":"Plot"},"ticker":{"id":"cc596e28-de87-4151-9c0c-870b93571b52","type":"DatetimeTicker"}},"id":"a28821ff-5f11-4698-adb2-0d3b7d09a696","type":"DatetimeAxis"},{"attributes":{"below":[{"id":"a28821ff-5f11-4698-adb2-0d3b7d09a696","type":"DatetimeAxis"}],"left":[{"id":"00de4baf-32f9-465b-9fe8-727359c3c92d","type":"LinearAxis"}],"plot_height":350,"plot_width":800,"renderers":[{"id":"a28821ff-5f11-4698-adb2-0d3b7d09a696","type":"DatetimeAxis"},{"id":"3c10a877-328b-4d4a-a8e1-48fe6527ea78","type":"Grid"},{"id":"00de4baf-32f9-465b-9fe8-727359c3c92d","type":"LinearAxis"},{"id":"d75a3a62-e64d-4f24-bafc-3d8352a26754","type":"Grid"},{"id":"fcc8c0e5-6840-4d55-8fb7-1d6fe73f7779","type":"BoxAnnotation"},{"id":"d96e6999-de01-443d-b446-e1a8e10a34b3","type":"Legend"},{"id":"9bf4865b-84b9-4ff2-add2-1f60a9ddf3df","type":"GlyphRenderer"},{"id":"44925d0f-cbaf-4bc0-824d-73597b3bfa90","type":"GlyphRenderer"}],"title":{"id":"79d64dc3-2b27-4646-aa22-06dfac745eb6","type":"Title"},"toolbar":{"id":"629ab30d-d9a8-432a-b6d8-b03ce28e9a27","type":"Toolbar"},"x_range":{"id":"0d7fa2fc-ca14-405e-ba16-88cda6a6dda1","type":"DataRange1d"},"x_scale":{"id":"3e331743-aa6c-4b9d-a346-d7486018426b","type":"LinearScale"},"y_range":{"id":"77dc3b1d-90d0-424b-b508-c3f8569c063a","type":"DataRange1d"},"y_scale":{"id":"05fd9e76-eb83-46de-875e-f816fdc5fe33","type":"LinearScale"}},"id":"1fd52f7c-0c03-4866-a5f1-03773ee4774c","subtype":"Figure","type":"Plot"},{"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":"708cd011-ffba-4fcc-b831-ae27ae462998","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":"fcc8c0e5-6840-4d55-8fb7-1d6fe73f7779","type":"BoxAnnotation"},{"attributes":{"grid_line_alpha":{"value":0},"plot":{"id":"1fd52f7c-0c03-4866-a5f1-03773ee4774c","subtype":"Figure","type":"Plot"},"ticker":{"id":"cc596e28-de87-4151-9c0c-870b93571b52","type":"DatetimeTicker"}},"id":"3c10a877-328b-4d4a-a8e1-48fe6527ea78","type":"Grid"},{"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":"780e4a19-1aae-49b3-993c-97b9c0c2f7af","type":"Circle"},{"attributes":{"months":[0,1,2,3,4,5,6,7,8,9,10,11]},"id":"1b6e42e2-e1e1-43d6-ab6a-1deb3db73fa4","type":"MonthsTicker"},{"attributes":{},"id":"67a6f1cb-9f0c-4c22-a61b-065f1160865f","type":"WheelZoomTool"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_scroll":"auto","active_tap":"auto","tools":[{"id":"dd45e365-e17a-4cf6-8772-f678b7015e9f","type":"PanTool"},{"id":"67a6f1cb-9f0c-4c22-a61b-065f1160865f","type":"WheelZoomTool"},{"id":"1d4a948b-d0d2-43fd-bb16-34e910a7c3b5","type":"BoxZoomTool"},{"id":"e82a54bc-0921-43a5-ad65-0d556131bf95","type":"SaveTool"},{"id":"f316665e-8334-4946-a107-6b175cabe8ed","type":"ResetTool"},{"id":"14ccb264-5c7b-404a-9be3-a7e2550c27e1","type":"HelpTool"}]},"id":"629ab30d-d9a8-432a-b6d8-b03ce28e9a27","type":"Toolbar"},{"attributes":{"band_fill_alpha":{"value":0.1},"band_fill_color":{"value":"olive"},"dimension":1,"grid_line_alpha":{"value":0},"plot":{"id":"1fd52f7c-0c03-4866-a5f1-03773ee4774c","subtype":"Figure","type":"Plot"},"ticker":{"id":"5dc14f7c-8622-4043-90a7-f0dd6fb2bee7","type":"BasicTicker"}},"id":"d75a3a62-e64d-4f24-bafc-3d8352a26754","type":"Grid"},{"attributes":{"line_color":{"value":"navy"},"x":{"field":"x"},"y":{"field":"y"}},"id":"c2725f72-c3b9-435a-b557-2e5faf61d9bc","type":"Line"},{"attributes":{},"id":"5dc14f7c-8622-4043-90a7-f0dd6fb2bee7","type":"BasicTicker"},{"attributes":{"source":{"id":"751a51d5-7c94-4a80-8cb9-277a349f2f01","type":"ColumnDataSource"}},"id":"093838a6-9636-4ece-a503-44940700958e","type":"CDSView"},{"attributes":{"months":[0,6]},"id":"77ff322b-b621-47cc-8da7-f45554e2703f","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":"4a628398-d0c9-401a-82d0-baac50b306a0","type":"AdaptiveTicker"},{"attributes":{"plot":null,"text":"AAPL One-Month Average"},"id":"79d64dc3-2b27-4646-aa22-06dfac745eb6","type":"Title"},{"attributes":{"callback":null},"id":"0d7fa2fc-ca14-405e-ba16-88cda6a6dda1","type":"DataRange1d"},{"attributes":{"data_source":{"id":"708cd011-ffba-4fcc-b831-ae27ae462998","type":"ColumnDataSource"},"glyph":{"id":"780e4a19-1aae-49b3-993c-97b9c0c2f7af","type":"Circle"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"91704d74-512b-475b-95da-463d7c376916","type":"Circle"},"selection_glyph":null,"view":{"id":"372d09a8-0e3f-4aa6-9086-bea932a148d1","type":"CDSView"}},"id":"9bf4865b-84b9-4ff2-add2-1f60a9ddf3df","type":"GlyphRenderer"},{"attributes":{},"id":"d376fd9d-6b02-4012-8a2d-bd7adfe1cca5","type":"DatetimeTickFormatter"},{"attributes":{"months":[0,4,8]},"id":"3b281115-535e-4150-880a-512e6f08d2a0","type":"MonthsTicker"},{"attributes":{"days":[1,8,15,22]},"id":"9b23ffad-dcdd-438b-99db-db27d322badf","type":"DaysTicker"},{"attributes":{"label":{"value":"avg"},"renderers":[{"id":"44925d0f-cbaf-4bc0-824d-73597b3bfa90","type":"GlyphRenderer"}]},"id":"49858aae-750c-43ad-8d3c-bc4787f65570","type":"LegendItem"},{"attributes":{},"id":"14ccb264-5c7b-404a-9be3-a7e2550c27e1","type":"HelpTool"},{"attributes":{},"id":"05fd9e76-eb83-46de-875e-f816fdc5fe33","type":"LinearScale"},{"attributes":{"overlay":{"id":"fcc8c0e5-6840-4d55-8fb7-1d6fe73f7779","type":"BoxAnnotation"}},"id":"1d4a948b-d0d2-43fd-bb16-34e910a7c3b5","type":"BoxZoomTool"},{"attributes":{"days":[1,15]},"id":"9e68db21-c2fc-479c-a2a0-ea7f931ccb83","type":"DaysTicker"},{"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":"91704d74-512b-475b-95da-463d7c376916","type":"Circle"},{"attributes":{},"id":"dd45e365-e17a-4cf6-8772-f678b7015e9f","type":"PanTool"},{"attributes":{"callback":null},"id":"77dc3b1d-90d0-424b-b508-c3f8569c063a","type":"DataRange1d"},{"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":"751a51d5-7c94-4a80-8cb9-277a349f2f01","type":"ColumnDataSource"},{"attributes":{"num_minor_ticks":5,"tickers":[{"id":"61a0754a-e349-4022-9bf4-72eff998cf83","type":"AdaptiveTicker"},{"id":"4a628398-d0c9-401a-82d0-baac50b306a0","type":"AdaptiveTicker"},{"id":"648e484f-bf59-45c2-bb50-aeb22fa4ed6c","type":"AdaptiveTicker"},{"id":"87d84d99-7a35-4dbe-8db9-59c8d14087c2","type":"DaysTicker"},{"id":"302e0311-cd65-4811-acc4-3293d67ebfb5","type":"DaysTicker"},{"id":"9b23ffad-dcdd-438b-99db-db27d322badf","type":"DaysTicker"},{"id":"9e68db21-c2fc-479c-a2a0-ea7f931ccb83","type":"DaysTicker"},{"id":"1b6e42e2-e1e1-43d6-ab6a-1deb3db73fa4","type":"MonthsTicker"},{"id":"16c4e29f-62eb-4981-84fd-892e1fbd0972","type":"MonthsTicker"},{"id":"3b281115-535e-4150-880a-512e6f08d2a0","type":"MonthsTicker"},{"id":"77ff322b-b621-47cc-8da7-f45554e2703f","type":"MonthsTicker"},{"id":"7f5f47a9-ac85-44b1-a5f0-20506bb0d9cf","type":"YearsTicker"}]},"id":"cc596e28-de87-4151-9c0c-870b93571b52","type":"DatetimeTicker"},{"attributes":{"months":[0,2,4,6,8,10]},"id":"16c4e29f-62eb-4981-84fd-892e1fbd0972","type":"MonthsTicker"},{"attributes":{"items":[{"id":"45fa3dd3-a649-41b2-ae5b-fe1f051b09c2","type":"LegendItem"},{"id":"49858aae-750c-43ad-8d3c-bc4787f65570","type":"LegendItem"}],"location":"top_left","plot":{"id":"1fd52f7c-0c03-4866-a5f1-03773ee4774c","subtype":"Figure","type":"Plot"}},"id":"d96e6999-de01-443d-b446-e1a8e10a34b3","type":"Legend"},{"attributes":{"days":[1,4,7,10,13,16,19,22,25,28]},"id":"302e0311-cd65-4811-acc4-3293d67ebfb5","type":"DaysTicker"},{"attributes":{"base":24,"mantissas":[1,2,4,6,8,12],"max_interval":43200000.0,"min_interval":3600000.0,"num_minor_ticks":0},"id":"648e484f-bf59-45c2-bb50-aeb22fa4ed6c","type":"AdaptiveTicker"},{"attributes":{"label":{"value":"close"},"renderers":[{"id":"9bf4865b-84b9-4ff2-add2-1f60a9ddf3df","type":"GlyphRenderer"}]},"id":"45fa3dd3-a649-41b2-ae5b-fe1f051b09c2","type":"LegendItem"},{"attributes":{},"id":"e82a54bc-0921-43a5-ad65-0d556131bf95","type":"SaveTool"},{"attributes":{},"id":"342ad59a-7980-4231-99de-0918f3290cd4","type":"BasicTickFormatter"}],"root_ids":["1fd52f7c-0c03-4866-a5f1-03773ee4774c"]},"title":"Bokeh Application","version":"0.12.9"}};
                    var render_items = [{"docid":"aeb43571-458f-4bf3-9cb9-55ffed3fc012","elementid":"94d7641a-b6ee-4144-8142-b24caa1baa9a","modelid":"1fd52f7c-0c03-4866-a5f1-03773ee4774c"}];
                
                    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);
})();
