You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been using nbastatR to aggregate some date related to player pull-up shooting. I first tried to pull the data with teams_players_stats using the following code:
However, shots_tables only had 3 rows with these pertaining to the first 3 dribble ranges, and the function could not find any data for the "7+ Dribbles" range. I went to stats.nba.com and investigated what could be the issue, and found that while nbastatsR forms the url for other dribble ranges correctly, it does not do so for the "7+ Dribbles" dribble range.
Looking through the code for the package, it seems the package does correctly parse the space into a "+" to form the url, as "3-6 Dribbles" converts correctly to "3-6+Dribbles" in the url. However, "7+ Dribbles" does not parse correctly in the package, parsing to form a url segment as "7++Dribbles" instead of "7%2B+Dribbles".
This results in shots_tables pulling the data for all the desired ranges. But since this is cumbersome and unintuitive for a user to input, I'd suggest changing how "7+ Dribbles" is parsed.
The text was updated successfully, but these errors were encountered:
I have been using nbastatR to aggregate some date related to player pull-up shooting. I first tried to pull the data with teams_players_stats using the following code:
However, shots_tables only had 3 rows with these pertaining to the first 3 dribble ranges, and the function could not find any data for the "7+ Dribbles" range. I went to stats.nba.com and investigated what could be the issue, and found that while nbastatsR forms the url for other dribble ranges correctly, it does not do so for the "7+ Dribbles" dribble range.
Example url for 3-6 Dribbles data: https://www.nba.com/stats/players/shots-dribbles?DribbleRange=3-6+Dribbles
Example url for 7+ Dribbles data: https://www.nba.com/stats/players/shots-dribbles?DribbleRange=7%2B+Dribbles
Looking through the code for the package, it seems the package does correctly parse the space into a "+" to form the url, as "3-6 Dribbles" converts correctly to "3-6+Dribbles" in the url. However, "7+ Dribbles" does not parse correctly in the package, parsing to form a url segment as "7++Dribbles" instead of "7%2B+Dribbles".
I can edit my function call to be:
This results in shots_tables pulling the data for all the desired ranges. But since this is cumbersome and unintuitive for a user to input, I'd suggest changing how "7+ Dribbles" is parsed.
The text was updated successfully, but these errors were encountered: