Open pssguy opened 8 years ago
The defaults change as new seasons and intervals come into play. You are getting the 7 championship games because that is the current interval, which you can read more about here. If you want regular season, try adding interval_type='regularseason'
to the list. For example, to get his regular season game logs
x <- ss_get_result(token,
sport = "basketball",
league = "nba",
ep = "game_logs",
query = list(season_id="nba-2015-2016",
player_id="nba-stephen-curry",
interval_type = 'regularseason'),
version = 1,
walk = TRUE,
page = NA,
verbose = TRUE)
In your example above, you set the walk
flag to FALSE
. I often do this when I am testing queries, but if you wanted to get all of the data that will come across multiple pages, be sure to set it to TRUE
@Btibert3 Thanks very muchfor code and link.
Just to clarify, the since parameter is only effective within a season_id and there is no way of obtaining all a player game_logs at one fell swoop and then filtering them subsequently by season and/or interval_type?
To the best of my knowledge, not at the moment, but in the short run it's easy enough to loop through the intervals to grab what you need.
On Thu, Jun 23, 2016 at 3:35 PM, Andrew Clark notifications@github.com wrote:
@Btibert3 https://github.com/Btibert3 Thanks very muchfor code and link.
Just to clarify, the since parameter is only effective within a season_id and there is no way of obtaining all a player game_logs at one fell swoop and then filtering them subsequently by season and/or interval_type?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/stattleship/stattleship-r/issues/33#issuecomment-228159884, or mute the thread https://github.com/notifications/unsubscribe/AAMaT4PNWLupwo5tZ8msygAQZwLR3-wpks5qOt_kgaJpZM4I9FV6 .
Sure no technical problem but for an interactive web experience one wants the quickest return of data possible
Hi @Btibert3 and @pssguy - have reset the default interval for NBA to the regularseason
.
Thanks for the reminder!
@pssguy I think an enhancement of maybe and interval_type=all
might be handy -- but, would also want: preseason, all-star/probowl, games as well? I guess so.
I'll add this as an enhancement to the API filter.
@dthyresson Thanks very much. As long as I can get data.frame with an interval_type column then can process as required
I am unable to get preseason stats using the same method described above. Are they available?
Hi, @sangamc.
We're in the process of migrating to a new dataset for both NBA and NHL so right now we don't have the preseason stats for those sports.
Plan is to do NHL first (as their season begins before NBA) and in time for regular season start.
We'll backfill all preseason stats.
Will update here when NBA is up and running for 2016-7 (could be next weekend).
Thanks for the update! I've been testing my scripts with past data and 2015-16 season is more than enough for now.
This code has been working smoothly, providing 2015/6 regular season data
but now returns
If I try something like
I just get the 7 championship games. I have tried entering a since value into the query list but that does not help either
Is it possible to access a players results for specified period - or indeed whole career gamelogs
I am using version 0.0.5