Open bbennett36 opened 6 years ago
As part of my #85 PR, I'm cleaning up some Code Climate issues. One of those issues is redundant code. As a fix for that, I'm going to combine the "additional" stats with the standard stats object. As for which stats are available for each object:
basic stats come from boxscore.xml
additional stats come from rawboxscore.xml
I've also got a PR in the works for pulling season stats without having to traverse every game of the season, which puts a high load on the system compiling this information due to the hundreds of HTTP requests necessary to sequentially pull that data.
@trevor-viljoen
so if a stat is in both objects (example - away_pitching_s_bb & away_addtl_pitching_bam_s_bb), do you know if they will they ALWAYS contain the same value for that statistic in both objects?
If that's the case it will be easy for me to just merge and de-dupe columns. I was just worried that this will not always be the case.
@bbennett36 I believe they will always be the same. I'm not sure what MLB's reasoning is for having a boxscore
and a rawboxscore
containing lots of duplicate stats. One note of caution with the s_*
stats, they are "season" stats, but "season" may be a given round of the playoffs. For instance, I believe in the World Series example above the s_*
stats are only for the WS and do not include other rounds of the playoffs. They definitely don't include the regular season.
@trevor-viljoen Sounds good, maybe ill run some testing to double check. Yeah I did see the 's_' stats from other closed issues regarding season to date stats but I don't really trust it which is why I was just going to calculate it myself.
I'll keep you updated on my findings since you are pretty much working on the same problems. I might be able to help you with the PR updates.
The
player_stats
module has the following stats available -home_batting
,home_additional_batting
,home_pitching
,home_additional_pitching
,away_batting
,away_additional_batting
,away_pitching
,away_additional_pitching
It looks like some of the stats in the 'additional' method return contain the some ones from the regular stats method. I need to know which ones are the same and which ones are different.
Example -
For example in the pitching stats, I'm not sure what the 'bam' and 'bis' suffixes are showing because they are the same as the other fields.
Where can I find definitions for the fields that are coming from the additional methods? I'm looking to create my own YTD stats for each player and need to make sure it is as accurate as possible. I don't really see any distinct patterns to make a safe decisions.
Thanks!