Data Theivery

So, I’ve tasked myself with creating another fantasy sports game. I just got into a group of guys that play fantasy golf. It’s simple really. You pick a golfer from each week’s field (you can only pick each golfer once all year) and your score is the resulting money that the golfer wins in the tournament.

The guy running it (I can’t believe he’s been doing it this way for a while) has been using an Excel spreadsheet to manage this group of 60 guys. Each guy emails him their pick, he verifies that the pick is actually in the field of golfers for that tournament, and then calculates everyone’s score after the tournament completes. That is too much work for one person to do. Hence, I’ve got a task.

The biggest challenge with this, of course, is finding an automated way to gather all of the data necessary for this system to perform. This includes a list of all of the golfers, a list of the golfers in a specific tournament field, and finally, the amount of each golfer’s winnings.

So I ventured out to ESPN.com to see just what I would have to work with. I have, in the past, approached them about providing raw statistics and information in XML files, but apparently they “sell” that service, and I just don’t have the money to pay for it. Upon my arrival, I viewed the source of the pages that contained the information I needed. It was as if they had heard my requests, and did their best to accomodate me without actually accomodating me.

The data, in the page source, was nicely commented, formatted, and even included the ID values I would need to refer to the data at a later time. It was as good as XML, as far as I’m concerned.

So, 7 lines of code later, I now have a database full of golfers, tournaments, and the results of Week 1. Now I’ve just gotta build the interface to let these 60 guys start making picks!

Thank you ESPN!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s