Víctor Gauto
  • Tidytuesday
  • Publicaciones
  • Mapas de Argentina
  • Visualizaciones
  1. 2025
  2. Semana 02

Sitio en construcción

  • Inicio
  • 2025
    • Semana 02
    • Semana 03
    • Semana 04
    • Semana 05
    • Semana 06
    • Semana 07
    • Semana 08
    • Semana 09
    • Semana 10
    • Semana 11
    • Semana 12
    • Semana 13
    • Semana 14
    • Semana 15
    • Semana 16
    • Semana 17
    • Semana 18
    • Semana 19
    • Semana 20
    • Semana 21
  • 2024
    • Semana 02
    • Semana 03
    • Semana 04
    • Semana 05
    • Semana 06
    • Semana 07
    • Semana 08
    • Semana 09
    • Semana 10
    • Semana 11
    • Semana 12
    • Semana 13
    • Semana 14
    • Semana 15
    • Semana 16
    • Semana 17
    • Semana 18
    • Semana 19
    • Semana 20
    • Semana 21
    • Semana 22
    • Semana 23
    • Semana 24
    • Semana 25
    • Semana 26
    • Semana 27
    • Semana 28
    • Semana 29
    • Semana 30
    • Semana 31
    • Semana 32
    • Semana 33
    • Semana 34
    • Semana 35
    • Semana 36
    • Semana 37
    • Semana 38
    • Semana 39
    • Semana 40
    • Semana 41
    • Semana 42
    • Semana 43
    • Semana 44
    • Semana 45
    • Semana 46
    • Semana 47
    • Semana 48
    • Semana 49
    • Semana 50
    • Semana 51
    • Semana 52
    • Semana 53
  • 2023
    • Semana 07
    • Semana 12
    • Semana 13
    • Semana 14
    • Semana 15
    • Semana 16
    • Semana 17
    • Semana 18
    • Semana 19
    • Semana 20
    • Semana 21
    • Semana 22
    • Semana 23
    • Semana 24
    • Semana 25
    • Semana 26
    • Semana 27
    • Semana 28
    • Semana 29
    • Semana 30
    • Semana 31
    • Semana 32
    • Semana 33
    • Semana 34
    • Semana 35
    • Semana 36
    • Semana 37
    • Semana 38
    • Semana 39
    • Semana 40
    • Semana 41
    • Semana 42
    • Semana 43
    • Semana 44
    • Semana 45
    • Semana 46
    • Semana 47
    • Semana 48
    • Semana 49
    • Semana 50
    • Semana 51
    • Semana 52

Contenido

  • Paquetes
  • Estilos
  • Epígrafe
  • Datos
  • Procesamiento
  • Figura
  • Editar esta página
  • Informar de un problema
  1. 2025
  2. Semana 02

Semana 02

  • Mostrar todo el código
  • Ocultar todo el código

  • Ver el código fuente
geom_col
geom_text
Autor

Víctor Gauto

Fecha de publicación

14 de enero de 2025

Conferencias asociadas a quarto en posit::conf entre 2023 y 2024.

Semana 02, 2025

Paquetes

Ocultar código
library(glue)
library(ggtext)
library(showtext)
library(tidyverse)

Estilos

Colores

Ocultar código
c1 <- "#447099"
c2 <- "#75AADB"
c3 <- "#F0F5F9"
c4 <- "black"

Fuentes: Ubuntu y JetBrains Mono

Ocultar código
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

Ocultar código
fuente <- glue(
    "Datos: <span style='color:{c1};'><span style='font-family:jet;'>",
    "{{<b>tidytuesdayR</b>}}</span> semana 2, ",
    "<b><span style='font-family:jet'>posit::conf</jet></b>.</span>"
)

