﻿1
00:00:02,980 --> 00:00:09,200
‫Now we have customer and product data loaded in our workspace.

2
00:00:09,460 --> 00:00:13,210
‫Let us look at the customer data plans to do this.

3
00:00:13,210 --> 00:00:19,200
‫We will run this command new customer.

4
00:00:19,510 --> 00:00:22,850
‫You can see in the first column there is a unique customer data.

5
00:00:22,930 --> 00:00:25,070
‫Then there is customer name segment.

6
00:00:25,150 --> 00:00:26,460
‫And so on.

7
00:00:26,800 --> 00:00:29,460
‫And the last column is region.

8
00:00:29,470 --> 00:00:34,260
‫This table lists down all the customers.

9
00:00:34,630 --> 00:00:39,760
‫If you want to get the aggregate of customers in each region.

10
00:00:39,760 --> 00:00:46,330
‫What this means is if you want to find out the number of customers belonging to each region we will

11
00:00:46,330 --> 00:00:52,080
‫create a table which will have regions and against each region.

12
00:00:52,150 --> 00:01:01,400
‫It will have count of customers this is called Creating the frequency distribution of a particular variable.

13
00:01:01,750 --> 00:01:07,910
‫From this data we will find out the frequency of occurrence of each region.

14
00:01:07,990 --> 00:01:16,630
‫So how many times sold comes in this column How many times list comes in this column and so on.

15
00:01:16,630 --> 00:01:24,870
‫So let us go and run a query to find out this frequency distribution for region variable to do this.

16
00:01:24,880 --> 00:01:25,800
‫We will run.

17
00:01:26,180 --> 00:01:27,820
‫Why get

18
00:01:32,020 --> 00:01:32,340
‫Will

19
00:01:36,290 --> 00:01:39,610
‫and within this we will maintain the data which is customer

20
00:01:43,670 --> 00:01:49,820
‫and offer dollar sign will mentioned the variable which is region.

21
00:01:49,820 --> 00:01:59,320
‫You can know that we are navigating using the arrow keys and pressing tab to select the particular option.

22
00:01:59,540 --> 00:02:06,990
‫If I run this command there will be a variable called VI created here.

23
00:02:07,280 --> 00:02:08,870
‫It is a table.

24
00:02:08,870 --> 00:02:15,740
‫It has four values for the four different regions that we had in our data.

25
00:02:15,740 --> 00:02:20,350
‫Let us look at this via data ones will just fade away and present it

26
00:02:24,640 --> 00:02:33,210
‫you can see it has four values for each for four different regions central east south and west central

27
00:02:33,220 --> 00:02:40,060
‫comes one eighty four times East comes to twenty times and its outcomes 134 times in our data

28
00:02:43,410 --> 00:02:52,350
‫if you want to look at in a proper table format you can use the view command view why have you done

29
00:02:52,350 --> 00:03:04,230
‫this you can look at it in a proper table format we'll go back once we have this data we can create

30
00:03:04,420 --> 00:03:13,110
‫by the plot on this but lots of graphical representation of frequency distributions it will have colored

31
00:03:13,110 --> 00:03:21,900
‫bars the height of these bars we really note the value of that particular variable so when we have categorical

32
00:03:21,900 --> 00:03:29,940
‫variables that is we have categories such as central east south and west we can collect t frequencies

33
00:03:30,150 --> 00:03:36,680
‫into a frequency distribution this will give us the number of times that particular categories appearing

34
00:03:36,720 --> 00:03:46,230
‫in our data and that frequency distribution can then be plotted in the form of a bar plot let us create

35
00:03:46,260 --> 00:03:46,990
‫this bottler.

36
00:03:47,070 --> 00:03:53,400
‫And once desecrated will discuss it further to create a boatload on this data we'll just ride by the

37
00:03:53,400 --> 00:03:53,760
‫plot

38
00:03:56,850 --> 00:03:58,570
‫and write right here.

39
00:03:58,850 --> 00:04:09,540
‫Control Center you can see in the right bottom window in this type of plot we have about plot these

40
00:04:09,540 --> 00:04:15,250
‫forward are these regions and this axis gives us the frequency.

41
00:04:15,480 --> 00:04:25,080
‫So central is somewhere around 170 if you look at this which is confirmed by the data it is 184 if you

42
00:04:25,080 --> 00:04:31,230
‫look at the height of this table it is somewhere around 225 it is actually 220.

43
00:04:31,590 --> 00:04:39,480
‫So basically the height of the bar is giving you the frequency of this particular category.

