A collection of stuff I use all the time and find super useful.
(plotting with ggplot2, but also general resources that are independnet of software)
Lisa Charlotte Muth at Datawrapper writes short and really clear articles rich with examples on datavis dos and don’ts, that are general across any graphical tool or programming language. Here is the whole list, but many of them are specifically linked below under the appropriate topics.
Datawrapper | What to think about when creating charts
Datawrapper | Which fonts to use for your charts and tables. Amazing introduction, talks about all the parameters that go into a font.
Pimp my type | https://pimpmytype.com/free-quality-fonts/
showtext
| Favorite package for fonts in ggplot2 (and rmarkdown-based stuff), you can use any font from Google Fonts
Setting up and debugging custom fonts | ragg
, systemfonts
, etc., a possible alternative to showtext
.
Datawrapper | What to consider when choosing colors for data visualization
Specific color related topics from Datawrapper:
- Diverging vs. sequential color scales
- Colorblindness
- Classed vs. unclassed color scales
- Quantitative vs. qualitative color scales
- Which color scale to use in datavis
- 10 ways to use fewer colors in your data visualization
- Colors for gender data
Color palettes:
- colorspace: ggplot2 color scales: A very organized R package that lets you set up custom color palettes but also has some built in. Very helpful for continuous color palettes. Contains the
darken()
/lighten()
functions. - Canva color palettes: These consist of 4 colors each.
- Paul Tol's palettes: Good for color blindness, screeen/paper, etc.
- ColorBrewer: Generate a few different types of simple discrete palettes based on number of categories, sequential/diverging/qualitative, etc.
Datawrapper | What to consider when creating tables
gtExtras
| Package that expands on the gt
package for creating tables
Advanced R topics: gt tables Super nice presentation on gt
by Ariel Muldoon. The slides are made in Xaringan and also shows off that really well! Part two of the presentation is here (colors, themes, etc.)
kableExtra| Tables for pdfs, useful for academic articles.
patchwork
| Combining multiple ggplot objects
ggpubr
| Publication ready plots in ggplot2
. In particular, I often use this package for adding brackets (geom_bracket()
) or theme_transparent()
for adding a transparent background (useful for presentations).
showtext
| Changing fonts in ggplot2
plots (or anything based on Rmarkdown)
How to Create Engaging and Complex Visualizations in R| Really great ggplot2
workshop by Cédric Scherer, covers many technical aspects of ggplot2
.
ggplot2
cheatsheetdplyr
cheatsheet- Themes in
ggplot2
cheatsheet (Emma's version) - Themes in
ggplot2
cheatsheet (Clara Granell's version) - Package development cheatsheet
My favorite way to make presentations is the Rmarkdown extension https://bookdown.org/yihui/rmarkdown/xaringan.html.
Some xaringan resources:
- Extra functionality: https://github.com/gadenbuie/xaringanExtra
- Themes: https://pkg.garrickadenbuie.com/xaringanthemer/articles/xaringanthemer.html
- How to include references and citations: https://github.com/yihui/xaringan/wiki/Bibliography-and-citations (you will need to look at the documentation for RefManageR as well, most helpful is the help page
?RefManageR::BibOptions
. (This may be helpful too: yihui/xaringan#26 (comment))
- Package development cheatsheet
- Publishing and promoting R-packages, presentation by Heather Turner
- Using
ggplot2
in R packages- Paleolimbot:
electionca
| A really nice example package that shows how to useggplot2
in a package.
- Paleolimbot:
- Prepare for CRAN
- Publishing a Quarto website with GitHub Pages
- Shamindra Shrotriya: Upgrading Distill Blog Settings | Disqus comments, Google analytics and more
- Note that Google Analytics for Quarto is described here: https://quarto.org/docs/websites/website-tools.html#google-analytics
- Thomas Mock: Including and meta tagging extra content in a distill blog | Search engine optimization, etc.
- GitHub actions | For instance, how to trigger (or not trigger) workflows.
- regex101.com | Testing regular expressions
- R Programming for Data Science: Regular expressions | Useful introduction to working with regular expressions in
R
. Also has videos!
- Cara Thompson: Building stories with data (lots of useful stuff in the "Talks" tab as well!)
- Ariel Muldoon: Advanced R topics | I keep ending up in her slides from googling, and I always learn something and end up exploring more than I came from. Topics I have looked at: Distill website, tables with
gt
.