Introduction to Quarto

Slides

 Open slides in new window  Download PDF of slides

Exercises

Welcome

Introduce yourself:

  • Name
  • Professional affiliation
  • On a scale of 1–10, how well do you know…
    • Quarto?
    • R?
    • Python?
    • HTML and CSS?
  • What do you hope to get out of this course?

Introduction to Quarto

  • Open 01-exercise.qmd
  • Preview/render the document
    • If you’re using Posit Cloud, you might be asked to allow pop-ups
  • Edit the title and preview the document again.

Quarto documents

  • Open 01-exercise.qmd and run some of the code chunks (in order!).
  • Add #| include: false to the second chunk and preview again. Switch it back to true or remove it. Preview again.
  • In the YAML area, add an author field and add your name. Preview again.
  • Change code-fold to be true. Preview again.
  • Edit the first paragraph to:
    1. Make something bold
    2. Make “the Gapminder foundation” link to https://www.gapminder.org
    3. Replace XXXX and YYYY with inline code instead of hardcoded values. The first code chunk creates R objects named first_year and last_year—use those.

Authoring Quarto

  • Add an important callout box to the introduction summarizing the report’s findings. Preview the file.
  • Change the caption for the first plot. Preview again.
  • Change some text color to #ec008b. Preview again.
  • Edit the “Average life expectancy increased…” paragraph to say “According to Figure 1, average life expectancy increased…”, BUT do it without typing “Figure 1”. Preview again.
  • In the first paragraph, add a citation to something in bib/references.bib. Preview again.
  • Change the bibliography style to APA. Preview again.