44
00:04:39,480 --> 00:04:46,710
‫Now there are certain parameters of this bar plot command will add them one by one so that you understand

45
00:04:46,710 --> 00:04:52,500
‫the importance of each of these parameters to these parameters basically are the properties of this

46
00:04:52,500 --> 00:05:00,270
‫bar plot that we have created parameters include the color of this bar plot the orientation the boundaries

47
00:05:00,750 --> 00:05:01,470
‫all those things.

48
00:05:01,530 --> 00:05:03,930
‫So you can change these values.

49
00:05:03,930 --> 00:05:11,970
‫So let us first arrange this bar plot in the order of these hate to do this we will raid bar plot

50
00:05:14,730 --> 00:05:19,740
‫y square bracket order

51
00:05:24,470 --> 00:05:26,550
‫black and white.

52
00:05:27,460 --> 00:05:34,260
‫When we do control get on this you can see this is all done in deep ascending order.

53
00:05:34,450 --> 00:05:38,480
‫If you want to arrange it in descending order you just put a minus sign in front of Wei

54
00:05:42,800 --> 00:05:47,380
‫you can see that the PLA does now in descending order.

55
00:05:47,380 --> 00:05:51,890
‫The second parameter that we will discuss is to change the orientation of bar blood.

56
00:05:52,060 --> 00:05:55,810
‫So currently the bar does standing vertically.

57
00:05:55,810 --> 00:06:03,940
‫If you want to change the orientation to horizontal so that the bars are shown horizontally to do that

58
00:06:04,000 --> 00:06:12,460
‫we will ride bar block y within squared backward order with Y

59
00:06:16,210 --> 00:06:25,090
‫comma actual RDA which is for horizontal is equal to to

60
00:06:28,400 --> 00:06:30,820
‫run this command debug block.

61
00:06:30,820 --> 00:06:32,120
‫There is no horizontal

62
00:06:35,100 --> 00:06:35,550
‫next.

63
00:06:35,820 --> 00:06:41,550
‫What we often like to do is change the color of this bar plot because this bar plug may not be looking

64
00:06:41,550 --> 00:06:42,060
‫very good.

65
00:06:42,950 --> 00:06:49,260
‫And if you want to use this bar plot in your in your presentation order in your research analysis you

66
00:06:49,260 --> 00:06:55,930
‫may want to change the appearance of this bar plot so we will change the color of this bar Plot to Change

67
00:06:55,930 --> 00:06:56,400
‫the color.

68
00:06:56,400 --> 00:07:02,320
‫There is an additional parameter called Color C0 l.

69
00:07:02,520 --> 00:07:06,420
‫You can also write color completely but see you l will alter do.

70
00:07:07,010 --> 00:07:13,200
‫And if you want all the bars to be on the same color you just write that particular class name so you

71
00:07:13,200 --> 00:07:22,950
‫can write red but then double quotation marks you put on this so you can see all the bar plots are now

72
00:07:22,950 --> 00:07:24,200
‫in red color.

73
00:07:25,080 --> 00:07:31,980
‫If you want to give different color to these different but you can create a concatenation of different

74
00:07:31,980 --> 00:07:39,560
‫colors so you will use the C function and within bracket will mentioned the four different colors red

75
00:07:39,600 --> 00:07:43,650
‫comma green comma blue comma

76
00:07:47,100 --> 00:07:56,640
‫blue comma bridge Lucy decade and renders you can see the colors have changed the bottom one is in red

77
00:07:56,640 --> 00:08:05,920
‫color then green and blue invasion if you want to look at the list of all the colors available with

78
00:08:06,070 --> 00:08:09,820
‫R you can draw straight colors open and close brocade

79
00:08:14,620 --> 00:08:22,520
‫in this control window you can see on the list of colors so it has a lot of colors apart from entering

80
00:08:22,520 --> 00:08:26,360
‫the name of this color you can also use this particular number.

81
00:08:27,470 --> 00:08:32,060
‫So basically colors of the array of these values.

82
00:08:32,210 --> 00:08:36,980
‫So if you mentioned colors and within square brackets you mentioned the number of discoloured although

83
00:08:37,220 --> 00:08:40,310
‫you'll get the same color.

84
00:08:40,730 --> 00:08:43,030
‫So these are all the colors available with you.

85
00:08:43,280 --> 00:08:52,790
‫Now if we want to remove this black boundary around each of these bodies will add another parameter

86
00:08:53,270 --> 00:08:56,420
‫and that is called Border is equal to any

87
00:08:59,890 --> 00:09:01,940
‫two all right.

