Measles Cases data analysis

Measles is an infectious, contagious disease, and causes acute illness, such as severe diarrhea, ear infections, pneumonia, and much more which can potentially lead to death. Measles is a very ancient disease as it was first known in the 9th century by Abū Bakr Muhammad Zakariyyā Rāzī, who was a Persian physician and scholar. Around 16 century,measles became more widespread due to global exploration. Before vaccination began in 1980s, measles caused around 2 million deaths yearly, where 12,000 were in the Americas.

dat <- read.csv("~/Desktop/ANT 109/measles.csv", stringsAsFactors=TRUE)

barplot((dat$measles.cases)/1000000,dat$year, names.arg = dat$year, xlab="Year", ylab="Measles Cases (per million)", main=" Number of Measles Cases Per Year",horiz = F,col = "red",lwd=2,las=1)

In the 1980s, there was high cases of measles, where 4 million cases was the highest in 1981. As the years pass by the cases of measles started to decrease. In 1986, there was a dramatic decrease of measles cases, as the number of cases hit around 2 million. In 1994, measles cases hit around 1 million. In 2007, the cases dropped below one million becoming nearly eradicated.

Measles cases and Vaccination coverage Rate analysis

In 1954, John F. Enders and Dr. Thomas C. Peebles collected blood samples from ill students during the outbreak of measles in Boston, Massachusetts. Their goal was to isolate the measles virus in the blood and create a vaccine. They successfully isolated measles in a 11 year old boy. Later in 1963, John Enders and peers created the first vaccine and licensed it in the United States. Later on the years, the measles vaccine was repeatably improved and developed. Now, the World Health Organization recommends vaccination of measles at 9 months because childhood vaccination against measles has substantially decreased disease rates worldwide since the vaccine has proven to be 93% effective against measles.

p <- plot_ly(dat[dat$year%in%c(1985:2005),], x = ~vaccination.coverage, y = ~measles.cases, type = 'scatter', mode = 'markers',color = ~year, colors = c("#ff475e",
                                                                                                                                                         "#5c4800",
                                                                                                                                                         "#00304b",
                                                                                                                                                         "#85b8ff",
                                                                                                                                                         "#9f0075")) %>%
  layout(title = 'Vaccination Coverage to Measles Cases in 1985 to 2005',yaxis = list(title = 'Measles Cases (per million)'), xaxis = list(title = 'Vaccination Coverage Rate'))
p
####The (dat[dat$year%in%c(1985:2005),] code was gathered from Class 7_data manipulation, an example is x[x%in%c("Mac", "Jessica", "Sophia")]. We also learned how to sort in Class 7, an example is (airquality[,1:5], 1, mean).

In 1985 and 1986 (which are presented in light pink), there was a high number of measles cases since only less than 50% of people were vaccinated. In the 1990s (which are presented in brownish, dark colors), measles cases started to decrease while the vaccination coverage rate increased. In 2005 (presented as purple), there is a low amount of measles cases due to high rate of vaccine coverage of more than 70%. The graph demonstrates that the more people who are covered with the vaccine,the less measles cases there will be.

y1 <- dat$measles.cases/100000
y2 <- dat$vaccination.coverage
x <- dat$year

par(mar = c(5, 4, 4, 4) + 0.3)
mybar <- barplot(y1,x,col = "green",xlab="Year", names.arg = x,ylab="Measles Cases (per 100,000)",main="Measles Cases vs Vaccination Coverage Rate",horiz = F,las=1)
mybar
##          [,1]
##  [1,]  1389.7
##  [2,]  3769.9
##  [3,]  6151.1
##  [4,]  8533.3
##  [5,] 10916.5
##  [6,] 13300.7
##  [7,] 15685.9
##  [8,] 18072.1
##  [9,] 20459.3
## [10,] 22847.5
## [11,] 25236.7
## [12,] 27626.9
## [13,] 30018.1
## [14,] 32410.3
## [15,] 34803.5
## [16,] 37197.7
## [17,] 39592.9
## [18,] 41989.1
## [19,] 44386.3
## [20,] 46784.5
## [21,] 49183.7
## [22,] 51583.9
## [23,] 53985.1
## [24,] 56387.3
## [25,] 58790.5
## [26,] 61194.7
## [27,] 63599.9
## [28,] 66006.1
## [29,] 68413.3
## [30,] 70821.5
## [31,] 73230.7
## [32,] 75640.9
## [33,] 78052.1
## [34,] 80464.3
## [35,] 82877.5
## [36,] 85291.7
## [37,] 87706.9
## [38,] 90123.1
points(mybar[,1],y2/2.5,type="l",col="red",lwd=2)
axis(side=4,at=seq(0,40,5), labels = seq(0,40,5)*2.5,las=1)
mtext("Vaccination Coverage", side=4, line=3)
legend("right", title="Legend",legend=c("Measles Cases","Vaccination Coverage Rate"), col = c("green","red"), pch = c(1,1), cex=0.4,lwd = 2)