RotoGuru Baseball Forum

View the Forum Registry


0 Subject: BaseballRosters program updated

Posted by: Sludge
- [1440310] Fri, Apr 20, 11:51

I've updated the BaseballRosters program to keep track of the teams using the frozen rosters. Some changes and notes:

* Can no longer track a players next game.

* Examines the freeze time in your location and the current system time, and decides which roster (table_id) to look at based on that information. As such, you must go to the Preferences sheet and select the time the freeze happens at your location (It's currently set at 11 am). It would also be a very good idea to make sure your system time is correct. I make no guarantees to performance if you try to grab a roster from a future date, or if SW is slow in updating the frozen rosters pages.

* You should be able to copy all the roster information from the old version and paste it into the new version. If you also track the rosters over time, run it once, then copy and paste the information from each individual sheet.

* If you prefer to copy the code over, perform the following steps:
1. Make sure the "Track Rosters Over Time" box on the Preferences sheet is checked.
2. Click F11. Click on "Sheet1 (Preferences)". Delete all the code in the window that pops up. Close the window.
3. Copy the code from the GetRostersCode module from the new version and paste it over the GetRostersCode module from the new version.
4. Close the Visual Basic windows.
5. Uncheck the "Track Rosters Over Time" box if you want.
6. Cross your fingers and hope it works. I'm sure there are more elegant ways of doing it, but you get what you pay for.

BaseballRosters2001b.zip

Let me know what bugs you run into.
1Sludge
      ID: 1440310
      Fri, Apr 20, 11:53
By "old version", I mean BaseballRosters2001a.xls. No guarantees on anything before that.
2Sludge
      ID: 1440310
      Fri, Apr 20, 12:01
Hmmm... Interesting problem. The current frozen roster from Smallworld doesn't list the last points for a player. So, I see several choices.

1. Show yesterday's roster, in which case player movements would be a day behind.
2. Show today's roster (as it is currently), in which case player movements would be current (as current as they get, anyway), but point information isn't available.
3. Load up both the current and previous day's rosters. Player movement would be obtained from current, and points would be obtained from the previous. The drawbacks to this are that point information for newly added players wouldn't be available, and the program would take twice as long to run since twice the pages have to be loaded.

Any thoughts?
3PowerLifter
      ID: 19841316
      Fri, Apr 20, 12:05
Anyway to download the stats form ESPN and calculate the points, or are teh box scores still screwy?
4Sludge
      ID: 1440310
      Fri, Apr 20, 13:31
I'm thinking of staying away from downloading the stats from ESPN. The problems doing that seem worse than the problems downloading from SW.

I believe I'm just going to calculate the last points by subtracting the current total from the total when the program was last run. That seems more useful if the program is run infrequently anyway.
5Sludge
      ID: 1440310
      Fri, Apr 20, 14:45
Program has been updated. What it reports as a player's "LSWP" is their SWP since you last ran the program.

Here's hoping it's free of bugs.

Link in first message gets you current version.
6Madman
      ID: 29246911
      Fri, Apr 20, 14:58
The stats from ESPN have been pretty unreliable so far this year. They're undergoing so format revisions. I think they'll be fine, but I don't recommend that anyone goes to too much work right now on them.

A more reliable source for last game's points would be the Guru sartibles.

Thanks for the work, sludge. I hate logging into their site, and this ap allows me to access my rosters faster and more conveniently.
7Sludge
      ID: 1440310
      Fri, Apr 20, 15:48
I thought about Guru's sortables as well, but I imagine there'd be problems with matching up names. Even if there weren't any such problems, I'd hesitate to require loading up a second page, even if it only had to be done once. KISS.
8Sludge
      ID: 113368
      Sat, Apr 21, 11:50
Oops... Simple math error in the program. Sign on last SWP will be reversed. Problem will be fixed shortly. (As soon as I can connect to the web server.)
9Sludge
      Donor
      ID: 1440310
      Tue, May 01, 13:44
Looks like SW won't be using the current day of the month as the table_id. They're using the number of days since April 1. Fair enough. I've updated the program to accomodate this fact.

Also, does anyone know if the program ignores the crosses in 97? It does in 2000. Madman?
10allhair allstars
      Sustainer
      ID: 455222012
      Tue, May 01, 14:02
Sludge,
Don't know about the crosses, but SW occasionally changes their table numbering. Right now they are simply counting from April 1. In hoops I remember they got up to about 50 something before they reset back to zero. Just FYI. The table id# could (and probably will) change without rhyme or reason.
11Richard
      Leader
      ID: 1719313
      Tue, May 01, 14:04
Sludge - keep up the good work. I've got my own simplified roster tracking program and the little red and blue crosses have caused me some grief. If SW has put a cross of doom on a player the location you have to look for the player's name gets shifted down one cell (in Excel 97) but the rest of the info stays in it's regular location. Lots of fun trying to keep up with format/layout changes at both ESPN and SW. Good luck.

Richard
12Sludge
      Donor
      ID: 1440310
      Mon, May 21, 11:32
allhair was right. 50 is the magic number. I've updated the program to accomodate a rotating 1-50 table_id. I hope that's what they're doing.

Haven't gotten any tips/code on dealing with the crosses in Excel 97, so it hasn't been fixed.

Anybody give a damn?
13Sludge
      Donor
      ID: 1440310
      Thu, Jun 21, 11:20
File has been updated to deal with TSNP instead of SWP.
14Sludge
      Donor
      ID: 1440310
      Thu, Jul 12, 13:54
*sigh*

Updated because of new table_id numbers.

15Sludge
      Donor
      ID: 1440310
      Fri, Jul 13, 12:38
Two updates in 24 hours. Wow. How's that for customer service?

Updated to keep track of midseason teams. The pages for midseason aren't the same as those for fullseason, and I imagine they'll be editing them in the future to make them look the same. (For example, points are still called SWP in midseason.) When that happens, I get to fix the program again.
16Sludge
      Donor
      ID: 1440310
      Wed, Jul 18, 12:19
Fixed a bug in tracking the histories of midseason teams.
17Kibitzer
      ID: 35592419
      Wed, Jul 18, 13:43
Sludge,
The spreadsheet works like a charm for me. Thanks for the last bug fix - keep up the good work.
18Sludge
      Donor
      ID: 1440310
      Wed, Jul 25, 11:52
Re: #15

It finally happened. SWP in Midseason are now called TSNP. Also adjusted to account for "Pitcher Trades:" and "Hitter Trades:" in fullseason.
19Catfish
      Sustainer
      ID: 20557322
      Mon, Aug 13, 18:13
Question for sludge or other spreadsheet guru: I set up the baseballrosters2001 spreadsheet for my midseason division. Worked great for a few days. For two days now, when it finishes grabbing rosters, it shows all players traded and no players on the teams. Can someone please tell me how do I fix it??

20Sludge
      Donor
      ID: 113368
      Mon, Aug 13, 18:29
Catfish -

The program is working fine. The problem is with Smallworld. It appears that they haven't been updating the table_id appropriately. I'll keep an eye on it tomorrow and see if they're just using a different scheme. Of course, the fellas who compile standings may be able to just tell me the problem. Fellas?
21Sludge
      Donor
      ID: 113368
      Wed, Aug 15, 13:11
Catfish -

I'll be updating the program shortly after I get back from vacation on the 20th.

22Rick
      ID: 2578610
      Wed, Aug 22, 07:29
Sludge,

Have you had time to check the Roster program to see what was wrong? (or should what smallworld screw again)
23Sludge
      Donor
      ID: 113368
      Wed, Aug 22, 10:27
I'll have it fixed by this afternoon sometime. Still recovering from three trips (Atlanta, San Antonio, and Vegas) in about two weeks.
24Sludge
      Donor
      ID: 1440310
      Wed, Aug 22, 13:16
Okay... I've updated it, and it should work for at least the next 20 days. I simply put the table_id numbers for the midseason game on a 31 day cycle rather than a 50 day cycle. Who knows what the hell SW is up to? I figure my guess is as good as any.

If you don't want to download the program and go through the "upgrade", here's all you gotta do to fix it:

Open up the spreadsheet.
Press Alt-F11
Search around until you find the following two lines:


StartF = #7/11/2001#
StartM = #7/12/2001#


A little below that, find the following loop:


While (TodayM > 50)
TodayM = TodayM - 50
Wend


Change the 50 to 31. Close the Visual Basic window, save the spreadsheet. Also, be careful that you aren't changing the block that deals with TodayF, as that is the full-season table_id number.

25Rick
      ID: 2578610
      Thu, Aug 23, 08:26
Thanks a lot Sludge. Works like a charm!

26Rick
      ID: 17435249
      Fri, Aug 24, 08:41
Sludge,

I'm having some problems now. I ran the program and it grabs the original roster from the start of the season. Trading is all messed up also. I traded some players this morning and those changes never appeared when I ran the program.

Any ideas why?
27Sludge
      Donor
      ID: 113368
      Fri, Aug 24, 09:24
Seems to run fine for me. What time zone are you in? Go to the "Preferences" sheet, and be sure that the local time for the SW freeze is selected correctly for your time zone. (12:00 Eastern, 11:00 Central, 10:00 Mountain, 9:00 Pacific) If that doesn't work, let me know, and I'll see what else I can do.
28Rick
      ID: 17435249
      Fri, Aug 24, 11:21
Well, everything is fine now. I think this program has a mind of its own :)
29Sludge
      Donor
      ID: 1440310
      Fri, Aug 24, 11:33