88
00:09:02,030 --> 00:09:05,830
‫Murder is equal to any

89
00:09:10,730 --> 00:09:16,890
‫controlling debt so you can see the outside border which was black and.

90
00:09:17,140 --> 00:09:23,660
‫That border is removed from all the buzz.

91
00:09:23,740 --> 00:09:31,280
‫Now if you are going to use this chart in some presentation this chart should have a title to add a

92
00:09:31,280 --> 00:09:33,530
‫title to this bad plot.

93
00:09:33,560 --> 00:09:34,970
‫You need to use a barometer.

94
00:09:35,010 --> 00:09:35,510
‫You mean

95
00:09:39,840 --> 00:09:46,880
‫so after border will add up parameter called mean is equal to within.

96
00:09:46,900 --> 00:09:49,530
‫Double quotation marks will give the title of this chart.

97
00:09:50,250 --> 00:09:53,820
‫So it is frequencies of

98
00:09:57,440 --> 00:10:00,880
‫this frequency of regions.

99
00:10:00,880 --> 00:10:05,370
‫If you run this this chart now has a title.

100
00:10:05,470 --> 00:10:14,660
‫If you have a longer title and you want to use the next lane you can use this special character.

101
00:10:14,800 --> 00:10:20,070
‫Uh this escape character with n which signifies that you want to use the next lane.

102
00:10:20,110 --> 00:10:26,560
‫So the first language contain only frequency of and after that the next lane will have regions.

103
00:10:26,560 --> 00:10:33,810
‫So if you want to break the title into two lanes use slash and burn.

104
00:10:34,270 --> 00:10:46,150
‫If you also want to label the x axis to label x axis there is a barometer called X Lab so we copy paste

105
00:10:46,150 --> 00:10:57,400
‫this whole again and in the end we will add a parameter called X Lab is equal to and within double quotation

106
00:10:57,400 --> 00:11:05,440
‫marks will give the number of customers

107
00:11:10,630 --> 00:11:22,320
‫who do control enter number of customers there is no Indy is now the label of x axis so I think our

108
00:11:22,320 --> 00:11:31,140
‫bar plot is ready now we can use this bar plot in our presentation to use this bar plot we need to export

109
00:11:31,140 --> 00:11:40,980
‫this chart into the form of the image or a PD if there are two ways to export this graph into image.

110
00:11:41,250 --> 00:11:42,020
‫One is today.

111
00:11:42,040 --> 00:11:51,290
‫D Come on that if you run this command you'll get an image in the location that you specify the other

112
00:11:51,290 --> 00:11:52,380
‫is a simpler one.

113
00:11:53,190 --> 00:12:00,630
‫This comes with us to the only if you're going this blog there is an export option within this if you

114
00:12:00,630 --> 00:12:09,360
‫click on save an image you can save this image give the image format debate height and the directory

115
00:12:09,360 --> 00:12:16,590
‫where you want to save it and if you click on Save it will be saved as an image but this comes only

116
00:12:16,590 --> 00:12:21,930
‫with our studio I'll just show you the I'll just show you the command.

117
00:12:21,930 --> 00:12:28,530
‫Also if you are working on art and not art studio you'll have to done this command to get debar upload

118
00:12:28,800 --> 00:12:29,820
‫an image format

119
00:12:33,360 --> 00:12:42,650
‫so this is the code to generate BND you started writing PND after that that there is a parameter where

120
00:12:42,650 --> 00:12:47,630
‫you will give the location of file and the name of the file that you want to save it as then they wait

121
00:12:47,660 --> 00:12:56,360
‫and then decide when you write this name of PND saving device will start debarred plot you will draw

122
00:12:56,390 --> 00:13:02,010
‫after this line once this bomb plot is gone you'll have to switch off the device.

123
00:13:02,120 --> 00:13:05,610
‫So this the third line is also very important.

124
00:13:05,900 --> 00:13:09,890
‫David out of this will switch off the device.

125
00:13:09,890 --> 00:13:16,260
‫So in the second line we have written the holds index of bad plot which whichever parameters you we

126
00:13:16,280 --> 00:13:18,440
‫discussed whichever we want to keep.

127
00:13:18,440 --> 00:13:19,640
‫We do not want to keep.

128
00:13:19,640 --> 00:13:27,440
‫We can have it here once we draw this bar plot here then we switch off the device will see that a PND

129
00:13:27,470 --> 00:13:33,470
‫file is saying that the location that we have specified this is not required if we are working on our

130
00:13:33,470 --> 00:13:40,730
‫studio if you are using our studio better use this image save as emergency was of options.

