-
Notifications
You must be signed in to change notification settings - Fork 0
/
timeseries_world_ncov.Rmd
39 lines (29 loc) · 1.4 KB
/
timeseries_world_ncov.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
title: "Automatically pull data from 2019-nCoV data from Johns Hopkins University Github Repository"
output: html_notebook
---
Required Libraries
```{r include=FALSE}
library(tidyverse)
```
Confirmed Cases
```{r Confirmed Cases, include=FALSE}
ncov_confirmed_cases <- read_csv("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv") %>%
pivot_longer(-c(`Province/State`, `Country/Region`, Lat, Long),
names_to = "date", values_to = "count")
write_csv(ncov_confirmed_cases, "ncov_confirmed.csv")
```
Recovered Cases
```{r Recovered Cases, include=FALSE}
ncov_recovered <- read_csv("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_deaths_global.csv") %>%
pivot_longer(-c(`Province/State`, `Country/Region`, Lat, Long),
names_to = "date", values_to = "count")
write_csv(ncov_recovered, "ncov_recovered.csv")
```
Deaths
```{r Recovered Cases, include=FALSE}
ncov_deaths <- read_csv("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_deaths_global.csv") %>%
pivot_longer(-c(`Province/State`, `Country/Region`, Lat, Long),
names_to = "date", values_to = "count")
write_csv(ncov_deaths, "ncov_deaths.csv")
```