library(psych)
library(gplots)
##
## Attaching package: 'gplots'
## The following object is masked from 'package:stats':
##
## lowess
# Import Dataset
setwd("~/Desktop/Study Material/DAM/R_Workspace/Project/Data")
biscuits <- read.csv("Biscuits.csv", header=TRUE)
chocolates <- read.csv("Chocolates.csv", header=TRUE)
trends <- read.csv("Trend.csv", header=TRUE)
# View(airlineData.df)
# describe(biscuits)
# describe(trends)
attach(biscuits)
aggregate(Average.Price..per.Kg.~Segment, data=biscuits, FUN = mean)
## Segment Average.Price..per.Kg.
## 1 ARROWROOT 91.55200
## 2 ASSORTED BISCUITS 131.26000
## 3 CREAM 95.00842
## 4 GLUCOSE 81.20650
## 5 MARIE 89.16107
## 6 MILK 89.62239
## 7 NON-SALT CRACKER 96.21805
## 8 OTHER BISCUITS 89.92222
## 9 SALT CRACKER 95.12121
## 10 SWEET/COOKIES 96.35027
## 11 WAFER CREAM 100.00000
boxplot(Average.Price..per.Kg.~Segment, main = "Average Price (in INR) vs Segment", xlab = "Biscuit Segment",col = (c("green","blue")), ylab = "Average Market Price (in INR)")

attach(chocolates)
## The following objects are masked from biscuits:
##
## Company, Segment
aggregate(Value.Rs.Millions~Market, data=chocolates, FUN = mean)
## Market Value.Rs.Millions
## 1 Chattisgarh 13.744493
## 2 Chhattisgarh - Rural 1.790749
## 3 Chhattisgarh - Urban 11.911894
## 4 Gujarat 59.118943
## 5 Gujarat - Rural 4.953744
## 6 Gujarat - Urban 54.178414
## 7 Madhya Pradesh 30.090308
## 8 Madhya Pradesh - Rural 3.504405
## 9 Madhya Pradesh - Urban 26.579295
## 10 Maharashtra 170.103524
## 11 Maharashtra - Rural 24.863436
## 12 Maharashtra - Urban 145.233480
## 13 West 273.121145
## 14 West Zone - Rural 35.176211
## 15 West Zone - Urban 237.975771
boxplot(Value.Rs.Millions~Market, main = "Market Potential Value (in INR)", xlab = "Market",col = (c("green","blue")), ylab = "Market Value (in INR)")

attach(trends)
aggregate(OCT~RE, data=trends, FUN = mean)
## RE OCT
## 1 CASH AND CARRY 9280.0920
## 2 CHEMIST 4319.7871
## 3 Chemist 3674.4641
## 4 ERETAIL 2339.1800
## 5 FOOD STORE 7302.6500
## 6 FOOD STORE 19696.3141
## 7 Food Store 24550.5496
## 8 Food store 18217.0300
## 9 HIGH END GROCER 7185.0557
## 10 HIGH END GROCER 13880.5991
## 11 High End Grocer 10337.6312
## 12 High end Grocer 8039.7000
## 13 INSTITUTIONAL/OTHERS 13236.8217
## 14 LARGE SUPER 122598.1600
## 15 LARGE SUPER 81339.3282
## 16 LOW END GROCER 0.0000
## 17 LOW END GROCER 2391.6842
## 18 Low End Grocer 2486.1913
## 19 Low end grocer 4371.2973
## 20 NEW CHANNEL 2506.0205
## 21 New Channel 6569.5735
## 22 New channel 0.0000
## 23 OTHERS 1420.6312
## 24 Others 1179.6826
## 25 PANPLUS 2320.1027
## 26 PanPlus 17732.1700
## 27 SMALL SUPER 27714.4100
## 28 SMALL SUPER 63731.0288
## 29 SMALL Super 15947.6600
## 30 SUB STOCKIST 145273.2113
## 31 SUB STOCKIST 1063293.9700
## 32 Small Super 238974.4900
## 33 WHOLESALE 30053.9441
## 34 WholeSale 860.7150
## 35 Wholesale 14195.6413
## 36 chemist 2191.9067
## 37 low end grocer 1515.9698
## 38 others 500.6762
## 39 panplus 1360.9100
## 40 small Super 85893.3000
## 41 small super 218.1800
## 42 wholesale 63425.1611
boxplot(OCT~RE, main = "October Sales (in INR) classified by Retail Outlet", xlab = "Retail Outlet",col = (c("green","blue")), ylab = "Sales Value (in INR)")
