Customizing fonts in R with an installed font and directly from google fonts (CC140)
Channel: Riffomonas Project
Date: 2021-08-26

Sick of looking at the arial font in your ggplot2 R plots? In this episode of Code Club, Pat will show how to use the showtext R package to load other fonts that are installed on your computer and how to load a font directly from google fonts into R. He'll also discuss how to match and find a font that you see on websites. Here, Pat continues to morph a figure he made that was originally creaed by Ipsos to a more stylized one published by chartr using the ggplot2 R package. The data depict the percentage of people in 15 countries who would be willing to receive the COVID-19 vaccine as of August and October of 2020.

Pat uses functions from the tidyverse including functions from the #ggplot2, #showtext, dplyr, ggtext and glue packages in #RStudio. The accompanying blog post can be found at https://www.riffomonas.org/code_club/2021-08-26-fonts.

R: https://r-project.org
RStudio: https://rstudio.com
Raw data: https://github.com/riffomonas/raw_data/releases/latest
Workshops: https://www.mothur.org/wiki/workshops

Here's a link for the chartr newsletter: https://www.chartr.co
You can sign up for my newsletter at https://shop.riffomonas.org/youtube

If you're interested in taking an upcoming 3 day R workshop be sure to check out our schedule at https://riffomonas.org/workshops/


You can also find complete tutorials for learning R with the tidyverse using...
Microbial ecology data: https://www.riffomonas.org/minimalR/
General data: https://www.riffomonas.org/generalR/

0:00 Introduction
1:46 R's built in font families
3:49 Installing and loading the showtext package
4:40 Loading fonts already installed on my computer
8:59 Finding, installing, and loading fonts from google fonts
13:09 Finding fonts in a web page's CSS
15:40 Loading fonts directly from google fonts
19:05 Recap