Creating Slide Presentations using Quarto
A Quick Introduction

Norberto E. Milla, Jr.

Prerequisites

The following applications must already be installed in your machines.

  1. R

  2. RStudio

  3. Quarto

Panel tabs

  • a multi-language, next generation version of R Markdown from Posit

  • includes dozens of new features and capabilities

  • can be used to create documents (HTML, pdf, Word), presentations (revealjs, beamer), Interactive HTML (shiny)

  • can be used to create websites, blogs, books

Use the Render button in the RStudio IDe to render the file and preview the output

Or if you prefer to automatically render everytime you save the file, you can check the Render on Save button

Columns

The Code

library(readxl)
library(tidyverse)

job <- read_excel("job posting.xlsx")

job |> 
  ggplot(aes(x = fct_reorder(Country, Stat),
             y = Stat,
             fill = Country)) +
  geom_col() +
  geom_text(vjust = 0.5,
            hjust = 1.2,
            size = 4,
            label = job$Stat) +
  labs(x = "Country",
       y = " ") +
  coord_flip() + 
  theme_classic() +
  theme(legend.position = "none")

The Output

Data Visualization

code
library(plotly)

p <- iris |> 
  select(Sepal.Length, Petal.Length, Species) |> 
  ggplot(aes(x = Sepal.Length, 
             y = Petal.Length)) +
  geom_point(aes(color=Species)) +
  labs(x="Sepal Length",
       y="Petal Length") +
  theme_classic()

ggplotly(p)
code
library(gapminder)
library(gganimate)

ggplot(gapminder, aes(x = gdpPercap, 
                      y = lifeExp, 
                      size = pop, 
                      colour = country)) +
  geom_point(alpha = 0.7, 
             show.legend = FALSE) +
  scale_colour_manual(values = country_colors) +
  scale_size(range = c(2, 12)) +
  scale_x_log10() +
  facet_wrap(~continent) +
  labs(title = 'Year: {frame_time}', 
       x = '', 
       y = 'Life expectancy') +
  ggtitle("GDP per capita of Countries: 1952-2007") +
  transition_time(year) +
  ease_aes('linear')

Highlighting lines in a code chunk

p <- iris |> 
  select(Sepal.Length, Petal.Length, Species) |> 
  ggplot(aes(x = Sepal.Length, 
             y = Petal.Length)) +
  geom_point(aes(color=Species)) +
  labs(x="Sepal Length",
       y="Petal Length") +
  theme_classic()

ggplotly(p)