The Data consists of the amount of tick vaccine sold in Australia for beef cattle between 1/7/13 and 30/9/13 in two forms: chilled trivalent and frozen trivalent.this vaccine protects cattle against the tick fever that is caused by Babesia bovis, Babesia bigemina and Anaplasma marginale from ticks.The trivalent vaccine contains live doses of tick fever organisms, which helps provide immunity to the tick fever infection usually for life. Source: Agriculture and Fisheries, Queensland Government
library(readxl)
Tick_data <- read_excel("~/Uni/Stats/Assignments/Tick data.xlsx")
## New names:
## * `` -> ...4
## * `` -> ...5
Tick_data
## # A tibble: 26 x 5
## Region Type Sales ...4 ...5
## <chr> <chr> <dbl> <lgl> <dbl>
## 1 Brisbane.Moreton Chilled 22880 NA NA
## 2 Brisbane.Moreton Frozen 475 NA 300095
## 3 WideBay.Burnett Chilled 46635 NA 18975
## 4 WideBay.Burnett Frozen 500 NA NA
## 5 CentralQLD Chilled 169965 NA 306700
## 6 CentralQLD Frozen 9000 NA 12370
## 7 NorthQLD Chilled 10005 NA NA
## 8 NorthQLD Frozen 0 NA 319070
## 9 Far North QLD Chilled 3245 NA NA
## 10 Far North QLD Frozen 0 NA NA
## # ... with 16 more rows
library(readxl)
Chilled_vs_Frozen <- read_excel("~/Uni/Stats/Assignments/Chilled vs Frozen.xlsx")
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
totnum= Tick_data %>%
group_by(Type) %>%
summarise(Sum=sum(Sales), Mean=mean(Sales), Min=min(Sales), Median=median(Sales), Sd=sd(Sales), IQR=IQR(Sales))
totnum
## # A tibble: 2 x 7
## Type Sum Mean Min Median Sd IQR
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Chilled 300095 23084. 10 9245 46132. 22105
## 2 Frozen 18975 1460. 0 0 3351. 475
totnum= Tick_data %>%
group_by(Region) %>%
summarise(Sum=sum(Sales), Mean=mean(Sales), Min=min(Sales), Median=median(Sales), Sd=sd(Sales), IQR=IQR(Sales))
totnum
## # A tibble: 13 x 7
## Region Sum Mean Min Median Sd IQR
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Brisbane.Moreton 23355 11678. 475 11678. 15843. 11202.
## 2 CentralQLD 178965 89482. 9000 89482. 113819. 80482.
## 3 DarlingDowns.West QLD 11785 5892. 0 5892. 8333. 5892.
## 4 Far North QLD 3245 1622. 0 1622. 2295. 1622.
## 5 NorthQLD 10005 5002. 0 5002. 7075. 5002.
## 6 NorthWes QLD 32210 16105 9000 16105 10048. 7105
## 7 NSW 775 388. 0 388. 548. 388.
## 8 NT 9245 4622. 0 4622. 6537. 4622.
## 9 SA 10 5 0 5 7.07 5
## 10 TAS 10 5 0 5 7.07 5
## 11 VIC 95 47.5 0 47.5 67.2 47.5
## 12 WA 2235 1118. 0 1118. 1580. 1118.
## 13 WideBay.Burnett 47135 23568. 500 23568. 32622. 23068.
summary(Tick_data$Sales)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.0 0.0 487.5 12271.9 9183.8 169965.0
library(ggplot2)
ggplot(Tick_data, aes(x= Region, y= Sales, fill= Type))+ geom_bar(position="dodge", stat= "identity")+ labs(y="Number of Vaccines Sold")+ scale_y_continuous(limits= c(0,170000), breaks= seq(0,170000,10000), expand= c(0,0)) + theme(axis.text.x = element_text(face="bold", color="#333333", size=8, angle=90), axis.text.y = element_text(face="bold", color="#333333", size=8, angle=0))
Figure 1: This graph shows the amount of Chilled and Frozen tick vaccine sold in Australia over the year 2013. It also shows that QLD has the biggest intake of vaccines meaning they must have the most cases of tick fever, also the frozen vaccines are much less popular than the chilled vaccines.
Chilledsales <- sum(22880,46635,169965,10005,3245,23210,11785,775,9245,10,10,95,2235)
Frozensales <- sum(Tick_data$Sales)-Chilledsales
histdata <- c(Chilledsales, Frozensales)
barplot(histdata, xlab= "Type of Vaccine", ylab="Sales", space = 0, names.arg = c("Chilled", "Frozen"), col=rainbow(2))
Figure 2: This figure shows the difference between the Chilled and Frozen vaccines sold in Australia. It is evident that the Chilled vaccine is much more popular than the Frozen vaccine.
boxplot(Tick_data$Sales, ylab="Sales")
Figure 3: The above box plot is a representation of the sales and the outliers of the Chilled vaccine in Central QLD and Widebay.
In this data set the mean (12271.9) is larger than the median (487.5) meaning that it is positively skewed. The interquartile range is 9183.8.
Plotting this data set of different tick vaccines sold in Australia it has shown that the vaccines are predominantly sold into QLD with 96% of the vaccine sales and only 4% to every other state. the data also shows that 94% of the vaccines sold are chilled whereas only 6% of the vaccines sold are frozen, this is also evident as the frozen vaccines were only sold in QLD.