|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Database Tools Do you need to take a dump? SQL gurus welcome |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
#1 (permalink) |
|
Moderator*
Join Date: Feb 2006
Location: Buckingham, England
Posts: 2,897
|
Career stats v teams
On a current season basis you can see players stats against other teams, but not for previous seasons or in total.
What I plan to do is write a utility that you run at the end of the playoffs (or anytime before the new preseason) that calculates the player vs team stats and stores them in a new .dat file so that each years values are stored. There will then also be an export to csv function so that this data can be looked at in Excel. Batting and fielding will have splits down to the position the player plays in the field, and pitching will be split into starting and relieving. I plan to keep the structure of the .dat true to the current structure that Markus uses.
__________________
Tony M Technical Support Moderator |
|
|
|
|
|
#2 (permalink) |
|
Moderator*
Join Date: Feb 2006
Location: Buckingham, England
Posts: 2,897
|
I've just realised that there isn't a game fielding breakdown in the player record, so it'll just be pitching and batting breakdowns saved by player against each team.
__________________
Tony M Technical Support Moderator |
|
|
|
|
|
#4 (permalink) | |
|
Moderator*
Join Date: Feb 2006
Location: Buckingham, England
Posts: 2,897
|
Quote:
I'm thinking I might add the relevant stats to a players' history text file, so that maybe say 4 years into a sim, the following lines might get added when you run my mod 01-12-2011 - Has a lifetime 17-4 record with a 2.10ERA against the Baltimore Orioles in 25 starts 01-12-2001 - Has a lifetime 10-10 record with a 4.75ERA against the New York Yankees in 30 starts etc (obviously hitters would get hitting stats)
__________________
Tony M Technical Support Moderator |
|
|
|
|
|
|
#7 (permalink) |
|
Moderator*
Join Date: Feb 2006
Location: Buckingham, England
Posts: 2,897
|
Well, it's getting there.
I've got the program to update my .dat file every year (manual starting it of course) and it creates a csv file for players_teams_batting_stats.csv and players_teams_pitching_stats.csv Sample data from 1902-1906 at http://www.bourtonville.f2s.com/players_teams.zip The data in pitching looks fine (I can by doing some sums in Excel that Cy Young went 6-7 in 15 starts against Baltimore Orioles/New York Highlanders giving up 31 ER whilst striking out 71 of the 472 batters he faced over 117.2 innings) However in batting it appears that some batters have been given records batting against their own team. I'm trying to work out why this is happening because if the players team for a particular game is the home team then the opponent is the away team and vice versa, but somewhere along the line this must be getting muddled. After solving that issue, I'll set around outputting the results to the player history pages.
__________________
Tony M Technical Support Moderator |
|
|
|
|
|
#8 (permalink) |
|
Moderator*
Join Date: Feb 2006
Location: Buckingham, England
Posts: 2,897
|
Other useless facts you can glean from the data
Rube Waddell liked striking out the Cardinals. He did it 257 times in that 5 year period... Joe McGinnity gave up a homerun on average every 45 Boston Americans batter that he faced... (but only 1 of those was in spring training out of 52 batters faced) Deacon Phillippe was 3-1 in 4 postseason starts for Pittsburgh against the Highlanders...
__________________
Tony M Technical Support Moderator |
|
|
|
|
|
#9 (permalink) |
|
Moderator*
Join Date: Feb 2006
Location: Buckingham, England
Posts: 2,897
|
If anyone is looking at this
Game Type 0 = Regular 2 = Spring Training 3 = Postseason Position 1-9 are regular position numbers in the Batting stats I'm guessing 0 is like Pinch Hitter (and 10 is probably DH) 1 in the pitching stats is as a starter 0 in the pitching stats is as a reliever
__________________
Tony M Technical Support Moderator |
|
|
|
|
|
#12 (permalink) |
|
Minors (Triple A)
Join Date: Apr 2004
Posts: 221
|
Haven't noticed anything new in a while, thought I bump it to ask how is this going.
For me this was the only addition I would be really looking forward to for OOTP2009. Anyway good luck on the program hope its going well. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|