R Package Worldcup Fjelstul -

The worldcup package complements these by offering . 9. Conclusion The worldcup R package by Joshua C. Fjelstul is the gold standard for World Cup data in R. Its tidy, relational structure, extensive documentation, and full historical coverage make it invaluable for educators, data journalists, football analysts, and hobbyists. Whether you are plotting scoring trends over 90 years of World Cup history or teaching students how to perform complex data joins, worldcup provides a reliable and ready-to-use foundation.

(if used in academic work): Fjelstul, Joshua C. (2023). worldcup: All World Cup matches, goals, cards, etc. R package version 1.1.0. Would you like a hands-on code example or a visualization built from this package? r package worldcup fjelstul

# Install from CRAN install.packages("worldcup") install.packages("devtools") devtools::install_github("jfjelstul/worldcup") Load the package library(worldcup) 4. Main Datasets The package contains several tibbles. The most important ones are: The worldcup package complements these by offering

: ✅ Teaching tidyverse principles ✅ Historical football research ✅ Building interactive dashboards (e.g., Shiny apps of World Cup stats) ✅ Sports data science projects Fjelstul is the gold standard for World Cup data in R

1. Overview The worldcup package is an R data package that provides a comprehensive, structured, and tidy dataset of all FIFA World Cup matches (men's and women's) from the tournament's inception through 2022 (as of the package's recent versions). Created and maintained by Joshua C. Fjelstul , the package is designed for sports analytics, data visualization, teaching data manipulation (especially with dplyr and ggplot2 ), and historical research on international football.

| Dataset | Description | |---------|-------------| | matches | Core match data (teams, score, stage, date, venue, attendance, referee) | | goals | Every goal scored (time, scorer, assist, own goal, penalty) | | cards | Every yellow/red card (time, player, reason) | | penalty_shootouts | Shootout details (team, player, scored/missed) | | players | Player metadata (name, position, birth date, squad number) | | teams | Team metadata (name, confederation, code) | | tournaments | Tournament-level info (year, host, winner, top scorer) |

Example structure of matches :