R Presenter Presentation

Jake Ackman
1/29/21

Intro

This R Shiny Dashboard is to track COVID-19 cases.

  • COVID-19 is a global pandemic that has upended the entire world.
  • Tracking COVID-19 cases by country can help us understand what countries have a more effective response to the pandemic.

Read In COVID-19 Data

The data is provided by OpenData in Europe. We have to read in the CSV file from a URL location, and

library(lubridate)
library(tidyverse)
library(ggplot2)

covid_data <- read.csv("https://opendata.ecdc.europa.eu/covid19/casedistribution/csv", na.strings = "", fileEncoding = "UTF-8-BOM", stringsAsFactors = F)

# convert date format#

covid_data$dateRep <- dmy(covid_data$dateRep)

Tracking New Zealand cases

Looking at COVID-19 cases in New Zealand, they never reached more than 500 weekly cases, and after the Spring they never reached more than 100 cases per day.

plot of chunk unnamed-chunk-2

Tracking US cases

In the USA, the number of weekly cases has steadily increased since April.

covid_data %>% filter(countryterritoryCode == "USA") %>% ggplot(aes(dateRep, cases_weekly)) + geom_point(colour = "black", size = 3) + geom_line(colour = "red", size = 1.5) + xlab("Date Week") + ylab("Number of Cases") + theme_minimal()

plot of chunk unnamed-chunk-3

Comparing Different Countries

Comparing two countries can help evaluate the varying responses to COVID-19.

plot of chunk unnamed-chunk-4

Server Code

Here is the R Shiny server code for the app.The code has been commented out so that it won't run.