autor <- glue("<span style='color:{c1};'>**Víctor Gauto**</span>")
icon_twitter <- glue("<span style='font-family:jet;'>&#xf099;</span>")
icon_instagram <- glue("<span style='font-family:jet;'>&#xf16d;</span>")
icon_github <- glue("<span style='font-family:jet;'>&#xf09b;</span>")
icon_mastodon <- glue("<span style='font-family:jet;'>&#xf0ad1;</span>")
icon_bsky <- glue("<span style='font-family:jet;'>&#xe28e;</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

Ocultar código
tuesdata <- tidytuesdayR::tt_load(2025, 2)
conf2023 <- tuesdata$conf2023
conf2024 <- tuesdata$conf2024

Procesamiento

Me interesa la cantidad de conferencias que hablan de QUARTO entre 2023 y 2024

Ocultar código
n2023 <- conf2023 |>
  mutate(quarto = str_detect(session_abstract, "quarto|Quarto")) |>
  dplyr::filter(quarto) |>
  nrow()

n2024 <- conf2024 |>
  mutate(quarto = str_detect(description, "quarto|Quarto")) |>
  dplyr::filter(quarto) |>
  nrow()

d <- tibble(
  año = c(2023, 2024),
  n = c(n2023, n2024)
) |>
  mutate(
    año = paste0("posit::conf\n", año)
  )

Figura

Logo y subtítulo

Ocultar código
logo <- "https://quarto.org/quarto.png"
logo_img <- glue(
  "<img src='{logo}' width=250 />"
)

mi_subitulo <- glue(
  "La cantidad de conferencias<br>que incluyen
  <span style='font-family:jet; color:{c1}'>quarto</span> <br>
  amentaron en las ediciones<br>
  2023 y 2024 de <span style='font-family:jet; color:{c1}'>posit::conf</span>"
)

Figura

Ocultar código
g <- ggplot(d, aes(año, n, label = n)) +
  geom_col(fill = c1) +
  geom_text(vjust = -.2, family = "jet", size = 9, color = c2) +
  annotate(
    geom = "richtext", x = 2.12, y = 25, label = logo_img, fill = NA,
    vjust = -1.2, label.color = NA
  ) +
  scale_y_continuous(limits = c(0, 25)) +
  coord_cartesian(expand = FALSE, xlim = c(.5, 2.5), clip = "off") +
  labs(caption = mi_caption, subtitle = mi_subitulo) +
  theme_void(base_size = 22, base_family = "ubuntu") +
  theme(
    aspect.ratio = 1,
    plot.margin = margin(25, 5, 5, 5),
    plot.background = element_rect(fill = c3, color = NA),
    plot.subtitle = element_markdown(
      color = c4, size = 30, lineheight = 1.3, margin = margin(b = 30, l = 20)
    ),
    plot.caption = element_markdown(
      color = c2, lineheight = 1.2, margin = margin(b = 5, t = 20)
    ),
    axis.text.x = element_text(margin = margin(t = 5), family = "jet"),
  )

Guardo

Ocultar código
ggsave(
  plot = g,
  filename = "tidytuesday/2025/semana_02.png",
  width = 30,
  height = 40,
  units = "cm"
)
Subir
2025
Semana 03
Ejecutar el código
---
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_col", "geom_text"]
execute:
  eval: false
  echo: true
  warning: false
title: "Semana 02"
date: 2025-01-14
author: Víctor Gauto
---

Conferencias asociadas a quarto en <b>posit::conf</b> entre 2023 y 2024.

![Semana 02, 2025](semana_02.png)

## Paquetes

```{r}
library(glue)
library(ggtext)
library(showtext)
library(tidyverse)
```

## Estilos

Colores

```{r}
c1 <- "#447099"
c2 <- "#75AADB"
c3 <- "#F0F5F9"
c4 <- "black"
```

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 2, ",
    "<b><span style='font-family:jet'>posit::conf</jet></b>.</span>"
)

autor <- glue("<span style='color:{c1};'>**Víctor Gauto**</span>")
icon_twitter <- glue("<span style='font-family:jet;'>&#xf099;</span>")
icon_instagram <- glue("<span style='font-family:jet;'>&#xf16d;</span>")
icon_github <- glue("<span style='font-family:jet;'>&#xf09b;</span>")
icon_mastodon <- glue("<span style='font-family:jet;'>&#xf0ad1;</span>")
icon_bsky <- glue("<span style='font-family:jet;'>&#xe28e;</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, 2)
conf2023 <- tuesdata$conf2023
conf2024 <- tuesdata$conf2024
```

## Procesamiento

Me interesa la cantidad de conferencias que hablan de QUARTO entre 2023 y 2024

```{r}
n2023 <- conf2023 |>
  mutate(quarto = str_detect(session_abstract, "quarto|Quarto")) |>
  dplyr::filter(quarto) |>
  nrow()

n2024 <- conf2024 |>
  mutate(quarto = str_detect(description, "quarto|Quarto")) |>
  dplyr::filter(quarto) |>
  nrow()

d <- tibble(
  año = c(2023, 2024),
  n = c(n2023, n2024)
) |>
  mutate(
    año = paste0("posit::conf\n", año)
  )
```

## Figura

Logo y subtítulo

```{r}
logo <- "https://quarto.org/quarto.png"
logo_img <- glue(
  "<img src='{logo}' width=250 />"
)

mi_subitulo <- glue(
  "La cantidad de conferencias<br>que incluyen
  <span style='font-family:jet; color:{c1}'>quarto</span> <br>
  amentaron en las ediciones<br>
  2023 y 2024 de <span style='font-family:jet; color:{c1}'>posit::conf</span>"
)
```

Figura

```{r}
g <- ggplot(d, aes(año, n, label = n)) +
  geom_col(fill = c1) +
  geom_text(vjust = -.2, family = "jet", size = 9, color = c2) +
  annotate(
    geom = "richtext", x = 2.12, y = 25, label = logo_img, fill = NA,
    vjust = -1.2, label.color = NA
  ) +
  scale_y_continuous(limits = c(0, 25)) +
  coord_cartesian(expand = FALSE, xlim = c(.5, 2.5), clip = "off") +
  labs(caption = mi_caption, subtitle = mi_subitulo) +
  theme_void(base_size = 22, base_family = "ubuntu") +
  theme(
    aspect.ratio = 1,
    plot.margin = margin(25, 5, 5, 5),
    plot.background = element_rect(fill = c3, color = NA),
    plot.subtitle = element_markdown(
      color = c4, size = 30, lineheight = 1.3, margin = margin(b = 30, l = 20)
    ),
    plot.caption = element_markdown(
      color = c2, lineheight = 1.2, margin = margin(b = 5, t = 20)
    ),
    axis.text.x = element_text(margin = margin(t = 5), family = "jet"),
  )
```

Guardo

```{r}
ggsave(
  plot = g,
  filename = "tidytuesday/2025/semana_02.png",
  width = 30,
  height = 40,
  units = "cm"
)
```

Creado con y

Víctor Gauto

  • Editar esta página
  • Informar de un problema