1 00:00:00,850 --> 00:00:06,430 Hello and welcome back to the class of our course with the complete introduction to that science with 2 00:00:06,430 --> 00:00:07,030 Python. 3 00:00:07,810 --> 00:00:14,090 So until now, we talked about many python tools that can be used, such as by Skype and Skype. 4 00:00:14,830 --> 00:00:21,040 And today we are going to talk about another really interesting tool that is used for visualization 5 00:00:21,040 --> 00:00:23,150 that is called matplotlib. 6 00:00:23,860 --> 00:00:25,470 So we are going to win this class. 7 00:00:25,480 --> 00:00:28,150 We are going to have a complete introduction to this amazing tool. 8 00:00:28,330 --> 00:00:30,700 So we are going to talk about visualization. 9 00:00:30,710 --> 00:00:31,600 What is it exactly? 10 00:00:31,600 --> 00:00:37,450 Then we're going to talk about matplotlib understand, understanding what exactly is inside of matplotlib 11 00:00:37,840 --> 00:00:40,540 and what is the concept of a plot. 12 00:00:41,020 --> 00:00:42,070 So let's start. 13 00:00:42,790 --> 00:00:43,130 All right. 14 00:00:43,150 --> 00:00:46,720 So the first thing that we need to understand is data visualization. 15 00:00:46,720 --> 00:00:52,090 And why exactly is it that important in data science or just in life in general? 16 00:00:52,900 --> 00:00:54,140 So what is data science? 17 00:00:54,670 --> 00:00:58,430 Basically, data science for me is a visual representation of results. 18 00:00:58,720 --> 00:01:05,470 So in this case, let's say you guys have a huge amount of data and you want to analyze this huge amount 19 00:01:05,470 --> 00:01:05,770 of data. 20 00:01:05,800 --> 00:01:12,480 So basically, if you guys are just using if you're just looking at data without making it visual in 21 00:01:12,500 --> 00:01:17,440 form of graphs or any other way to make it visual, it's going to be really hard to understand. 22 00:01:17,470 --> 00:01:20,200 So it will be really hard to find answers to questions. 23 00:01:20,200 --> 00:01:27,400 For example, you are looking at how much people on one hundred peoples likes pizza, where there is, 24 00:01:27,490 --> 00:01:29,380 for example, I don't know, onions on this pizza. 25 00:01:29,390 --> 00:01:34,490 So basically you want to know how much people like to have this topping on their pizza. 26 00:01:34,720 --> 00:01:39,850 So basically, if you make it visual, so in the form of graph, you will be able to see how much people 27 00:01:39,850 --> 00:01:40,210 on this. 28 00:01:40,210 --> 00:01:43,740 One hundred people like pizza with onions on this pizza. 29 00:01:43,870 --> 00:01:49,930 If you're just looking at numbers, maybe you will not see it as easily as if you put it visually in 30 00:01:49,930 --> 00:01:50,740 a form of graph. 31 00:01:51,760 --> 00:01:55,840 So the same thing could be providing an accessible way to understand patterns in data. 32 00:01:56,290 --> 00:01:59,110 So once again, this would be it could be for anything. 33 00:02:00,040 --> 00:02:03,150 Let me just give an example in the financial world. 34 00:02:03,160 --> 00:02:05,380 So basically you are looking in patterns. 35 00:02:06,280 --> 00:02:11,500 Let's say you're looking at a stock and you want to look at a pattern that happens every day or every 36 00:02:11,500 --> 00:02:12,420 week, every month. 37 00:02:13,330 --> 00:02:19,690 So basically, you can do it with data visualization, which is easier than if you're just looking at 38 00:02:19,690 --> 00:02:20,440 raw data. 39 00:02:20,470 --> 00:02:25,090 So basically, if you're looking at daily data of a stock, you will not necessarily be able to see 40 00:02:25,090 --> 00:02:27,400 all the patterns in all the chart movements. 41 00:02:27,610 --> 00:02:35,650 But if you're looking at the graph or you're looking at any other type of visual representation of it, 42 00:02:35,980 --> 00:02:38,260 it's going to be easier to understand. 43 00:02:39,040 --> 00:02:41,980 And finally, it makes large amount of data easy to understand. 44 00:02:42,790 --> 00:02:48,570 So basically a terrorist organization, since it's a representative, it's a visual representative way 45 00:02:48,910 --> 00:02:52,330 of data, it can make really huge amounts of data. 46 00:02:52,330 --> 00:02:53,990 Really, really simple to understand. 47 00:02:54,010 --> 00:03:00,790 So basically, you can have millions of, I don't know, numbers or elements inside of your database. 48 00:03:01,090 --> 00:03:05,890 But if you put it in a form of graph, it's going to be easier to understand that if you're just looking 49 00:03:05,890 --> 00:03:09,170 at those numbers that are just raw data. 50 00:03:09,700 --> 00:03:11,870 So why we have to visualize data. 51 00:03:12,340 --> 00:03:17,770 So, as I explained, it will at first help us with with the comprehension of data that you study. 52 00:03:18,040 --> 00:03:22,270 So basically, if you guys are studying huge amounts of data, trust me, it's going to be really, 53 00:03:22,270 --> 00:03:28,260 really hard to just study those huge amounts of data without representing them visually. 54 00:03:28,270 --> 00:03:34,330 So the best way to understand the data that you guys are studying is to visually represented and without 55 00:03:34,330 --> 00:03:35,620 a visual representation. 56 00:03:36,310 --> 00:03:40,040 Basically, it's almost impossible understanding the data that you are studying. 57 00:03:40,390 --> 00:03:43,730 And finally, it's very easy for our brain to understand, visualize data. 58 00:03:43,750 --> 00:03:48,250 So for the majority of us, we are very visual as people. 59 00:03:48,260 --> 00:03:54,050 So basically, if we are putting something in a visual form, so basically we put it, I don't know, 60 00:03:54,100 --> 00:03:56,470 in a form of a chart, a graph. 61 00:03:56,470 --> 00:03:58,000 So for that I could be tried graph. 62 00:03:58,780 --> 00:04:01,090 It could be, I don't know, histogram, for example. 63 00:04:01,090 --> 00:04:02,470 It could be anything. 64 00:04:02,470 --> 00:04:03,820 It could be a map, for example. 65 00:04:04,630 --> 00:04:12,160 So on those on those forms, it's going to be easier for our brain to understand it if that if we are 66 00:04:12,160 --> 00:04:13,870 looking at just raw data. 67 00:04:13,900 --> 00:04:17,860 So those are simple examples of how data could be represented. 68 00:04:18,400 --> 00:04:18,720 All right. 69 00:04:18,760 --> 00:04:22,900 So in Python, there is a way to represent data visually. 70 00:04:22,900 --> 00:04:28,200 So we talked about different tools that that are my tools and other stuff in the past few classes. 71 00:04:28,210 --> 00:04:33,020 But to visualize data, there is a tool that is called matplotlib. 72 00:04:33,020 --> 00:04:35,740 So once again, this is part of the Python library. 73 00:04:37,270 --> 00:04:39,130 So what exactly is matplotlib? 74 00:04:39,130 --> 00:04:42,180 So matplotlib is a plodding library for Python. 75 00:04:42,190 --> 00:04:44,620 In other words, it works pretty much like Matlab. 76 00:04:44,650 --> 00:04:47,600 So for those who know what that is, matlab. 77 00:04:48,520 --> 00:04:57,010 So this is we can set a free version of Matlab that works with Python basically to allow us to visualize 78 00:04:57,310 --> 00:05:00,310 data in form of plots or in form of. 79 00:05:00,610 --> 00:05:08,320 Charts, graphs or many other things, which is pretty cool in my opinion, since it's an amazing way 80 00:05:08,320 --> 00:05:10,030 for us to represent data. 81 00:05:10,480 --> 00:05:11,710 So what exactly is it? 82 00:05:11,720 --> 00:05:16,390 But it's a way to represent small or large amounts of data. 83 00:05:16,420 --> 00:05:19,670 So in this case, here are some examples of plots. 84 00:05:20,020 --> 00:05:21,940 So we have the bar chart right here. 85 00:05:21,950 --> 00:05:23,980 You can have the highest diagram right there. 86 00:05:24,010 --> 00:05:25,240 So it looks something like this. 87 00:05:25,570 --> 00:05:28,510 You can have scatter plots that are just dots everywhere. 88 00:05:28,520 --> 00:05:31,860 You can have area plots, you can have pikelets. 89 00:05:31,860 --> 00:05:33,310 So basically is a pie chart. 90 00:05:35,080 --> 00:05:40,210 There are some other things that exist on Muttalib that we are not necessarily going to cover them all, 91 00:05:40,750 --> 00:05:42,360 but we are going to talk about the basics. 92 00:05:42,370 --> 00:05:49,210 And basically in this part of the course, we are going to create blocks or charts with different with 93 00:05:49,270 --> 00:05:51,520 small databases that we are going to create. 94 00:05:52,600 --> 00:05:55,990 So I hope you guys right now understand what exactly is Metalocalypse. 95 00:05:56,020 --> 00:06:01,540 As you can see, it's not something that is really complicated and is just a way for us to make our 96 00:06:01,540 --> 00:06:04,970 data more visual, to be able to understand it. 97 00:06:05,200 --> 00:06:09,110 So that's at first glance, again, since you all know the next class where we are going to setting 98 00:06:09,130 --> 00:06:12,700 up matplotlib inside of your by text editor.