-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
54 lines (40 loc) · 1.32 KB
/
README.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
title: "CoV19"
author: Eli Holmes
output: github_document
---
This is a package for exploring some of the CoV-19 data. The world data is downloaded from JHU. The US data is downloaded from JHU and CovidTracking. The Italy data is downloaded from the Italian CDC (Protezione Civile)
Sources:
* https://github.com/CSSEGISandData/COVID-19
* https://covidtracking.com/api/
* https://github.com/pcm-dpc/COVID-19
To install the package
```
library(devtools)
install_github("eeholmes/CoV19")
```
To get the data, type any of these on command line. After loading.
```
states
italy
world
```
Use `head()` to look at it. Should be pretty self-evident what it is.
# Functions
* `regions()` will show you the regions in each data set.
* `plot2()` a basic plot of total, hospitalized, and deaths. First argument is a data object (states, italy, world or subset of these) and second argument is a region (can be partial). Use ?plot2 to read the help page.
# Plots
```{r, message=FALSE, warning=FALSE}
library(CoV19)
plot2(italy, "Lomb", decorate=TRUE)
```
```{r, message=FALSE, warning=FALSE}
plot2(states, c("WA","CA"))
```
```{r, message=FALSE, warning=FALSE}
plot2(states, c("NY","NJ","PA","MA"))
```
Something is odd with the Hubei data in the JHU data set.
```{r, message=FALSE, warning=FALSE}
plot2(world, "Hubei China", decorate=TRUE)
```