-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdraft-storyboard.Rmd
152 lines (106 loc) · 3.32 KB
/
draft-storyboard.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
---
title: "Jule's Storyboard"
output:
flexdashboard::flex_dashboard:
theme: "spacelab"
storyboard: true
---
```{r setup, include=FALSE}
library(tidyverse)
# create www folder
fs::dir_create("www/")
# options for chunks
knitr::opts_chunk$set(
cache = FALSE,
echo = TRUE,
collapse = FALSE,
eval = TRUE,
message = FALSE,
warning = FALSE,
dev = "ragg_png",
out.width = '85%',
fig.path = "www/",
dpi = 320,
fig.align = "center",
fig.width = 7,
fig.height = 5.5,
fig.retina = 2
)
# tibble printing
options(
pillar.print_max = 10,
pillar.print_min = 10)
```
### Background {data-commentary-width=350}
The Monkepox: Daily Confirmed Cases datasets comes from the ['Monkeypox Data Explorer' from ourworldindata](https://ourworldindata.org/monkeypox). You can view these data by clicking on the following link: https://ourworldindata.org/monkeypox
***
The Monkeypox Data Explorer is updated every hour and allows you to explore the data produced by the World Health Organization. Created by Edouard Mathieu, Fiona Spooner, Saloni Dattani, Hannah Ritchie and Max Roser.
### Data {data-commentary-width=400}
```{r,echo=FALSE, message=FALSE, warning=FALSE}
library(vroom)
mp_raw <- vroom::vroom(file = "https://raw.githubusercontent.com/owid/monkeypox/main/owid-monkeypox-data.csv",
delim = ",")
```
Below it is the data set from ourworldindata's github repo:
```{r}
glimpse(mp_raw)
```
***
### New Cases {data-commentary-width=400}
```{r new_cases, echo=FALSE}
ggplot(data = mp_raw,
mapping = aes(x = date, y = new_cases, group=location)) +
geom_line() +
ggplot2::theme_linedraw()+
labs(title = "MonkeyPox Cases" , subtitle = "From ourworldindata",
x="Date", y="New Cases",
caption="source: https://ourworldindata.org/monkeypox" )
```
***
Date versus new cases
```{r new_cases_hide, eval=FALSE}
ggplot(data = mp_raw,
mapping = aes(x = date,
y = new_cases,
group = location)) +
geom_line()
```
### New Cases Smoothed {data-commentary-width=400}
```{r new_cases_smoothed, echo=FALSE}
ggplot(data = mp_raw,
mapping = aes(x = date, y = new_cases_smoothed, group=location)) +
geom_line()+
ggplot2::theme_linedraw()+
labs(title = "MonkeyPox Cases" , subtitle = "From ourworldindata",
x="Date", y="New Cases (Smoothed)",
caption="source: https://ourworldindata.org/monkeypox" )
```
***
Date versus new cases smoothed
```{r new_cases_smoothed_hide, eval=FALSE}
ggplot(data = mp_raw,
mapping = aes(x = date,
y = new_cases_smoothed,
group = location)) +
geom_line()
```
### New Cases per Million {data-commentary-width=400}
```{r new_cases_per_million, echo=FALSE}
ggplot(data = mp_raw,
mapping = aes(x = date, y = new_cases_per_million, group=location)) +
geom_line()+
ggplot2::theme_linedraw()+
labs(title = "MonkeyPox Cases" , subtitle = "From ourworldindata",
x="Date", y="New Cases per Million (smoothed)",
caption="source: https://ourworldindata.org/monkeypox" )
```
***
Date versus new cases per million
```{r new_cases_per_million_hide, eval=FALSE}
ggplot(
data = mp_raw,
mapping = aes(x = date,
y = new_cases_per_million,
group = location)) +
geom_line()
```