Dungeons & Dragons

Return to Data Art Gallery.

R
Code
# Packages
library(tidyverse)
library(ggforce)

# Data
monsters <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/main/data/2025/2025-05-27/monsters.csv')

# Parameters
bins <- 20
min_size <- 0.3
main_col <- "#7B1E1E"
bg_col <- "#582A72"

# Data wrangling
plot_data <- monsters |> 
  select(hp_number, speed_base_number) |> 
  mutate(
    hp_bin = ntile(hp_number, bins),
    speed_bin = ntile(speed_base_number, bins)
  ) |> 
  count(hp_bin, speed_bin) |> 
  mutate(r = 
           min_size + (n - min(n, na.rm = TRUE)) / 
           (max(n, na.rm = TRUE) - min(n, na.rm = TRUE)) * (1 - min_size)
  )

# Plot
ggplot() +
  geom_circle(
    data = plot_data,
    mapping = aes(x0 = hp_bin, y0 = speed_bin, r = r/2),
    fill = main_col,
    colour = "transparent"
  ) +
  coord_fixed() +
  theme_void() +
  theme(plot.background = element_rect(fill = bg_col, colour = bg_col))

Dungeons & Dragons is a tabletop role-playing game where players create characters and collaboratively tell a story guided by a Dungeon Master. The game combines imagination, strategy, and dice-based mechanics to navigate adventures in a fantasy world.

In Dungeons & Dragons, a monster’s HP (hit points) represents how much damage it can take before being defeated. Its speed indicates how far it can move on its turn. This abstract piece shows the relationship between the HP (x-axis) and speed (y-axis) of monsters, with several different clusters shown.

Return to Data Art Gallery.