I knew that semester of AI I took 8 years ago would bear some fruit. :)
30Catfish
      Sustainer
      ID: 20557322
      Fri, Aug 31, 23:23
sludge, the fix worked fine when I ran it for the first time last night. But this evening, it grabbed rosters from much earlier in the season so that it seemed to reverse a lot of trades.

In the loop you described, I changed 50 to 31 in both places so that TodayM >31 and TodayM = TodayM - 31. Is that right?
31Promize
      ID: 30848116
      Sun, Sep 02, 08:34
Hi Sludge,

I tried downloading your program to see if it would work with IE6.0, and having the same problem as RSF's program.

Damn IE6.0
Rate this thread:
5 (top notch)
4 (even better)
3 (good stuff)
2 (lightweight)
1 (no value)
If you wish, you may rate this thread on scale of 1-5. Ratings should indicate how valuable or interesting you believe this thread would be to other users of this forum. A '5' means that this thread is a 'must read'. A '1' means that this is a complete waste of time.

If you have previously rated this thread, rating it again will delete your previous rating.

If you do not want to rate this thread, but want to see how others have rated it, then click the button without entering a rating, or else click here.

RotoGuru Baseball Forum

View the Forum Registry




Post a reply to this message: (But first, how about checking out this sponsor?)

Name:
Email:
Message:
Click here to create and insert a link
Ignore line feeds? no (typical)   yes (for HTML table input)


Viewing statistics for this thread
Period# Views# Users
Last hour11
Last 24 hours22
Last 7 days33
Last 30 days88
Since Mar 1, 2007930488