Magic Numbers
You may have noticed the Athletics magic number message on the sidebar lately and wondered what that was all about. The Athletics (better known as the A’s) are a professional baseball that plays it’s home games in Oakland, California. The magic number (at 6 as I write this) is the number of games they need to win or the number of games the second place team needs to lose or any combination of the two in order for them to win their division and clinch a playoff berth.
You may be wondering why such information is on a blog like this. After all this blog has nothing to do with baseball. And besides, I’m a Mets fan.
I have another blog that is baseball related and every spring I go around looking for different baseball related WordPress plugins to try to jazz up that blog. And every year the search yields nothing. This year I resolved that I would write my own baseball related plugin. It came a little late but this magic number is the beginning of that plugin. I put it up on my baseball blog but put it here too for testing purposes. (The one on my baseball blog is set to display the Mets magic number.) It works by downloading an XML feed of the baseball standings and parsing & displaying data for a team that the blogger chooses from the Admin section of their WordPress based blog. if the team is in first place it will display their magic number. If the team is not in first place (and hence has no magic number) it will display how many games behind first place they are. And if they are in first place but already clinched (which also means they will no longer have a magic number) it will display a message saying that they have won their division.
The plan for this plugin is to make it a more in depth report based on the standings. It will have home/away records, divional records, etc. in a table suitable for display on the top of the blog or in it’s sidebar. I also plan on making a version for NFL football and NBA basketball. I have already begun working on the NFL version and hope it’s ready in the next few weeks.
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.