generated from posit-conf-2023/workshop-template
-
Notifications
You must be signed in to change notification settings - Fork 26
/
prework.qmd
72 lines (43 loc) · 4.59 KB
/
prework.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
---
title: "Prework"
---
As this workshop focuses on (more) advanced topics, a solid understanding of the fundamentals of ggplot2 and also data preparation in R is helpful. The concepts of how to initialize a ggplot, map variables to aesthetics, and how aesthetics relate to scales should be familiar to you. If you want to refresh your knowledge, I suggest going through the first two chapters of the ggplot2 book by Hadley Wickham et al. (<a href="https://ggplot2-book.org/introduction" target="_blank">introduction</a> and <a href="https://ggplot2-book.org/getting-started" target="_blank">getting started</a>). The “R for Data Science” book also offers a good <a href="https://r4ds.hadley.nz/data-visualize" target="_blank">overview of ggplot2</a> as well as <a href="https://r4ds.hadley.nz/data-transform" target="_blank">on data wrangling with the tidyverse</a>.
You will need to bring your own laptop to the workshop with a recent version of R (4.3.1 or newer) and RStudio (2023.06.1 or newer) as well as a bunch of R packages and a few typefaces installed.
## Technical Requirements
### Install R and Rstudio
Download the most recent version of <a href="https://cloud.r-project.org>cloud.r-project.org" target="_blank">R</a> (at least version 4.2) and <a href="https://rstudio.com/products/rstudio/download" target="_blank">Rstudio</a> (at least version 2023.06.1) and follow the installation steps.
### Install R Libraries
You can install all required R packages at once by running the following code in the R command line:
```
pkgs <- c("ggplot2", "dplyr", "tibble", "tidyr", "readr", "forcats",
"stringr", "lubridate", "purrr", "here", "scales", "ragg",
"systemfonts", "rcartocolor", "scico", "prismatic", "patchwork",
"ggtext", "ggforce", "ggrepel", "colorspace", "gapminder", "remotes")
install.packages(setdiff(pkgs, rownames(installed.packages())))
remotes::install_github("clauswilke/colorblindr")
```
To run the code, open up Rstudio. Copy–paste the code in the console pane (by default in the lower left) and hit enter. Several messages should pop up. Scan these messages that are returned for errors and troubleshoot them if necessary. Warnings and other informational messages can be ignored.
A few packages are not strictly needed but are used in some of the course material. If you wish to install all packages, run the following code as well:
```
pkgs_opt <- c("camcorder", "viridis", "RColorBrewer", "MetBrewer",
"ggthemes", "ggsci", "hrbrthemes", "tvthemes",
"ggannotate", "concavemen")
install.packages(setdiff(pkgs_opt, rownames(installed.packages())))
remotes::install_github("AllanCameron/geomtextpath")
```
If, for some reason, you cannot install these packages or the latest versions of R and RStudio, we will have a Posit Cloud workspace set up that can be used instead. But you will still need to bring your laptop.
### Install Typefaces
We will make use of custom fonts during the course. If you want to follow all contents locally, make sure the following typefaces are installed:
* Asap: <a href='https://fonts.google.com/specimen/Asap' target="_blank">fonts.google.com/specimen/Asap</a>
* Spline Sans: <a href='https://fonts.google.com/specimen/Spline+Sans' target="_blank">fonts.google.com/specimen/Spline+Sans</a>
* Spline Sans Mono: <a href='https://fonts.google.com/specimen/Spline+Sans+Mono' target="_blank">fonts.google.com/specimen/Spline+Sans+Mono</a>
* Hepta Slab: <a href='https://fonts.google.com/specimen/Hepta+Slab' target="_blank">fonts.google.com/specimen/Hepta+Slab</a>
You can download all typefaces as a single zip file <a href='https://cedricscherer.com/files/positconf-dataviz-ggplot2-fonts.zip' target="_blank">here</a>.
### For Mac OS Users
If you want to save your visualization to PDF, please make sure that [XQuartz](https://xquartz.org) is installed which is needed to use the cairo pdf device.
## Course Communication
We will be using Discord as our main communication method during the workshop. To make the process go smoothly:
* Please sign up for an account at <a href='https://discord.com' target="_blank">discord.com</a> if you don’t already have one.
* Make sure your <a href='https://support.discord.com/hc/en-us/articles/12620128861463-New-Usernames-Display-Names#h_01GXPQABMYGEHGPRJJXJMPHF5C' target="_blank">display name</a> is the one you used to register for the conference.
* In your “About Me”, put the name of your workshop(s).
Closer to the start of the conference, you will be invited to join the posit::conf Discord server. Once you’ve accepted the invite, we will add you to the channel for the workshop.