Week 3

Robert W. Walker

Overview

  1. AMA
  2. Quarto Things
  3. Essential Differences between Quarto and RMarkdown
  4. Adding to a Portfolio with Quarto, Distil, or Blogdown

The Assignment for this week

Create a minimal portfolio. Three ways. Let’s talk about them.

usethis

Setting this up makes interacting with Git far easier from RStudio.

Snippets

Check out my snippet

  • Activate them with [Shift]+[Tab]
  • I learned they require arguments
  • RStudio Forums

Snippet-tool

AMA

  1. #tidyTuesday as a source of data and an awesome collection of neat visualizations
  2. Resources: stackoverflow and Posit Community

An Example

Note: requires hrbrthemes

Code
mtcars %>%
    ggplot() + aes(x = disp, y = mpg, color = cyl) + geom_point()

The Structure of an RMarkdown/Quarto document

  1. The top stuff in between three dashes is YAML [YAML is not a Markup Language]
  2. The markdown syntax
  3. Code chunks and options within them [the indicated methods differ a little between RMarkdown and Quarto but the old/RMarkdown method works]

They are nearly identical but quarto has some amazing features.

On a Portfolio

Preliminary questions:

  1. Where do you want to host it? Do you need a fancy domain name?
    • The github main page trick [this is not well documented that I can find]
  2. Setting up rendering?
  3. Templates
    • Also, quarto websites and blogs.

Quarto things

Essential Differences

  1. Quarto is probably more reliable long-term.
  2. There are remarkably few differences and most are in YAML
  3. Quarto YAML is literate.
  4. Quarto code chunk options follow a new format.

Some of the most important for your portfolio

Code folding:

Fold

Default Theming

NEVER USE DEFAULT THEMES

  1. They’re ugly.
  2. It makes people wonder if you understand theming.

A blog post

theme_set(theme_minimal())

Let’s explore those in turn

The pdxrug talk

Though it is about presentations, all kinds of things can be done.

pdxrug

on tidyTuesday

For next week’s assignment, browse the tidyTuesday archives, find a visualization, and try a modification of it in a post. Or some other post of interest. So that we know how to extend it. We are going to add to it from here.

Adding to the Portfolio

Once the workflow is correct, it should be straightforward. I typically just copy a post, delete all the stuff, and use that as a template.