Overview

This report visualizes the number of FIFA Men’s World Cup wins by country, based on tournament data from 1930 to 2022. West Germany and Germany are combined as the same football federation.

library(tidyverse)

tournaments <- read_csv("~/Desktop/tournaments.csv")
country_colors_men <- c(
  "Brazil"    = "#FFDF00",   # Brazil yellow
  "Italy"     = "#009246",
  "Germany"   = "#000000",
  "Argentina" = "#74ACDF",   # medium blue
  "France"    = "#002395",   # very dark navy
  "Uruguay"   = "#C6E2F5",   # very light blue
  "England"   = "#CF142B",
  "Spain"     = "#AA151B"
)

tournaments |>
  filter(!str_detect(tournament_name, "Women")) |>
  mutate(winner = if_else(winner == "West Germany", "Germany", winner)) |>
  count(winner, name = "wins") |>
  ggplot(aes(x = reorder(winner, -wins), y = wins, fill = winner)) +
  geom_col() +
  geom_text(aes(label = wins), vjust = -0.5, fontface = "bold", size = 5) +
  scale_fill_manual(values = country_colors_men) +
  labs(
    title = "Male FIFA World Cup Wins",
    x = NULL,
    y = "Number of Wins"
  ) +
  theme(
    legend.position = "none",
    axis.text.x = element_text(angle = 45, hjust = 1)
  ) +
  ylim(0, 6)