This is a typical example of how a Data science report can be made.
The data used here belongs to Biodelta Pharmacueticals
This work can certainly be improved upon
library(readr)
CustSalesMAY2019 <- read_csv("CustSalesMAY2019.csv")
## Warning: Missing column names filled in: 'X13' [13]
## Parsed with column specification:
## cols(
## SUPNO = col_double(),
## SUPNAME = col_character(),
## BRANCH = col_character(),
## CUSTNO = col_double(),
## CUSTNAME = col_character(),
## CUSTTOWN = col_character(),
## CUSTPCODE = col_character(),
## ITEMCODE = col_double(),
## ITEMDESCR1 = col_character(),
## ITEMDESCR2 = col_character(),
## QTYSHIPPED = col_double(),
## EXTPRC = col_double(),
## X13 = col_character()
## )
## Warning: 589 parsing failures.
## row col expected actual file
## 1 -- 13 columns 12 columns 'CustSalesMAY2019.csv'
## 2 -- 13 columns 12 columns 'CustSalesMAY2019.csv'
## 3 -- 13 columns 12 columns 'CustSalesMAY2019.csv'
## 4 -- 13 columns 12 columns 'CustSalesMAY2019.csv'
## 5 -- 13 columns 12 columns 'CustSalesMAY2019.csv'
## ... ... .......... .......... ......................
## See problems(...) for more details.
View(CustSalesMAY2019)
head(CustSalesMAY2019)
## # A tibble: 6 x 13
## SUPNO SUPNAME BRANCH CUSTNO CUSTNAME CUSTTOWN CUSTPCODE ITEMCODE
## <dbl> <chr> <chr> <dbl> <chr> <chr> <chr> <dbl>
## 1 11843 BIO DE… BFN 504869 ASSEMBL… KIMBERL… <NA> 1846964
## 2 11843 BIO DE… BFN 514503 BAHLABA… THABA N… 9780 1847035
## 3 11843 BIO DE… BFN 514503 BAHLABA… THABA N… 9780 1846913
## 4 11843 BIO DE… BFN 514503 BAHLABA… THABA N… 9780 1846956
## 5 11843 BIO DE… BFN 514503 BAHLABA… THABA N… 9780 1706427
## 6 11843 BIO DE… BFN 514503 BAHLABA… THABA N… 9780 1847019
## # ... with 5 more variables: ITEMDESCR1 <chr>, ITEMDESCR2 <chr>,
## # QTYSHIPPED <dbl>, EXTPRC <dbl>, X13 <chr>
what the first 6 six rows of our data looks like
dim(CustSalesMAY2019)
## [1] 589 13
there are 589 observations and 13 variables
length(unique(CustSalesMAY2019$CUSTNAME))
## [1] 136
You had about 136 unique customers visit your shop
length(unique(CustSalesMAY2019$ITEMDESCR1))
## [1] 32
A total of 32 products were on the shelf
length(unique(CustSalesMAY2019$QTYSHIPPED))
## [1] 38
38 unique purchases were made
sum(CustSalesMAY2019$EXTPRC)
## [1] 126856.3
total of $126,866 was made in May
sum(CustSalesMAY2019$QTYSHIPPED)
## [1] 5365
5,365 cartons of items was sold on May
mean(CustSalesMAY2019$QTYSHIPPED)
## [1] 9.108659
Everyday about 9.2 cartons were sold
sort(table(CustSalesMAY2019$CUSTNAME),decreasing=TRUE)[1:3]
##
## MEDHOF APTEEK MARBLE HALL APTEEK MASUPATSELA PHARMACY
## 21 20 17
3 Most valuable customers
sort(table(CustSalesMAY2019$ITEMDESCR1),decreasing=TRUE)[1:3]
##
## ALPHA VIT C 500MG 100 TABS ALPHA CALM CAPS 20
## 74 51
## ALPHA THROATIES 10
## 45
3 most shipped most products are ALPHA VIT C 500MG, 100 TABS, ALPHA CALM CAPS 20, and, ALPHA THROATIES 10
H <- c(74, 51 , 45 )
M <- c("VITC", "CALMCAPS", "THROATIE")
barplot(H,xlab="April 2019",ylab="most sold drug ",col=("blue"),names.arg=M, main="actual cartons shipped",border="red", horiz=TRUE)
ALPHA VIT C 500MG is the most sold item in the category being sold more than 70 times