Open kwinrowjr opened 7 years ago
It actually looks like there is a lot more (especially historical) data that you can access now from NBA stats website.
If you go to pages like this http://stats.nba.com/teams/traditional/ one and load up the stats with JS console open you can see the request it sends to pull the data now:
[image: Inline image 1]
The requests look something like this (you can paste this in your browser):
If you vary params you should be able to pull various (historical) stats for different years with python / R etc. Results seem to come back in a similar JSON format.
Good luck!
On Wed, Feb 22, 2017 at 3:41 PM, Kelvin notifications@github.com wrote:
Where does this data come from?
Is the below all that can be pulled? If not, what else what I pull?
pullup_address ="http://stats.nba.com/js/data/sportvu/pullUpShootData.js", drives_address ="http://stats.nba.com/js/data/sportvu/drivesData.js", defense_address ="http://stats.nba.com/js/data/sportvu/defenseData.js", passing_address ="http://stats.nba.com/js/data/sportvu/passingData.js", touches_address ="http://stats.nba.com/js/data/sportvu/touchesData.js", speed_address ="http://stats.nba.com/js/data/sportvu/speedData.js", rebounding_address ="http://stats.nba.com/js/ data/sportvu/reboundingData.js", catchshoot_address ="http://stats.nba.com/js/ data/sportvu/catchShootData.js", shooting_address ="http://stats.nba.com/js/data/sportvu/shootingData.js"
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Fossj117/NBAdata/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AFJIWueJcthURQWWjMxsztevIHw11aENks5rfMeegaJpZM4MJWFN .
Here's the screenshot that didn't come through from email:
man oh man, this is perfect thanks a lot
@kwinrowjr cool no problem. If you wind up putting together a script to pull this data, feel free to add it here so others can use as well. I might do that if you don't
ok I plan to, I got some of what I am trying to do working but stuck on other parts. So basically I am trying to find a way to reference the individual player game logs by using the player name. When I go to the url: http://stats.nba.com/players/gamelogs/, I am able to click on the advance filter option. The to and from dates are able to be referenced from the request url but my issue is with the custom filter option. This is what I am trying to code below and it does not work, it does not show in the request url.
Code:
$(function() {
function loadStats() {
$.ajax({
url: 'http://stats.nba.com/players/gamelogs/'#!?&callback=?',
jsonpCallback: 'jsonReturnData',
dataType: 'jsonp',
data: {
CF: 'PLAYER_NAME*E*James Harden',
Season: '2016-17',
SeasonType: 'Regular Season',
format: 'json'
},
success: function(response) {
console.log(response);
} //success
}); //AJAX Call
}
loadStats();
});
Where does this data come from?
Is the below all that can be pulled? If not, what else what I pull?
pullup_address ="http://stats.nba.com/js/data/sportvu/pullUpShootData.js", drives_address ="http://stats.nba.com/js/data/sportvu/drivesData.js", defense_address ="http://stats.nba.com/js/data/sportvu/defenseData.js", passing_address ="http://stats.nba.com/js/data/sportvu/passingData.js", touches_address ="http://stats.nba.com/js/data/sportvu/touchesData.js", speed_address ="http://stats.nba.com/js/data/sportvu/speedData.js", rebounding_address ="http://stats.nba.com/js/data/sportvu/reboundingData.js", catchshoot_address ="http://stats.nba.com/js/data/sportvu/catchShootData.js", shooting_address ="http://stats.nba.com/js/data/sportvu/shootingData.js"