-
Notifications
You must be signed in to change notification settings - Fork 683
/
preface-3e.qmd
98 lines (79 loc) · 4.53 KB
/
preface-3e.qmd
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
# Preface to the third edition {#sec-preface-3e .unnumbered}
Welcome to the third edition of "ggplot2: elegant graphics for data analysis".
I'm so excited to have a new edition of the book updated for all the changes that have happened to ggplot2 in the last five years.
I'm also excited to finally have an online version of the book, [\<https://ggplot2-book.org/\>](https://ggplot2-book.org/){.uri}, thanks to a renegotiated contract with Springer.
Since the last version of the book, the major change to ggplot2 itself is the growth in the contributor community.
While I still lead the project and continue to care deeply about visualisation, I'm no longer involved in the day-to-day development of the package.
At the time of writing, the core developers of ggplot2 are:
- [Winston Chang](https://github.com/wch)
- [Lionel Henry](https://github.com/lionel-)
- [Thomas Lin Pedersen](https://github.com/thomasp85)
- [Kohske Takahashi](https://github.com/kohske)
- [Claus Wilke](https://github.com/clauswilke)
- [Kara Woo](https://github.com/karawoo)
- [Hiroaki Yutani](https://github.com/yutannihilation)
- [Dewey Dunnington](https://github.com/paleolimbot)
You can see an up-to-date list and how to become a core developer in the [ggplot2 governance document](https://github.com/tidyverse/ggplot2/blob/master/GOVERNANCE.md).
## Major changes {.unnumbered}
- The *Data Analysis*, *Data Transformation*, and *Modelling for Visualisation* chapters have been removed so that the book can focus on visualisation.
If you're looking for general advice on doing data science in R, we recommend [R for Data Science (2e)](https://r4ds.hadley.nz).
- The *Toolbox* chapter has been expanded into six chapters that cover practical applications of layers.
This includes more material on maps and annotations, and a new chapter that discusses how to arrange multiple plots on one page.
- Similarly, the old *Scales, Axes, and Legends* chapter has been split into into four chapters.
The first three cover the practical combination of scales and guides for the most common scale types, and the final chapter focusses on the underlying theory.
- The old *Positioning* chapter has been split into new *Coordinate Systems* and *Faceting* chapters, giving more room for details on these important topics.
- New chapters describe more about the internals of ggplot2, and how you can extend it in your own package.
## Acknowledgements {.unnumbered}
This edition of the book was made possible by two new co-authors: Danielle Navarro and Thomas Lin Pedersen.
Danielle contributed most of the new material in the layers and scales chapters, and Thomas contributed new chapters on arranging plots (using his patchwork package), and on how to extend ggplot2.
This book was written in the open and chapters were advertised on twitter when complete.
It is truly a community effort: many people read drafts, fixed typos, suggested improvements, and contributed content.
Without those contributors, the book wouldn't be nearly as good as it is, and I'm deeply grateful for their help.
```{r}
#| eval: false
#| echo: false
library(tidyverse)
contribs_all_json <- gh::gh("/repos/:owner/:repo/contributors",
owner = "hadley",
repo = "ggplot2-book",
.limit = Inf
)
contribs_all <- tibble(
login = contribs_all_json %>% map_chr("login"),
n = contribs_all_json %>% map_int("contributions")
)
contribs_old <- read_csv("contributors.csv", col_types = list())
contribs_new <- contribs_all %>% anti_join(contribs_old, by = "login")
# Get info for new contributors
needed_json <- map(
contribs_new$login,
~ gh::gh("/users/:username", username = .x)
)
info_new <- tibble(
login = contribs_new$login,
name = map_chr(needed_json, "name", .default = NA),
blog = map_chr(needed_json, "blog", .default = NA)
)
info_old <- contribs_old %>% select(login, name, blog)
info_all <- bind_rows(info_old, info_new)
contribs_all <- contribs_all %>%
left_join(info_all, by = "login") %>%
arrange(login)
write_csv(contribs_all, "contributors.csv")
```
```{r}
#| results: asis
#| echo: false
#| message: false
library(dplyr)
contributors <- read.csv("contributors.csv", stringsAsFactors = FALSE)
contributors <- contributors %>%
filter(login != "hadley") %>%
mutate(
login = paste0("\\@", login),
desc = ifelse(is.na(name), login, paste0(name, " (", login, ")"))
)
cat("A big thank you to all ", nrow(contributors), " people who contributed specific improvements via GitHub pull requests (in alphabetical order by username): ", sep = "")
cat(paste0(contributors$desc, collapse = ", "))
cat(".\n")
```