library(tidyverse)
wta_2021_2026_matches <- read_csv("https://raw.githubusercontent.com/36-SURE/2026/main/data/wta_matches_2021_2026.csv")EDA project: WTA Shots
Overview
This project will be released on Thursday, June 4 and conclude with a 6-minute presentation on Tuesday, June 16 during lab.
Students will be randomly placed into groups of 2–3 and each group will be randomly assigned a dataset.
The goal of this project is to practice understanding the structure of a dataset, and to practice generating and evaluating hypotheses using fundamental EDA and data visualization techniques.
Deliverables
Each group is expected to make slides to accompany the 6-minute presentation. All group members must be present for the presentation and participate. No notes/scripts are allowed during the presentation.
The presentation should feature the following:
Overview of the structure of your dataset
Two questions/hypotheses you are interested in exploring
Two data visualizations exploring the questions—both must be multivariate (i.e., involving 2+ variables) and in different formats
One clustering analysis
Conclusions for the hypotheses based on your EDA and data visualizations
Timeline
There will be two submission deadlines:
Thursday, June 11 at 5pm ET - Each student will push their individual code for the project thus far to GitHub for review.
Tuesday, June 16 at 1pm ET - Slides and full code must be completed and ready for presentation. Send your slides to Erin (efranke@andrew.cmu.edu) and Sara (scolando@andrew.cmu.edu). All code must be written in R; but the slides may be created in any software. Take advantage of examples from lectures, but also feel free to explore online resources that may be relevant. (But be sure to always consult the R help documentation first before attempting to google around or ask ChatGPT.)
Data
This dataset contains all WTA matches between 2021 and 2026 (through May 25th), courtesy of Jeff Sackmann’s famous tennis repository.
Each row of the dataset corresponds to a single WTA match and has the following columns:
tourney_id: a unique identifier for each tournament, such as
2026-1005. The exact formats are borrowed from several different sources, so while the first four characters are always the year, the rest of the ID doesn’t follow a predictable structuretourney_name: name of the tournamentsurface: type of court surfacedraw_size: number of players in the draw, often rounded up to the nearest power of 2. (For instance, a tournament with 28 players may be shown as 32.)tourney_level: see full data dictionary linked belowtourney_date: eight digits, YYYYMMDD, usually the Monday of the tournament week.match_num: a match-specific identifier. Often starting from 1, sometimes counting down from 300, and sometimes arbitrary.winner_id: the player identifier for the winner of the matchwinner_seed: seed of winning playerwinner_entry: ‘WC’ = wild card, ‘Q’ = qualifier, ‘LL’ = lucky loser, ‘PR’ = protected ranking, ‘ITF’ = ITF entry, and there are a few others that are occasionally usedwinner_name: Name of the winning playerwinner_hand: R = right, L = left, U = unknown. For ambidextrous players, this is their serving hand.winner_ht: height in centimeters, where availablewinner_ioc: three-character country codewinner_age: age, in years, as of the tourney_dateloser_id: (see the above for winner but now for the losing player)loser_seed:loser_entry:loser_name:loser_hand:loser_ht:loser_ioc:loser_age:score: final match scorebest_of: ‘3’ or ‘5’, indicating the the number of sets for this matchround: tournament roundminutes: match length in minutesw_ace: winner’s number of acesw_df: winner’s number of doubles faultsw_svpt: winner’s number of serve pointsw_1stIn: winner’s number of first serves madew_1stWon: winner’s number of first-serve points wonw_2ndWon: winner’s number of second-serve points wonw_SvGms: winner’s number of serve gamesw_bpSaved: winner’s number of break points savedw_bpFaced: winner’s number of break points facedl_ace: (see the above for winner but now for the losing player)l_df:l_svpt:l_1stIn:l_1stWon:l_2ndWon:l_SvGms:l_bpSaved:l_bpFaced:winner_rank: winner’s WTA rank, as of the tourney_date, or the most recent ranking date before the tourney_datewinner_rank_points: number of ranking points, where availableloser_rank:loser_rank_points:
Link to the full glossary is located here.
Starter code
In case you’re curious, the code to build this dataset can be found below.
library(tidyverse)
wta_2021_2026_matches <-
map_dfr(c(2021:2026),
function(year) {
read_csv(paste0("https://raw.githubusercontent.com/JeffSackmann/tennis_wta/master/wta_matches_",
year, ".csv")) %>%
mutate(winner_seed = as.character(winner_seed),
loser_seed = as.character(loser_seed))
})