Measles is a highly contagious disease that poses a threat to public health worldwide. At its peak, measles was responsible for nearly 2.6 million deaths per year. The viral disease rapidly spreads due to being easily contagious via airborne or contact with infected nasal or throat secretions. One infected person can transmit the viral disease to nine out of ten unvaccinated close contact individuals.
# Create a bar plot showing the evolution of annual measles cases
# par(mar = c(5, 4, 4, 4) + 0.3)
barplot(height= data_measles$measles.cases/100000,
col = "blue",
main = "Evolution of Measles Cases (1980-2017)",
xlab = "Year",
ylab = "Number of Cases (Per Hundred Thousand)",
names.arg = c(1980:2017), las =1
)
At the start of the 1980’s, measles infected about 4 million individuals. A decade later, the number of cases had diminished 50% due to tireless efforts of informing the public of this menacing disease. By the start of the 21st century, the cases of measles had decreased to the point where it was able to be declared eliminated, from the United States, in 2000.
As we dive into unraveling the intricacies of measles outbreaks, we’re diving into the interrelationship between vaccination rates and the frequency of measles cases from 1985 to 2005. To this day, measles continues to loom largely on the global public health stage, even with effective vaccines at our disposal. Our goals is to offer insight into just how effective vaccination initiatives are in curbing the spread of measles.
library(plotly)
## Loading required package: ggplot2
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
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
data_plotly <- data_measles %>%
filter(year %in% c(1985:2005))
plot_ly(data = data_plotly, x= ~data_plotly$vaccination.coverage, y= ~data_plotly$measles.cases, type="scatter", name = "Number of Cases") %>%
layout(title = "Evolution of Measles Cases vs Vaccination Coverage \n(1985-2005)",
xaxis = list(title = "Vaccination Coverage (%)"),
yaxis = list(side = 'left', title = 'Measles Cases (per Million)', showgrid = FALSE, zeroline = FALSE))
## No scatter mode specifed:
## Setting the mode to markers
## Read more about this attribute -> https://plotly.com/r/reference/#scatter-mode
The interactive scatter plot shows the correlation between the measles cases and vaccination coverage. The individual data points represent a specific year with the x-coordinate indicating the vaccination coverage and the y-coordinate representing the number of reported measles cases. It is evident from the data that there is a noticeable relationship of high vaccination rates and fewer cases, while lower rates are associated with higher case numbers.
library(plotly)
plot_ly(data = data_measles, x= ~data_measles$year, y= ~data_measles$measles.cases, type="bar", name = "Number of Cases") %>%
add_trace(x = ~data_measles$year, y = ~data_measles$vaccination.coverage, type = "scatter", mode = "lines", name = 'Vaccination Coverage', yaxis = "y2") %>%
layout(title = "Evolution of Measles Cases vs Vaccination Coverage",
xaxis = list(title = "Year"),
yaxis = list(side = 'left', title = 'Measles Cases (per Million)', showgrid = FALSE, zeroline = FALSE),
yaxis2 = list(side = 'right', overlaying = "y",
title = 'Vaccination Coverage (%)', showgrid = FALSE, zeroline = FALSE))
# Create a bar plot showing the evolution of annual measles cases
# par(mar = c(5, 4, 4, 4) + 0.3)
bar1 <- barplot(height= data_measles$measles.cases/100000,
col = "blue",
main = "Evolution of Measles Cases (1980-2017)",
xlab = "Year",
ylab = "Number of Cases (Per Hundred Thousands)",
names.arg = c(1980:2017), las =1
)