-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path05_misc.Rmd
34 lines (27 loc) · 846 Bytes
/
05_misc.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
## check out oil price data
```{r}
library(Quandl)
oil <- Quandl("OPEC/ORB", type = "xts")
plot(oil["2014-05/"])
plot(d3)
```
## Create tidyForecast-Sticker
```{r}
library(hexSticker)
library(ggplot2)
library(xts)
library(forecast)
diesel_h <- readRDS("data/diesel_h.RDS")
p <- autoplot(diesel_h)
# img <- png::readPNG("presentation/images/table_icon.png")
#p <- ggplot(aes(x = mpg, y = wt), data = mtcars) + geom_point()
p +
# annotation_custom(grid::rasterGrob(img,
# width = unit(1,"npc"),
# height = unit(1,"npc")),
# -Inf, Inf, -Inf, Inf) +
theme_void() +
theme_transparent()
sticker(p, package="tidyForecast", p_size=8, s_x=1, s_y=.75, s_width=1.3, s_height=1,
filename="presentation/images/tidyforecast_sticker.png")
```