Beispiel #1
0
 def shots(self):
     game_shots = []
     for team in self.teams:
         shots_url = "http://stats.nba.com/stats/shotchartdetail?Season=" + self.season + "&SeasonType=Regular+Season&LeagueID=00&TeamID=" + str(
             team
         ) + "&PlayerID=0&GameID=" + self.game_id + "&Outcome=&Location=&Month=0&SeasonSegment=&DateFrom=&DateTo=&OpponentTeamID=0&VsConference=&VsDivision=&Position=&RookieYear=&GameSegment=&Period=0&LastNGames=0&ContextFilter=&ContextMeasure=FG_PCT&display-mode=performance&zone-mode=zone&zoneOverlays=false&zoneDetails=false&viewShots=true"
         game_shots += helper.get_data_from_url(shots_url, 0)
     return game_shots
Beispiel #2
0
def get_sportvu_data_for_stat(season, season_type, player_or_team, measure_type, start_date="", end_date=""):
    url = (
        "http://stats.nba.com/stats/leaguedashptstats?College=&Conference=&Country=&DateFrom="
        + start_date
        + "&DateTo="
        + end_date
        + "&Division=&DraftPick=&DraftYear=&GameScope=&Height=&LastNGames=0&LeagueID=00&Location=&Month=0&OpponentTeamID=0&Outcome=&PORound=0&PerMode=Totals&PlayerExperience=&PlayerOrTeam="
        + player_or_team
        + "&PlayerPosition=&PtMeasureType="
        + measure_type
        + "&Season="
        + season
        + "&SeasonSegment=&SeasonType="
        + season_type
        + "&StarterBench=&TeamID=0&VsConference=&VsDivision=&Weight="
    )
    return helper.get_data_from_url(url, 0)
Beispiel #3
0
 def pbp(self):
     return helper.get_data_from_url(self.pbp_url, 0)
Beispiel #4
0
 def speed(self):
     return helper.get_data_from_url(self.speed_url, 0)
Beispiel #5
0
 def rebounding(self):
     return helper.get_data_from_url(self.rebounding_url, 0)
Beispiel #6
0
 def passing(self):
     return helper.get_data_from_url(self.passing_url, 0)
Beispiel #7
0
 def defense(self):
     return helper.get_data_from_url(self.defense_url, 0)
Beispiel #8
0
 def game_summary(self):
     return helper.get_data_from_url(self.summary_url, 0)
Beispiel #9
0
 def misc_boxscore_team(self):
     return helper.get_data_from_url(self.misc_boxscore_url, 1)
Beispiel #10
0
 def four_factors_boxscore_team(self):
     return helper.get_data_from_url(self.four_factors_boxscore_url, 1)
Beispiel #11
0
 def usage_boxscore(self):
     return helper.get_data_from_url(self.usage_boxscore_url, 0)
Beispiel #12
0
 def misc_boxscore_team(self):
     return helper.get_data_from_url(self.misc_boxscore_url, 1)
Beispiel #13
0
 def scoring_boxscore_team(self):
     return helper.get_data_from_url(self.scoring_boxscore_url, 1)
Beispiel #14
0
 def advanced_boxscore_team(self):
     return helper.get_data_from_url(self.advanced_boxscore_url, 1)
Beispiel #15
0
 def traditional_boxscore_team(self):
     return helper.get_data_from_url(self.traditional_boxscore_url, 1)
Beispiel #16
0
 def player_tracking_boxscore_team(self):
     return helper.get_data_from_url(self.player_tracking_boxscore_url, 1)
Beispiel #17
0
 def advanced_boxscore_team(self):
     return helper.get_data_from_url(self.advanced_boxscore_url, 1)
Beispiel #18
0
 def game_summary(self):
     return helper.get_data_from_url(self.summary_url, 0)
Beispiel #19
0
 def four_factors_boxscore_team(self):
     return helper.get_data_from_url(self.four_factors_boxscore_url, 1)
Beispiel #20
0
 def line_score(self):
     return helper.get_data_from_url(self.summary_url, 5)
Beispiel #21
0
 def player_tracking_boxscore_team(self):
     return helper.get_data_from_url(self.player_tracking_boxscore_url, 1)
Beispiel #22
0
 def touches(self):
     return helper.get_data_from_url(self.touches_url, 0)
Beispiel #23
0
 def drives(self):
     return helper.get_data_from_url(self.drives_url, 0)
Beispiel #24
0
 def defense(self):
     return helper.get_data_from_url(self.defense_url, 0)
Beispiel #25
0
 def pull_up_shoot(self):
     return helper.get_data_from_url(self.pull_up_shoot_url, 0)
Beispiel #26
0
 def drives(self):
     return helper.get_data_from_url(self.drives_url, 0)
Beispiel #27
0
 def shooting(self):
     return helper.get_data_from_url(self.shooting_url, 0)
Beispiel #28
0
 def passing(self):
     return helper.get_data_from_url(self.passing_url, 0)
Beispiel #29
0
 def catch_shoot(self):
     return helper.get_data_from_url(self.catch_shoot_url, 0)
Beispiel #30
0
 def pull_up_shoot(self):
     return helper.get_data_from_url(self.pull_up_shoot_url, 0)
Beispiel #31
0
 def traditional_boxscore_q4(self):
     return helper.get_data_from_url(self.traditional_boxscore_url_q4, 0)        
Beispiel #32
0
 def rebounding(self):
     return helper.get_data_from_url(self.rebounding_url, 0)
Beispiel #33
0
 def traditional_boxscore_team(self):
     return helper.get_data_from_url(self.traditional_boxscore_url, 1)
Beispiel #34
0
 def shooting(self):
     return helper.get_data_from_url(self.shooting_url, 0)
Beispiel #35
0
 def scoring_boxscore_team(self):
     return helper.get_data_from_url(self.scoring_boxscore_url, 1)
Beispiel #36
0
 def speed(self):
     return helper.get_data_from_url(self.speed_url, 0)
Beispiel #37
0
 def usage_boxscore(self):
     return helper.get_data_from_url(self.usage_boxscore_url, 0)
Beispiel #38
0
 def catch_shoot(self):
     return helper.get_data_from_url(self.catch_shoot_url, 0)
Beispiel #39
0
 def shots(self):
     game_shots = []
     for team in self.teams:
         shots_url = "http://stats.nba.com/stats/shotchartdetail?Season="+self.season+"&SeasonType=Regular+Season&LeagueID=00&TeamID="+str(team)+"&PlayerID=0&GameID="+self.game_id+"&Outcome=&Location=&Month=0&SeasonSegment=&DateFrom=&DateTo=&OpponentTeamID=0&VsConference=&VsDivision=&Position=&RookieYear=&GameSegment=&Period=0&LastNGames=0&ContextFilter=&ContextMeasure=FG_PCT&display-mode=performance&zone-mode=zone&zoneOverlays=false&zoneDetails=false&viewShots=true"
         game_shots += helper.get_data_from_url(shots_url, 0)
     return game_shots
Beispiel #40
0
 def touches(self):
     return helper.get_data_from_url(self.touches_url, 0)
Beispiel #41
0
 def line_score(self):
     return helper.get_data_from_url(self.summary_url, 5)
Beispiel #42
0
 def pbp(self):
     return helper.get_data_from_url(self.pbp_url, 0)