Alright, so yesterday I was trying to figure out something kinda random: how many total pars were made in the 2023 Masters Tournament. It seemed like a fun little data-diving exercise, and I thought I’d share how I went about it.

First off, I needed the raw data. I started by hitting up the official Masters website. They usually have a leaderboard with all the scores for each player, round by round. I spent a bit digging around, trying to find a downloadable file or even just a cleanly formatted table I could copy and paste. No luck initially. It was all dynamically loaded stuff, a bit of a pain.
I ended up having to resort to some good ol’ web scraping. I used Python with the BeautifulSoup and Requests libraries. Basically, I wrote a script to fetch the HTML of each round’s leaderboard page. Then, BeautifulSoup helped me parse the HTML to extract the individual scores for each player in each round.
The trickiest part was figuring out the HTML structure. These websites change their layouts all the time, so my initial script broke a couple of times. I had to inspect the page source, find the relevant HTML tags and classes containing the scores, and adjust my script accordingly. It was a bit of a cat-and-mouse game.
Once I had the scores, I needed to figure out the par for each hole. Augusta National is a par 72 course, but I wanted to be absolutely sure, so I double-checked the official scorecard to confirm the par for each hole.
Next, I looped through each player’s scores for each round and compared their score on each hole to the par for that hole. If they matched, I incremented a counter for the total number of pars. I kept separate counters for each round as well, just out of curiosity.
After processing all the data, I summed up the total number of pars across all rounds and all players.
The Final Result: I found out that there were a ton of pars made during the whole tournament! It was interesting to see the raw number and to think about all the great shots (and lucky breaks) that went into them.
Lessons Learned:

- Web scraping can be a pain, especially when dealing with dynamic websites. Be prepared to adjust your scripts as the website layout changes.
- Double-checking your data sources is crucial. It’s easy to make assumptions that might be incorrect.
- Sometimes the simplest questions require a bit of digging and coding to answer!
Anyways, that was my little data adventure. Hope you found it interesting!