11/05/2020

Overview

Getting and preProcessing the Data

We use the code below to obtaina a Covid dataset with the data of each country everyday , and the Countries dataset that contains the geographical coordinates of each country and merge the two datasets in our final dataset dfx

date<-Sys.Date()-1
URL<-paste0("http://www.ecdc.europa.eu/sites/default/files/documents/COVID-19-geographic-disbtribution-worldwide-",date,".xlsx")
filename<-paste0("covid_",date,".xlsx")
if (!file.exists(filename))  download.file(URL, destfile=filename,mode="wb")
covid<- read.xlsx(filename,sheet=1)
covid<-covid[complete.cases(covid),]
covid$date<-as.Date(paste0(covid$year,"-",covid$month,"-",covid$day))
countries<-read.csv("countries.csv")
countries$country<-as.character(countries$country)
dfx<-merge(covid,countries,by.x="geoId",by.y="country")
dim(dfx)
## [1] 15416    15

App Inputs

The app contains 4 Inputs , a Slider , a Dropdown menu two checkboxes.
-The slider will select the data interval in which we’re interested.
-The Dropdown menu allows us to select a country , but also has the option SELECT ALL which will display the global data.
-The checkboxes will allows to to display or hide the Cases/Death on the map/graphs.

App outputs

The app has a 4 Tab output:
1. The map tab will display the COVID-19 Distribution on an interactive map. Hovering over countries will display the number of COVID cases/deaths.
2. The Total cases tab will display the cumulative sum of the cases/deaths on a graph using plotly
3. The Daily cases tab will similarly display the daily COVID cases/deaths
4. a final Documentation tab that will explain how the app works along with the Github repo ling and a little Easter egg :)