If you use this data for analysis or publication, remember to cite the package author and the source data (FIFA/Jason Fjelstul). Happy analyzing
is not just a package maintainer; he is a political scientist and legal scholar who applies computational rigor to institutional data. His worldcup package is a model of academic data transparency—clean, documented, and free. It is part of a larger ecosystem of sports data packages he contributes to, all built on the philosophy that data should be a public good . worldcup r package jfjelstul
# 1. Filter for matches involving the host nation # We join matches with the 'teams' data to identify hosts host_performance <- matches %>% # Join to get the winner left_join(teams, by = c("home_team_id" = "team_id")) %>% # Calculate Goal Difference per match mutate(gd = home_score - away_score) %>% # Filter for games where the home team was the host filter(host == TRUE) %>% # Summarize total GD per tournament group_by(year, team_name = home_team) %>% summarize(total_gd = sum(gd), .groups = "drop") If you use this data for analysis or