-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.qmd
47 lines (35 loc) · 854 Bytes
/
index.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
title: "Quarto testing - First slides"
subtitle: "Dataviz of gapminder"
author: "Brad McKenzie"
format: revealjs
editor: visual
---
## Loading data
We load the dataset 'gapminder' included in the R package `{gapminder}`
```{r}
library(gapminder)
gapminder <- gapminder
gapminder
```
## Now we finish this slide
## Preprocess data
Checking the data load
```{r select data, echo=TRUE}
library(dplyr)
gapminder_2007 <- gapminder |>
filter(year == 2007)
```
------------------------------------------------------------------------
## Plot the data
```{r}
#| echo: true
#| code-fold: true
library(ggplot2)
ggplot(gapminder_2007) +
geom_point(aes(x=lifeExp, y= gdpPercap,
color = continent)) +
ggthemes::scale_color_colorblind() +
theme_minimal()
```
Use code fold and echo combined to have the code drop down option.