Question 1:
The following graph aims to show the amount of reported Measles
cases from 1980 to 2017.
As you can see, millions of people are diagnosed with Measles early
on.
However, as time continues, we see a sharp decline in the number of
diagnosed cases, globally.
Measles is a terribly infectious disease, and can cause death if not
treated.
As of 2017, Measles is far less widespread as it was in 1980.
dat <- read.csv("~/ANT 109/measles.csv", stringsAsFactors=TRUE)
barplot(height = dat$measles.cases/100, names.arg = dat$year, ylab = 'Number of cases of Measles (x100)', main = 'Global Cases of Measles from 1980-2017', col = colors()[c(2,8)])

Question 2
As a result of the millions of measles cases worldwide, global
leaders pushed for a vaccine solution.
A vaccine was first made in 1963, however it took some time for the
vaccine to establish herd immunity.
Herd immunity is achieved when a high percentage of the globe
becomes vaccinated, making it so that not one hundred percent of people
need to get vaccinated.
Herd immunity is essential as it protects the people who may be too
immuno-compromised to receive the vaccine in the first place.
dat2 <- read.csv("~/ANT 109/measles2.csv", stringsAsFactors=TRUE)
p = plot_ly(dat2, y=~measles.cases, x=~vaccination.coverage, type = 'scatter')
p = p %>% layout(title = 'Vaccination Rates Relating to Measle Cases from 1980-2005', yaxis = list(title = 'Cases of Measles', xaxis = list(title = 'Vaccination Rate', zeroline = TRUE)))
p
## No scatter mode specifed:
## Setting the mode to markers
## Read more about this attribute -> https://plotly.com/r/reference/#scatter-mode
By 2017, a fraction of the cases from 1980 were being diagnosed
every year.
This decline is much in part to the herd immunity that was
achieved.
With the global importance on getting as much people vaccinated as
possible, it did not take long for herd immunity to be reached.
This shows the importance of being able to diagnose a disease early,
in order to prevent so many cases from being exposed.
With proper preventative measures going forward, we hope to learn
from the Measles outbreak to try and improve our response time given
toward making viable vaccines.
Question 3
barplot(height = dat$measles.cases/100, names.arg = dat$year, ylab = 'Number of cases of Measles (x100)', main = 'Global Cases of Measles from 1980-2017', col = colors()[c(2,8)])
par(mar = c(5, 4, 4, 4) + 0.25)
par(new = TRUE)
plot(x = dat$year, y = dat$vaccination.coverage, type = 'l', lwd = 2, axes = FALSE, xlab = '', ylab = '')
axis(4, at = seq(0, 100, 5))
mtext('Percentage of Global Vaccination Rates', side = 4, line = 3, pch = 19)
