Alright, lemme tell you about this “LeBronto Years” thing I’ve been messing around with. It’s not as fancy as it sounds, trust me. More like a weekend project that spiraled a bit.

First off, the idea. I wanted to see if I could wrangle some data and visualize how the Toronto Raptors performed during LeBron James’ reign of terror in the Eastern Conference. Basically, how much did LeBron own us?
So, I started scraping data. Yeah, good ol’ web scraping. Used Python with Beautiful Soup, cause it’s relatively painless. I hit up a couple of sports stats sites, ESPN, Basketball-Reference, that kinda stuff. Targeted the seasons when LeBron was on the Heat and the Cavs, from like, 2010 to 2018. The goal was to grab game scores, dates, and who won.
Then came the cleaning. Oh man, data cleaning. It’s always the worst part. Dates in different formats, weird abbreviations, missing data points. You name it, it was there. I spent a solid chunk of time using Pandas to massage the data into something usable. Filling in missing values, standardizing the date format, all that jazz. I also had to filter it down to just the Raptors games against the Heat or Cavs when LeBron was playing.
After that, the analysis. Figured I’d keep it simple. Calculate the win percentage for the Raptors against LeBron’s teams during those years. Nothing fancy, just a simple win/loss record. I also wanted to see if there were any particular seasons where the Raptors did better or worse.
Finally, the visualization. I used Matplotlib, again, keeping it simple. Created a bar chart showing the Raptors’ win percentage each season against LeBron. Threw in some labels and a title to make it look presentable. I also added a little note pointing out the, uh, not-so-great overall record. Let’s just say it confirmed our suspicions about LeBron’s dominance.
- Scraped: ESPN, Basketball-Reference.
- Cleaned: Pandas.
- Analyzed: Win percentages per season.
- Visualized: Matplotlib bar chart.
The result? A pretty clear picture of LeBron owning the Raptors during those years. Not exactly groundbreaking stuff, but it was a fun little project. And it was a good reminder of just how good LeBron was (and is).
Lessons learned? Data cleaning is always the biggest time sink. Also, even a simple analysis can be pretty insightful. And finally, LeBron James was a problem.