Okay, so, this week I’ve been messing around with trade value charts, specifically the ones from CBS. It’s week six, and let me tell you, it’s been a bit of a ride.

First off, I gotta get the data, right? So I start digging around the CBS site. No easy “download” button, oh no. It’s all embedded in the webpage. I’m thinking, “Alright, challenge accepted.” I open up the browser’s developer tools, the network tab, you know the drill. And there it is! The data’s being pulled from somewhere. I finally see a URL but not really a URL just in the network and some parameters and I take some notes.
Now, I don’t wanna be manually copying and pasting this stuff every week. That’s just barbaric. So, I whip up a quick Python script. Nothing fancy, just using the `requests` library to grab the content of that URL from the network, and then `Beautiful Soup` to parse through the HTML and pull out the player names, positions, and those all-important trade values.
After getting my script working, which, by the way, took a few tries because that website’s structure is kinda weird. It’s a mess in there. I test my script and bam, it runs, but the data’s all over the place. Some players have multiple positions listed, others have missing values. It’s like they’re trying to make it hard on purpose.
Time for some data cleaning. I add some more code to my script. If a player has multiple positions, I just take the first one. I also add in some error handling for those missing values. I am not super sure so I just put a default value. If a value’s missing, I just slap in a zero for now. Not perfect, but it’ll do for what I need.
Finally, I have a clean dataset! It is so beautiful now! I dump it into a CSV file because why not? Excel can deal with that format. Then, just for kicks, I create a simple chart in Excel. A bar chart, showing the top 20 players by trade value. You know, just to get a quick visual.

Lessons Learned
- Websites are messy. Seriously, the way some sites structure their data is a nightmare.
- Data cleaning is essential. You can’t just use raw data. It is not going to work. You gotta clean it up first.
- Automation is key. I am so glad I didn’t have to manually copy and paste all that data.
- Simple visualizations are helpful. Even a basic chart can give you a good overview.
So yeah, that’s my week six adventure with CBS trade value charts. I went into the network, find the data, and wrote a script. And I also clean the data in the script, and I successfully create a chart in the end. It was a bit of a pain, but I got it done. And the best part is, next week, I can just run my script again and get the updated data in minutes! Now I just need to figure out what to actually do with all this trade value information…