2020 Website Enhancements

This is an open forum for anything related to the Dream Team Baseball League.

2020 Website Enhancements

Postby Kevin » Thu Jul 09, 2020 3:53 pm

As mentioned in my email a couple days ago, I rolled out a few website changes along with the site switchover to pre-season mode. I will go over the details here and will post additional replies if other new enhancements are released this year. I do have a couple other things in the works, but no promises they will be ready to go anytime soon.

First, I made the changes related to the new free agent priority system. Each team's current priority number can be seen on team stats pages as well as the standings page for the current season. There are two new columns in the primary standings table: "FA LEFT" - number of free agent signings remaining for the team and "FA PRTY" - free agent priority rank (1 being first priority and 10 being last).

If you attempt to claim a free agent for whom another team with higher priority has already submitted a claim, you will receive a notification of this prior to submitting the transaction. Previously, it would tell you that other teams had claims, and would list the names of those teams, but not until after the transaction was submitted. Now, you'll know this before submitting the transaction. It probably doesn't make sense to proceed with the claim unless you don't have any other alternative moves in mind. The only way you'll wind up with the player is if the other team withdraws their claim before the week is over since the priority list will not change before then. On the other hand, if another team with higher priority submits a claim for a player that you previously claimed, you will be notified of this by email. You will no longer know exactly which other team(s) have claimed the player, as that information is no longer needed in order to determine if an alternative move should be submitted.

Related to this, I also changed the weekly transaction processing program to account for the new priority system. After all transactions are processed for the week, a new priority list will be computed. Each team that claims a player in a week will move to the back of the list while teams that don't claim any players will move up. The order within those two groups of teams (those that do, and do not, sign players in a given week) will remain the same as they were previously, with one exception. Teams that sign more than one free agent in a week will move behind all of the teams that sign just one.

The other significant change is that I created a couple new database tables to store players' daily stat totals. Previously, only three types of stat lines were maintained for each player: active stats with a particular team, full season MLB stats and weekly stats (past 7 days). These 3 stat lines were all displayed on team stats pages. But now, because I'm storing players' stats every day throughout the season, I have much more flexibility in terms of what stat splits can be displayed throughout the site. For now, I've only taken advantage of this on one set of pages: the active team stats pages. There is now a header above the stats tables that allows you to select a stats split: "Active" - players stats on the displayed team's active roster, "Full Season" - full MLB season stats, and "Last 7", "Last 15" and "Last 30", which display the players' stats over the past 'X' days. These three splits will display the player's MLB totals over the selected split, regardless of their DTBL active roster status during that time period. I have not yet added the logic to compute PAR totals for these splits, but will be working on adding that soon.

This addition is going to open up a lot of other possibilities as well. Most notably, I'm going to be able to alter the "leaders" page to provide a whole bunch of additional stat splits. But that's not something I expect to complete before the season starts.

Hopefully, more to come soon!
User avatar
Kevin
Commissioner
 
Posts: 257
Joined: Fri Apr 04, 2003 3:58 pm
Location: Vienna, VA

Re: 2020 Website Enhancements

Postby Kevin » Fri Aug 07, 2020 3:58 pm

I've rolled out a handful of additional changes over the past week or so. Here is a summary:

* Player Pages - Previously, I had a separate page template for batters and pitchers. Now that we have a player who has both batting and pitching stats on his resume (Shohei Ohtani), I decided to create a combined page that will show both batting and pitching stats, if a player has both. Additionally, the player pages also now have injury notes that were previously only viewable by hovering over the red cross icons on the team stats pages. This should make those details more easily obtainable on mobile devices. Finally, I added a list of honors the player has won. For now, the only thing that will show up here is past Batter and Pitcher of the Week honors, which I've been storing since 2015 but previously didn't display that info anywhere other than in the Players of the Month articles. Speaking of which, I also intend to add Batter and Pitcher of the Month honors here, but I need to retroactively add that data to the database.

* Live Stats - I changed the way in which the live stat pages render. Previously, the full page would reload every 30 seconds. Now, the data is refreshed every 10 seconds, but without a full page reload. In theory, this should lead to updates being rendered more quickly. However, the back-end program which is retrieving this data still only runs once a minute. So that remains the primary limiting factor in when new data is displayed. Additionally, I created a new page which displays the daily live stats for every player in the league (excluding free agents). This page can be found in the "Live" menu by selecting "All Teams". This page contains a "Points" column, which is the value I've used for many years to determine "Today's Best" players that appear on the main page. Now you can actually see this value for yourself and view which other players are among the daily leaders. The formula I came up with to compute these points is loosely based on PAR, but is scaled for a single day. Players gain or lose points depending on stat outcomes. If you are interested in seeing the formula, let me know and I can post it.

* Week's Best - I had to change the way the "Week's Best" players that appear on the main page are determined. Previously, it was a simple query of the for the top PAR in the weekly stat lines that I used to store in the db. As mentioned in my previous post, I'm no longer storing a weekly stat line. Instead, I'm storing stats for all players on a daily basis, which can then be used to render certain splits (last 7, 15 and 30 days in the team pages, for example). So I created a query to compute the weekly PAR leaders every time the main page is rendered. As previously, the players who appear on this page on Monday will be the Batter/Pitcher of the Week.

* Team Split Totals - On the team stat pages, the team total line a the bottom of the batter and pitcher stat tables will now display the team's total for the selected split only. So you can see exactly how your team has done over the past 7/15/30 days, in addition to the full season totals. These numbers only count active player stats, so that's why they won't necessarily match the sum of adding up all of the players' stats for that split. To facilitate this change, I needed to start collecting some additional team totals on a daily basis which I did not previously store (AB, H, IP, ER, BB, HA). I just started automatically collecting this data this past Monday. So I've been working on retroactively filling in the missing data for the first week and a half of this season. I still have a couple days to go, so you may see some oddities over the next couple days. By next week, these numbers should be completely accurate.

That's all for now. I don't currently have any other changes in mind for this season. But please don't hesitate to let me know if there are changes you would like to see sooner than later.

EDIT: Forgot to mention in the "Team Split Totals" section that PAR values now appear for players as well for each of the splits on the team stat pages.
User avatar
Kevin
Commissioner
 
Posts: 257
Joined: Fri Apr 04, 2003 3:58 pm
Location: Vienna, VA


Return to DTBL Discussion

Who is online

Users browsing this forum: No registered users and 4 guests

cron