Jfjelstul Worldcup Data-csv Appearances.csv |top| [ DIRECT ✦ ]
@miscfjelstul2023worldcup, author = Joshua C. Fjelstul, title = The World Cup Database, year = 2023, publisher = GitHub, url = https://github.com/jfjelstul/worldcup
# Filter only starters (not substitutes) starters = appearances[appearances["substitute"] == False] starters["total_cards"] = starters["yellow_cards"] + starters["red_cards"] cards_by_player = starters.groupby(["player_id", "position_name"])["total_cards"].sum().reset_index() Merge player names players = pd.read_csv("players.csv") disciplinary = cards_by_player.merge(players[["player_id", "family_name", "given_name"]], on="player_id") Pick top card-takers per position disciplinary.sort_values(["position_name", "total_cards"], ascending=False).groupby("position_name").head(2) 8. Citation & Acknowledgments If you use this data in research or a publication: Fjelstul, J. (2023). The World Cup Database. GitHub. https://github.com/jfjelstul/worldcup BibTeX: jfjelstul worldcup data-csv appearances.csv
1. Overview The appearances.csv file records every single player appearance in a FIFA World Cup match (men’s tournament). Each row corresponds to one player in one match , including detailed performance statistics (goals, cards, substitutions, etc.). @miscfjelstul2023worldcup, author = Joshua C