1
00:00:01,130 --> 00:00:06,590
Hey this is yet another lecture about building candelstick charts with Bokeh.

2
00:00:07,130 --> 00:00:13,260
And at this point we have this candlestick chart and in this lecture was a whole do is I'll change the

3
00:00:13,260 --> 00:00:13,660
colors

4
00:00:13,680 --> 00:00:19,370
of these boxes and we have green and red there.

5
00:00:19,470 --> 00:00:27,120
I'll show you how to pass a color code so CSS color codes in there so you can have a wide range of choices

6
00:00:27,510 --> 00:00:28,550
for the colors.

7
00:00:29,070 --> 00:00:35,380
And I will make this chart responsive so when you minimize the window and you resize it,

8
00:00:35,490 --> 00:00:37,530
the chart is always there.

9
00:00:37,830 --> 00:00:40,460
So you see all the plot elements.

10
00:00:40,460 --> 00:00:42,350
Then we'll try some more data.

11
00:00:42,360 --> 00:00:47,120
So here we have 10 days and we will try with some more months.

12
00:00:47,130 --> 00:00:50,260
So we get a better overview of the plot.

13
00:00:51,650 --> 00:01:01,260
So to get color codes for these fill color parameter
you can make a simple search CSS colors

14
00:01:01,260 --> 00:01:03,490
there.

15
00:01:03,530 --> 00:01:08,550
And if you open W3Schools Website

16
00:01:11,640 --> 00:01:20,180
and you scroll down, so let's find something for green, something lighter there.

17
00:01:20,330 --> 00:01:23,080
And this one looks good.

18
00:01:23,250 --> 00:01:26,170
So paste that here.

19
00:01:26,310 --> 00:01:32,440
But you also need to put the hash tag and now
something to replace the red color.

20
00:01:34,410 --> 00:01:39,250
Probably that.

21
00:01:39,450 --> 00:01:41,340
And let's see what we get.

22
00:01:42,360 --> 00:01:53,990
So this looks probably better. Now to make these chart responsive you want to pass the responsive

23
00:01:54,000 --> 00:01:56,550
parameter to the figure objects.

24
00:02:04,680 --> 00:02:14,960
So now if you play around with this window you can see that the chart adjusts with the window size.

25
00:02:15,750 --> 00:02:18,300
So that's good.

26
00:02:19,650 --> 00:02:22,890
And let's see how it works with more data.

27
00:02:22,890 --> 00:02:24,780
So let's start from 2015.

28
00:02:27,240 --> 00:02:30,870
Maybe November.

29
00:02:32,970 --> 00:02:38,030
So you execute this and you get the new data frame.

30
00:02:38,220 --> 00:02:43,140
Now you need to be careful there because

31
00:02:43,530 --> 00:02:51,370
here you have the old data frame so you need to execute this cell too and the other one as well.

32
00:02:51,500 --> 00:03:01,230
So the updated data frame with the three columns added there and now execute actual the code for the Bokeh plot.

33
00:03:02,990 --> 00:03:05,870
Yeah, here is a good overview 

34
00:03:05,880 --> 00:03:16,030
the stock market data from November to March. We have quite a decline here and then steady.

35
00:03:16,770 --> 00:03:20,650
Let's do some housekeeping.

36
00:03:21,040 --> 00:03:25,300
I'd remove this. Escape shift.

37
00:03:25,460 --> 00:03:26,170
J.

38
00:03:26,460 --> 00:03:34,130
Select the other cell. Shift M to merge them and then maybe remove this line.

39
00:03:37,190 --> 00:03:42,450
Shift J to merge these two.

40
00:03:42,780 --> 00:03:48,750
So we have entire code in one single cell.

41
00:03:48,830 --> 00:03:58,520
Now you can just change these start and end times here and execute the entire code in one press of a button.

42
00:03:58,520 --> 00:03:59,380
Just like that.

43
00:04:02,760 --> 00:04:08,370
So we've got the candlestick chart and that's what I wanted to teach you in this lecture and throughout

44
00:04:08,370 --> 00:04:09,690
the next lectures

45
00:04:09,690 --> 00:04:18,000
what we'll be doing is we'll embed this chart into a Flask application so inside a web page which is

46
00:04:18,000 --> 00:04:19,940
run with Flask.

47
00:04:19,950 --> 00:04:24,260
So that will be quite interesting and I'll see you in the next lecture.

