-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcharts.Rmd
60 lines (53 loc) · 1.69 KB
/
charts.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
---
title: "Charts"
output:
distill::distill_article:
toc: true
toc_level: 2
md_extensions: -native_divs
css:
- css/jhelvy.css
- css/small-spacing.css
twitter:
creator: "@JohnHelveston"
base_url: https://www.jhelvy.com
preview: https://github.com/jhelvy/charts/raw/master/climateChangeBarcode/plots/nasa_global_preview.png
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
warning = FALSE,
message = FALSE,
fig.retina = 3,
comment = "#>"
)
library(dplyr)
charts <- gsheet::gsheet2tbl('https://docs.google.com/spreadsheets/d/1Zj1jXqV5XsAXeIkUPzCJkvMrU5ah_y6VHb-san0Baio/edit?usp=sharing') %>%
mutate(
url_repo = paste0(
"https://github.com/jhelvy/charts/tree/master/", name),
url_image = paste0(
"https://raw.githubusercontent.com/jhelvy/charts/master/",
name, "/plots/", image, ".png"),
link = paste0('<li><a href="#', name, '">', name, '</a></li>')
)
```
A bunch of reproducible charts. All data and source code are available on [this repo](https://github.com/jhelvy/charts).
All charts are licensed under a
[Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/)
:::float-left
<img src="https://mirrors.creativecommons.org/presskit/buttons/88x31/png/by-sa.png" width="100px">
:::
```{r, echo=FALSE, results='asis'}
# Download description.Rmd as temp file
td <- tempdir()
tf <- tempfile(tmpdir = td, fileext = ".Rmd")
download.file(
'https://raw.githubusercontent.com/jhelvy/charts/master/description.Rmd',
tf
)
for (i in 1:nrow(charts)) {
chart <- charts[i,]
cat(knitr::knit_child(tf,quiet = TRUE), sep = '\n')
}
```