Ocultar código
library(glue)
library(ggtext)
library(showtext)
library(tidyverse)
Sitio en construcción
Víctor Gauto
6 de octubre de 2025
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXX DESCRIPCIÓN DE LA FIGURA XXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Colores.
Fuentes: Ubuntu y JetBrains Mono.
fuente <- glue(
"Datos: <span style='color:{c1};'><span style='font-family:jet;'>",
"{{<b>tidytuesdayR</b>}}</span> semana 39, ",
"<b>---FUENTE---</b>.</span>"
)
autor <- glue("<span style='color:{c1};'>**Víctor Gauto**</span>")
icon_twitter <- glue("<span style='font-family:jet;'></span>")
icon_instagram <- glue("<span style='font-family:jet;'></span>")
icon_github <- glue("<span style='font-family:jet;'></span>")
icon_mastodon <- glue("<span style='font-family:jet;'>󰫑</span>")
icon_bsky <- glue("<span style='font-family:jet;'></span>")
usuario <- glue("<span style='color:{c1};'>**vhgauto**</span>")
sep <- glue("**|**")
mi_caption <- glue(
"{fuente}<br>{autor} {sep} {icon_github} {icon_twitter} {icon_instagram} ",
"{icon_mastodon} {icon_bsky} {usuario}"
)
Me interesa…
# ggplot(cranes, aes(date, observations, color = weather_disruption)) +
# geom_point()
cranes |>
mutate(año = year(date)) |>
reframe(
m = mean(observations, na.rm = TRUE),
s = sd(observations, na.rm = TRUE),
.by = año
) |>
ggplot(aes(año, m)) +
geom_point() +
geom_errorbar(aes(ymin = m - s, ymax = m + s))
Figura.
Guardo.
---
format:
html:
code-fold: show
code-summary: "Ocultar código"
code-line-numbers: false
code-annotations: false
code-link: true
code-tools:
source: true
toggle: true
caption: "Código"
code-overflow: scroll
page-layout: full
editor_options:
chunk_output_type: console
categories:
- GEOM_AAA
- GEOM_BBB
- GEOM_CCC
execute:
eval: false
echo: true
warning: false
title: "Semana 39"
date: last-modified
author: Víctor Gauto
---
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXX DESCRIPCIÓN DE LA FIGURA XXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
::: {.column-page-right}

:::
## Paquetes
```{r}
library(glue)
library(ggtext)
library(showtext)
library(tidyverse)
```
## Estilos
Colores.
```{r}
c1 <- "#000000"
c2 <- "#000000"
c3 <- "#000000"
```
Fuentes: Ubuntu y JetBrains Mono.
```{r}
font_add(
family = "ubuntu",
regular = "././fuente/Ubuntu-Regular.ttf",
bold = "././fuente/Ubuntu-Bold.ttf",
italic = "././fuente/Ubuntu-Italic.ttf"
)
font_add(
family = "jet",
regular = "././fuente/JetBrainsMonoNLNerdFontMono-Regular.ttf"
)
showtext_auto()
showtext_opts(dpi = 300)
```
## Epígrafe
```{r}
fuente <- glue(
"Datos: <span style='color:{c1};'><span style='font-family:jet;'>",
"{{<b>tidytuesdayR</b>}}</span> semana 39, ",
"<b>---FUENTE---</b>.</span>"
)
autor <- glue("<span style='color:{c1};'>**Víctor Gauto**</span>")
icon_twitter <- glue("<span style='font-family:jet;'></span>")
icon_instagram <- glue("<span style='font-family:jet;'></span>")
icon_github <- glue("<span style='font-family:jet;'></span>")
icon_mastodon <- glue("<span style='font-family:jet;'>󰫑</span>")
icon_bsky <- glue("<span style='font-family:jet;'></span>")
usuario <- glue("<span style='color:{c1};'>**vhgauto**</span>")
sep <- glue("**|**")
mi_caption <- glue(
"{fuente}<br>{autor} {sep} {icon_github} {icon_twitter} {icon_instagram} ",
"{icon_mastodon} {icon_bsky} {usuario}"
)
```
## Datos
```{r}
tuesdata <- tidytuesdayR::tt_load(2025, 39)
cranes <- tuesdata$cranes
```
## Procesamiento
Me interesa...
```{r}
# ggplot(cranes, aes(date, observations, color = weather_disruption)) +
# geom_point()
cranes |>
mutate(año = year(date)) |>
reframe(
m = mean(observations, na.rm = TRUE),
s = sd(observations, na.rm = TRUE),
.by = año
) |>
ggplot(aes(año, m)) +
geom_point() +
geom_errorbar(aes(ymin = m - s, ymax = m + s))
```
## Figura
Figura.
```{r}
g <- ggplot()
```
Guardo.
```{r}
ggsave(
plot = g,
filename = "tidytuesday/2025/semana_39.png",
width = 30,
height = 30,
units = "cm"
)
browseURL(paste0(getwd(), "/tidytuesday/2025/semana_39.png"))
```