Jake Ackman
1/29/21
This R Shiny Dashboard is to track COVID-19 cases.
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)
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.
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()
Comparing two countries can help evaluate the varying responses to COVID-19.
Here is the R Shiny server code for the app.The code has been commented out so that it won't run.