This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ex_bold <- ggplot(mtcars, aes(disp, mpg)) + | |
geom_point() + | |
labs( | |
title = "<b>Fuel economy</b> vs. <i>engine displacement</i><br> | |
<span style = 'font-size:10pt'>Lorem ipsum *dolor sit amet,* | |
consectetur adipiscing elit, **sed do eiusmod tempor incididunt** ut | |
labore et dolore magna aliqua. <span style = 'color:red;'>Ut enim | |
ad minim veniam,</span> quis nostrud exercitation ullamco laboris nisi | |
ut aliquip ex ea commodo consequat.</span>", | |
x = "displacement (in<sup>3</sup>)", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(rtweet) | |
library(ggplot2) | |
# create a plot, with alt-text labeling | |
ex_plot <- ggplot(mpg, aes(x = displ, y = hwy)) + | |
geom_point() + | |
labs(alt = glue::glue( | |
"A scattergraph of engine displacement in litres ({range(mpg$displ) |> paste0(collapse = ' to ')}) on the x-axis and highway fuel efficiency in mpg ({range(mpg$hwy) |> paste0(collapse = ' to ')}) on the y-axis. There is a negative, linear trend, where as engine displacement increases, fuel efficiency decreases." | |
) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### --------------------------------------------- | |
## Edit via: RStudio > Tools > Edit Code Snippets | |
# Released under a MIT license | |
snippet fragment | |
[${1:text}]{.${2:type}} | |
snippet aside | |
[${1:text}]{.aside} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Presentation" | |
format: | |
revealjs: | |
theme: [default, custom.scss] | |
--- | |
## Slide 1 | |
- List |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Intro to Grammar of Graphics" | |
subtitle: "seaborn vs plotnine" | |
author: "Credit to @ChelseaParlett" | |
jupyter: venv-prez-kernel | |
format: | |
revealjs: | |
height: 1400 | |
width: 1920 | |
execute: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From terminal | |
quarto render boston-terrier.ipynb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
format: revealjs | |
engine: knitr | |
--- | |
## Cards, on a page | |
```{css, echo=FALSE} | |
.card { | |
/* Add shadows to create the "card" effect */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(jsonlite) | |
library(rvest) | |
raw_json <- fromJSON("https://raw.githubusercontent.com/rstudio/rstudio-conf-2022-program/main/program.json", simplifyVector = FALSE) | |
raw_df <- raw_json |> | |
enframe() |> | |
unnest_wider(value) |> | |
hoist(talk, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` r | |
x <- c( | |
"task_0_files", "task_1_files", "task_11_files", | |
"task_14_files", "task_5_files" | |
) | |
stringr::str_sort(x, numeric = TRUE) |> | |
tibble::enframe() | |
#> # A tibble: 5 × 2 | |
#> name value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
format: | |
html: | |
theme: | |
- litera | |
execute: | |
echo: false | |
--- | |
# Apache Arrow R questions on Stack Overfklow |