1 00:00:00,150 --> 00:00:04,650 Oh, yes, and welcome back to another class of our course, want the complete introduction to that 2 00:00:04,740 --> 00:00:06,230 science with Python. 3 00:00:06,870 --> 00:00:13,350 So in this class, we are going to talk about Seabourne like in the best class, and we are still going 4 00:00:13,350 --> 00:00:16,320 to learn how to use this amazing visualization tool. 5 00:00:16,740 --> 00:00:17,900 So let's go into this class. 6 00:00:17,910 --> 00:00:22,710 We are going to create another type of graph which is called the Cat Blood. 7 00:00:23,010 --> 00:00:28,890 And basically inside of this block, what we are going to find, we are going to find once again, dots 8 00:00:28,890 --> 00:00:34,290 or lines or basically what's cool about it is that it will give us the higher limit and the lower limit. 9 00:00:35,190 --> 00:00:40,920 So basically, we will be able to see, for example, what is the most popular element of the graph, 10 00:00:40,920 --> 00:00:41,430 for example. 11 00:00:41,910 --> 00:00:46,700 So to help you better understand this graph, what I propose you is a basic example. 12 00:00:46,980 --> 00:00:50,310 So we are still going to work with databases from GitHub in this case. 13 00:00:50,700 --> 00:00:54,900 And the database that we are going to use today will be the flight's database. 14 00:00:54,910 --> 00:01:00,240 So basically, for those of for those of you who don't know from which database, we are going to take, 15 00:01:00,240 --> 00:01:01,990 everything that you can see, it's from here. 16 00:01:01,990 --> 00:01:03,060 It's from GitHub. 17 00:01:03,450 --> 00:01:07,140 And basically we are going to work with the database that is right here. 18 00:01:08,040 --> 00:01:08,410 All right. 19 00:01:08,910 --> 00:01:16,290 So our goal today will simply be to understand what is the most popular month of the year to fly. 20 00:01:16,470 --> 00:01:21,360 So once again, this is something that is pretty simple to do and will analyze the data that we have 21 00:01:21,360 --> 00:01:24,610 to be able to understand what is the most popular month of the year. 22 00:01:25,380 --> 00:01:25,780 All right. 23 00:01:25,800 --> 00:01:31,040 So, like always, the first step, the first step or the first thing that we need to do is importing 24 00:01:31,050 --> 00:01:32,130 our database. 25 00:01:32,130 --> 00:01:33,550 And this is exactly old. 26 00:01:33,990 --> 00:01:36,500 So we need to create a variable to store everything. 27 00:01:36,510 --> 00:01:38,830 So let's create the variable and call it database. 28 00:01:39,870 --> 00:01:40,920 So this is our variable. 29 00:01:41,340 --> 00:01:45,300 And inside of this variable, we want to import our data sets like always. 30 00:01:45,300 --> 00:01:51,740 What we will do all right is because we are making reference to Seabourne and we will write down load 31 00:01:51,760 --> 00:01:52,290 dataset. 32 00:01:52,440 --> 00:01:54,280 So we want to load the data set. 33 00:01:54,750 --> 00:01:56,250 So what data set we want to have? 34 00:01:56,250 --> 00:02:01,380 We want to have the flight data sets in this case will simply write down flights. 35 00:02:03,120 --> 00:02:03,720 So here we go. 36 00:02:03,720 --> 00:02:05,130 We have our dataset ready. 37 00:02:05,580 --> 00:02:09,430 Next thing, we want to print everything to be sure that everything works fine. 38 00:02:09,750 --> 00:02:14,860 So we want to print data base, which is in this case, the Bible that we have just for you. 39 00:02:15,570 --> 00:02:17,050 And we want to run everything. 40 00:02:17,070 --> 00:02:20,550 So if we have something generated right here, it means it works. 41 00:02:20,550 --> 00:02:22,050 If not, well doesn't work. 42 00:02:22,650 --> 00:02:25,930 So as you can see right here, we have generated absolutely everything we need. 43 00:02:25,950 --> 00:02:30,760 So as you can see, we have the years, the months and the number of passengers, which is quite amazing. 44 00:02:30,780 --> 00:02:31,940 So we have everything that we need. 45 00:02:32,370 --> 00:02:32,670 All right. 46 00:02:32,760 --> 00:02:38,790 From now, as I said, we want to do is we want to know in what month we have a lot of passengers inside 47 00:02:38,790 --> 00:02:39,950 of our flights. 48 00:02:41,070 --> 00:02:42,610 So this is exactly what we'll do. 49 00:02:43,470 --> 00:02:43,790 All right. 50 00:02:43,840 --> 00:02:51,210 So next thing that we want to do, since we have printed everything, we want to create our well, generate 51 00:02:51,210 --> 00:02:52,480 our blood. 52 00:02:52,680 --> 00:02:54,180 So how exactly do we generate the plot? 53 00:02:54,210 --> 00:02:54,900 It's pretty simple. 54 00:02:54,900 --> 00:02:58,260 So we'll just write down as the dot chat plot. 55 00:02:58,340 --> 00:03:00,640 So this is the blood that we are going to work with. 56 00:03:01,260 --> 00:03:02,190 This is the type of graph. 57 00:03:02,190 --> 00:03:03,810 So you'll see it's pretty simple. 58 00:03:03,820 --> 00:03:07,630 So instead of the cardboard, what exactly we need to write down, we have four arguments. 59 00:03:08,010 --> 00:03:10,580 So three of those four arguments are amendatory. 60 00:03:10,590 --> 00:03:13,650 So we need them to be able to make the graph work. 61 00:03:14,040 --> 00:03:19,500 And we have one argument that is optional, but we are going to talk about it a bit later. 62 00:03:20,490 --> 00:03:23,150 So the first argument that we need is the X. 63 00:03:23,490 --> 00:03:27,520 So in our cases, in our case, the X value will be the months. 64 00:03:27,960 --> 00:03:30,690 So basically the month will be our X value. 65 00:03:31,290 --> 00:03:34,320 Then we need a Y value for our graph. 66 00:03:34,800 --> 00:03:39,150 And in our case, the value of the graph will be the passengers. 67 00:03:39,600 --> 00:03:40,700 So here we go. 68 00:03:41,130 --> 00:03:42,390 We have the passengers. 69 00:03:42,400 --> 00:03:43,340 So very important. 70 00:03:43,350 --> 00:03:48,570 Don't make any mistake when you write down those arguments, because if you make a mistake, it's just 71 00:03:48,570 --> 00:03:49,320 not going to work. 72 00:03:49,890 --> 00:03:50,240 All right. 73 00:03:50,250 --> 00:03:53,540 Next argument is from where exactly we will take the data. 74 00:03:53,550 --> 00:03:57,420 So in our case, we are going to take the data from the variable data base. 75 00:03:57,420 --> 00:04:02,400 So the data is stored inside the database and this is where we are going to take it. 76 00:04:02,430 --> 00:04:09,240 So simply write down the data and the data that we are going to take will be taken from data base. 77 00:04:10,650 --> 00:04:11,060 All right. 78 00:04:11,070 --> 00:04:18,580 So those are the three viable arguments that are mandatory for our graph or for our blood to be generated. 79 00:04:18,900 --> 00:04:21,300 So let's run everything and see what it all looks like. 80 00:04:21,550 --> 00:04:23,220 Oh, I forgot one argument there. 81 00:04:23,580 --> 00:04:24,830 So we need to show everything. 82 00:04:24,840 --> 00:04:27,210 So it's going to be team that show. 83 00:04:31,840 --> 00:04:32,170 They're. 84 00:04:33,860 --> 00:04:36,660 So don't forget this little line of code as I did. 85 00:04:36,980 --> 00:04:37,440 All right. 86 00:04:37,460 --> 00:04:39,020 So simply run everything. 87 00:04:39,680 --> 00:04:40,330 So here we go. 88 00:04:40,340 --> 00:04:42,120 We have our graph right here. 89 00:04:42,590 --> 00:04:44,600 So this is the basics. 90 00:04:44,840 --> 00:04:47,540 Once again, here we have our outgroup. 91 00:04:47,540 --> 00:04:54,980 It looks pretty complicated to understand at first, but this is the one of the types of grab that we 92 00:04:54,980 --> 00:04:56,930 can generate with the blood. 93 00:04:56,940 --> 00:05:00,310 So basically, there are plenty of other types of retention. 94 00:05:00,680 --> 00:05:07,340 So as you can see, we automatically can see that July is the most important month of the year in terms 95 00:05:07,370 --> 00:05:11,800 of how many flights there is or how many passengers there is. 96 00:05:12,560 --> 00:05:14,270 Well, how many passengers there is. 97 00:05:14,360 --> 00:05:14,720 There is. 98 00:05:15,350 --> 00:05:19,980 And in the years that have been have been generated right here. 99 00:05:20,900 --> 00:05:27,260 So if you want to have something that is a bit more presentable, we can use a different type of graph 100 00:05:27,260 --> 00:05:28,010 for the checkbook. 101 00:05:28,370 --> 00:05:29,890 So basically, how do we do this? 102 00:05:29,900 --> 00:05:30,620 It's pretty simple. 103 00:05:30,630 --> 00:05:37,640 We are going to use the optional argument that is called kind so we can choose the kind of grab that 104 00:05:37,640 --> 00:05:37,980 we want. 105 00:05:38,000 --> 00:05:44,180 So basically we can have the strip strip, which is one of the arguments in this case. 106 00:05:44,180 --> 00:05:49,280 We can use strip and we can run and see what it looks like. 107 00:05:51,150 --> 00:05:56,640 So here we go, we have the strip right here, the strip is basically the thing by default, then we 108 00:05:56,640 --> 00:05:59,820 can use another one, which would be, for example, the violin. 109 00:06:02,020 --> 00:06:02,670 Here you go. 110 00:06:05,980 --> 00:06:08,720 So this is another type of graph, which is the violin. 111 00:06:09,040 --> 00:06:13,370 So you'll see it's a bit this one is a bit well, it takes more space. 112 00:06:13,370 --> 00:06:17,650 So it's going to be more complicated if you guys want to generate it and make it bigger. 113 00:06:20,410 --> 00:06:25,150 And there are some other types well, there are plenty of types, the ones that I personally prefer 114 00:06:25,150 --> 00:06:27,490 is bux, so the kind of books. 115 00:06:28,480 --> 00:06:31,210 So as you can see, it looks something like this automatically. 116 00:06:31,210 --> 00:06:37,870 With this type of graph, we can automatically see the demand that we have the most people is the month 117 00:06:37,870 --> 00:06:38,620 of July. 118 00:06:38,620 --> 00:06:43,360 So let's just make it full screen and see the month of July is the month where there is the most people. 119 00:06:43,370 --> 00:06:46,260 So even the mean of July is the highest. 120 00:06:46,630 --> 00:06:53,770 Then we can automatically see that the mean of the month where where there is the less people that are 121 00:06:53,770 --> 00:07:00,070 flying is the month of February, because as you can see here, we have the lowest but the lowest minimum 122 00:07:00,070 --> 00:07:01,020 will be in November. 123 00:07:01,030 --> 00:07:04,600 So in November, we have an extreme, which is the lowest extreme. 124 00:07:04,930 --> 00:07:11,530 But the month which is on average, where there is the less people flying will be February or the month 125 00:07:11,530 --> 00:07:12,400 right here. 126 00:07:13,810 --> 00:07:18,130 So as you can see, it's pretty cool what you guys can do with this type of graph, which is called 127 00:07:18,130 --> 00:07:18,820 the Catala. 128 00:07:19,150 --> 00:07:21,760 Once again, let me just summarize everything that we have learned. 129 00:07:21,760 --> 00:07:26,730 So basically, as always, the lines of code right here are made to generate a database. 130 00:07:27,280 --> 00:07:33,670 Then after that, the chatbot right here, pretty simple we simply write down is because we're making 131 00:07:33,670 --> 00:07:34,920 a reference to Seabourne. 132 00:07:34,930 --> 00:07:38,110 We write down chatbot because this is a type of flood that we need. 133 00:07:38,290 --> 00:07:44,140 We have for arguments with Schema X, which is right here, the months then the number of passengers 134 00:07:44,140 --> 00:07:49,550 right here, which is the way then we have our data, which is taken from database right here. 135 00:07:50,500 --> 00:07:55,660 And finally, the type of graph that we want in this case, we want the box type, which is one type 136 00:07:55,660 --> 00:07:58,180 of growth, and to understand the graph. 137 00:07:58,190 --> 00:08:03,970 So basically what we can understand right here is that we can understand how many passengers have been 138 00:08:03,970 --> 00:08:07,750 flying in this plane depending of the number of months. 139 00:08:08,560 --> 00:08:10,900 Hope you guys understand everything until now. 140 00:08:10,900 --> 00:08:16,090 As you can see, it's not really complicated to understand this type of graph, and it's pretty straight 141 00:08:16,090 --> 00:08:16,570 to the point. 142 00:08:16,600 --> 00:08:18,010 So you guys can understand it. 143 00:08:18,010 --> 00:08:18,700 Pretty simple. 144 00:08:19,060 --> 00:08:20,090 So that's a first class guys. 145 00:08:20,230 --> 00:08:22,390 See our next class.