-
Notifications
You must be signed in to change notification settings - Fork 547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: TeamDashboardByGeneralSplits base data is not correct. Seems to be pulling single players stats possibly? #448
Comments
I recreated the example you gave, and I noticed that the Before:Scoreboard Data: {'name': 'WinsLossesTeamDashboard', 'headers': ['GROUP_SET', 'GROUP_VALUE', 'GAME_RESULT', 'GP', 'W', 'L', 'W_PCT', 'MIN', 'FGM', 'FGA', 'FG_PCT', 'FG3M', 'FG3A', 'FG3_PCT', 'FTM', 'FTA', 'FT_PCT', 'OREB', 'DREB', 'REB', 'AST', 'TOV', 'STL', 'BLK', 'BLKA', 'PF', 'PFD', 'PTS', 'PLUS_MINUS'], 'rowSet': [['Wins/Losses', 'Wins', 'Wins', 16, 16, 0, 1.0, 48.3, 1.6, -0.9, 0.024, 5.3, 8.9, 0.064, 5.5, 6.1, 0.043, 2.4, 4.3, 6.8, 2.7, -0.1, 1.6, 3.1, -3.1, -2.3, 2.3, 14.1, 14.1], ['Wins/Losses', 'Losses', 'Losses', 3, 0, 3, 0.0, 48.0, -10.3, -4.0, -0.103, -5.7, 0.0, -0.157, 2.3, 0.7, 0.096, -2.7, -9.0, -11.7, -3.0, -0.3, -1.3, 3.3, -3.3, -2.7, 2.7, -24.0, -24.0]]}, { 'name': 'MonthTeamDashboard', 'headers': ['GROUP_SET', 'GROUP_VALUE', 'SEASON_MONTH_NAME', 'GP', 'W', 'L', 'W_PCT', 'MIN', 'FGM', 'FGA', 'FG_PCT', 'FG3M', 'FG3A', 'FG3_PCT', 'FTM', 'FTA', 'FT_PCT', 'OREB', 'DREB', 'REB', 'AST', 'TOV', 'STL', 'BLK', 'BLKA', 'PF', 'PFD', 'PTS', 'PLUS_MINUS'], 'rowSet': [['Month', 'April', 'April', 4, 3, 1, 0.75, 48.0, 2.3, 2.8, 0.012, 1.5, 3.5, 0.005, 5.0, 6.5, -0.011, 2.8, 2.3, 5.0, 1.3, -2.8, 1.3, 4.0, -4.0, -1.0, 1.0, 11.0, 11.0], ['Month', 'May', 'May', 10, 9, 1, 0.9, 48.5, -0.4, -3.5, 0.015, 4.0, 7.3, 0.041, 6.5, 8.1, 0.002, 2.1, 4.2, 6.3, -0.8, 0.8, 1.5, 2.8, -2.8, -3.7, 3.7, 9.7, 9.7], ['Month', 'June', 'June', 5, 4, 1, 0.8, 48.0, -2.0, -0.4, -0.022, 4.4, 11.0, 0.022, 2.0, -1.6, 0.18, -0.2, -1.8, -2.0, 7.4, 0.0, 0.4, 3.2, -3.2, -0.6, 0.6, 2.4, 2.4]]}, {'name': 'PrePostAllStarTeamDashboard', 'headers': ['GROUP_SET', 'GROUP_VALUE', 'SEASON_SEGMENT', 'GP', 'W', 'L', 'W_PCT', 'MIN', 'FGM', 'FGA', 'FG_PCT', 'FG3M', 'FG3A', 'FG3_PCT', 'FTM', 'FTA', 'FT_PCT', 'OREB', 'DREB', 'REB', 'AST', 'TOV', 'STL', 'BLK', 'BLKA', 'PF', 'PFD', 'PTS', 'PLUS_MINUS'], 'rowSet': [['Pre/Post All-Star', 'Playoffs', 'Playoffs', 19, 16, 3, 0.842, 48.3, -0.3, -1.4, 0.004, 3.6, 7.5, 0.027, 5.0, 5.2, 0.055, 1.6, 2.2, 3.8, 1.8, -0.2, 1.2, 3.2, -3.2, -2.3, 2.3, 8.1, 8.1]]}, {'name': 'DaysRestTeamDashboard', 'headers': ['GROUP_SET', 'GROUP_VALUE', 'TEAM_DAYS_REST_RANGE', 'GP', 'W', 'L', 'W_PCT', 'MIN', 'FGM', 'FGA', 'FG_PCT', 'FG3M', 'FG3A', 'FG3_PCT', 'FTM', 'FTA', 'FT_PCT', 'OREB', 'DREB', 'REB', 'AST', 'TOV', 'STL', 'BLK', 'BLKA', 'PF', 'PFD', 'PTS', 'PLUS_MINUS'], 'rowSet': [['Days Rest', '1 Days Rest', '1 Days Rest', 10, 8, 2, 0.8, 48.0, -2.2, -4.8, 0.001, 3.5, 6.7, 0.033, 5.2, 5.7, 0.042, 0.6, 2.4, 3.0, -0.2, 1.2, 0.8, 2.6, -2.6, -2.0, 2.0, 4.3, 4.3], ['Days Rest', '2 Days Rest', '2 Days Rest', 5, 4, 1, 0.8, 48.0, 2.0, 4.2, 0.001, 1.0, 6.8, -0.038, 3.4, 2.2, 0.094, 2.2, 0.4, 2.6, 4.6, -3.0, 2.2, 3.2, -3.2, -1.6, 1.6, 8.4, 8.4], ['Days Rest', '5 Days Rest', '5 Days Rest', 2, 2, 0, 1.0, 50.5, 1.0, 1.0, 0.005, 4.5, 7.0, 0.051, 8.5, 10.5, -0.008, 4.5, 3.5, 8.0, -2.5, -1.5, 1.5, 2.5, -2.5, -6.5, 6.5, 15.0, 15.0], ['Days Rest', '6+ Days Rest', '6+ Days Rest', 2, 2, 0, 1.0, 48.0, 2.5, -0.5, 0.033, 9.5, 13.5, 0.121, 4.5, 5.0, 0.051, 2.5, 4.5, 7.0, 9.0, 1.5, 0.0, 6.5, -6.5, -1.5, 1.5, 19.0, 19.0]]}]} AfterScoreboard Data: {'name': 'WinsLossesTeamDashboard', 'headers': ['GROUP_SET', 'GROUP_VALUE', 'GAME_RESULT', 'GP', 'W', 'L', 'W_PCT', 'MIN', 'FGM', 'FGA', 'FG_PCT', 'FG3M', 'FG3A', 'FG3_PCT', 'FTM', 'FTA', 'FT_PCT', 'OREB', 'DREB', 'REB', 'AST', 'TOV', 'STL', 'BLK', 'BLKA', 'PF', 'PFD', 'PTS', 'PLUS_MINUS', 'GP_RANK', 'W_RANK', 'L_RANK', 'W_PCT_RANK', 'MIN_RANK', 'FGM_RANK', 'FGA_RANK', 'FG_PCT_RANK', 'FG3M_RANK', 'FG3A_RANK', 'FG3_PCT_RANK', 'FTM_RANK', 'FTA_RANK', 'FT_PCT_RANK', 'OREB_RANK', 'DREB_RANK', 'REB_RANK', 'AST_RANK', 'TOV_RANK', 'STL_RANK', 'BLK_RANK', 'BLKA_RANK', 'PF_RANK', 'PFD_RANK', 'PTS_RANK', 'PLUS_MINUS_RANK'], 'rowSet': [['Wins/Losses', 'Wins', 'Wins', 16, 16, 0, 1.0, 48.3, 40.5, 84.6, 0.479, 15.1, 41.0, 0.367, 15.7, 19.3, 0.812, 10.5, 34.3, 44.8, 24.4, 11.5, 6.4, 5.4, 2.3, 15.4, 17.7, 111.8, 14.1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1], ['Wins/Losses', 'Losses', 'Losses', 3, 0, 3, 0.0, 48.0, 33.0, 80.0, 0.413, 11.3, 36.0, 0.315, 15.7, 19.3, 0.81, 5.3, 28.3, 33.7, 20.3, 11.3, 5.3, 5.3, 2.0, 17.0, 19.7, 93.0, -24.0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2]]}, {'name': 'MonthTeamDashboard', 'headers': ['GROUP_SET', 'GROUP_VALUE', 'SEASON_MONTH_NAME', 'GP', 'W', 'L', 'W_PCT', 'MIN', 'FGM', 'FGA', 'FG_PCT', 'FG3M', 'FG3A', 'FG3_PCT', 'FTM', 'FTA', 'FT_PCT', 'OREB', 'DREB', 'REB', 'AST', 'TOV', 'STL', 'BLK', 'BLKA', 'PF', 'PFD', 'PTS', 'PLUS_MINUS', 'GP_RANK', 'W_RANK', 'L_RANK', 'W_PCT_RANK', 'MIN_RANK', 'FGM_RANK', 'FGA_RANK', 'FG_PCT_RANK', 'FG3M_RANK', 'FG3A_RANK', 'FG3_PCT_RANK', 'FTM_RANK', 'FTA_RANK', 'FT_PCT_RANK', 'OREB_RANK', 'DREB_RANK', 'REB_RANK', 'AST_RANK', 'TOV_RANK', 'STL_RANK', 'BLK_RANK', 'BLKA_RANK', 'PF_RANK', 'PFD_RANK', 'PTS_RANK', 'PLUS_MINUS_RANK'], 'rowSet': [['Month', 'April', 'April', 4, 3, 1, 0.75, 48.0, 37.8, 82.5, 0.458, 14.8, 38.8, 0.381, 15.0, 19.0, 0.789, 9.3, 33.8, 43.0, 22.8, 10.3, 6.0, 5.8, 1.8, 15.8, 16.8, 105.3, 11.0, 3, 3, 1, 3, 2, 2, 3, 2, 1, 3, 1, 2, 2, 3, 2, 2, 2, 3, 1, 3, 1, 1, 2, 3, 2, 1], ['Month', 'May', 'May', 10, 9, 1, 0.9, 48.5, 41.4, 84.6, 0.489, 14.6, 40.2, 0.363, 16.4, 20.5, 0.8, 10.2, 33.8, 44.0, 24.0, 12.0, 6.4, 5.2, 2.4, 15.1, 18.8, 113.8, 9.7, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 1, 2, 3, 1, 3, 3, 1, 1, 1, 2], ['Month', 'June', 'June', 5, 4, 1, 0.8, 48.0, 36.4, 83.4, 0.436, 14.0, 41.4, 0.338, 14.8, 17.2, 0.86, 9.0, 32.2, 41.2, 24.2, 11.4, 6.2, 5.4, 2.2, 16.8, 17.4, 101.6, 2.4, 2, 2, 1, 2, 2, 3, 2, 3, 3, 1, 3, 3, 3, 1, 3, 3, 3, 1, 2, 2, 2, 2, 3, 2, 3, 3]]}, {'name': 'PrePostAllStarTeamDashboard', 'headers': ['GROUP_SET', 'GROUP_VALUE', 'SEASON_SEGMENT', 'GP', 'W', 'L', 'W_PCT', 'MIN', 'FGM', 'FGA', 'FG_PCT', 'FG3M', 'FG3A', 'FG3_PCT', 'FTM', 'FTA', 'FT_PCT', 'OREB', 'DREB', 'REB', 'AST', 'TOV', 'STL', 'BLK', 'BLKA', 'PF', 'PFD', 'PTS', 'PLUS_MINUS', 'GP_RANK', 'W_RANK', 'L_RANK', 'W_PCT_RANK', 'MIN_RANK', 'FGM_RANK', 'FGA_RANK', 'FG_PCT_RANK', 'FG3M_RANK', 'FG3A_RANK', 'FG3_PCT_RANK', 'FTM_RANK', 'FTA_RANK', 'FT_PCT_RANK', 'OREB_RANK', 'DREB_RANK', 'REB_RANK', 'AST_RANK', 'TOV_RANK', 'STL_RANK', 'BLK_RANK', 'BLKA_RANK', 'PF_RANK', 'PFD_RANK', 'PTS_RANK', 'PLUS_MINUS_RANK'], 'rowSet': [['Pre/Post All-Star', 'Playoffs', 'Playoffs', 19, 16, 3, 0.842, 48.3, 39.3, 83.8, 0.469, 14.5, 40.2, 0.36, 15.7, 19.3, 0.812, 9.7, 33.4, 43.1, 23.8, 11.5, 6.3, 5.4, 2.2, 15.7, 18.0, 108.8, 8.1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]}, {'name': 'DaysRestTeamDashboard', 'headers': ['GROUP_SET', 'GROUP_VALUE', 'TEAM_DAYS_REST_RANGE', 'GP', 'W', 'L', 'W_PCT', 'MIN', 'FGM', 'FGA', 'FG_PCT', 'FG3M', 'FG3A', 'FG3_PCT', 'FTM', 'FTA', 'FT_PCT', 'OREB', 'DREB', 'REB', 'AST', 'TOV', 'STL', 'BLK', 'BLKA', 'PF', 'PFD', 'PTS', 'PLUS_MINUS', 'GP_RANK', 'W_RANK', 'L_RANK', 'W_PCT_RANK', 'MIN_RANK', 'FGM_RANK', 'FGA_RANK', 'FG_PCT_RANK', 'FG3M_RANK', 'FG3A_RANK', 'FG3_PCT_RANK', 'FTM_RANK', 'FTA_RANK', 'FT_PCT_RANK', 'OREB_RANK', 'DREB_RANK', 'REB_RANK', 'AST_RANK', 'TOV_RANK', 'STL_RANK', 'BLK_RANK', 'BLKA_RANK', 'PF_RANK', 'PFD_RANK', 'PTS_RANK', 'PLUS_MINUS_RANK'], 'rowSet': [['Days Rest', '1 Days Rest', '1 Days Rest', 10, 8, 2, 0.8, 48.0, 38.7, 82.1, 0.471, 14.1, 38.9, 0.362, 15.6, 19.2, 0.813, 9.1, 32.8, 41.9, 22.7, 12.1, 5.8, 4.8, 2.2, 16.2, 18.2, 107.1, 4.3, 1, 1, 4, 3, 2, 3, 3, 3, 3, 3, 3, 3, 2, 3, 4, 3, 4, 4, 3, 4, 4, 2, 3, 2, 3, 4], ['Days Rest', '2 Days Rest', '2 Days Rest', 5, 4, 1, 0.8, 48.0, 38.0, 83.4, 0.456, 12.6, 38.6, 0.326, 15.8, 19.2, 0.823, 9.4, 32.6, 42.0, 24.6, 9.6, 7.2, 5.4, 2.2, 16.4, 18.0, 104.4, 8.4, 2, 2, 3, 3, 2, 4, 2, 4, 4, 4, 4, 2, 2, 1, 3, 4, 3, 3, 1, 1, 3, 2, 4, 3, 4, 3], ['Days Rest', '5 Days Rest', '5 Days Rest', 2, 2, 0, 1.0, 50.5, 46.0, 95.5, 0.482, 16.5, 45.5, 0.363, 18.0, 22.0, 0.818, 13.0, 36.0, 49.0, 26.0, 12.0, 6.5, 6.0, 3.5, 14.0, 20.5, 126.5, 15.0, 3, 3, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 2, 4, 2, 1, 1, 2], ['Days Rest', '6+ Days Rest', '6+ Days Rest', 2, 2, 0, 1.0, 48.0, 39.0, 82.0, 0.476, 19.0, 45.5, 0.418, 13.5, 17.5, 0.771, 10.0, 35.5, 45.5, 25.0, 12.5, 6.0, 7.5, 1.0, 13.0, 14.5, 110.5, 19.0, 3, 3, 1, 1, 2, 2, 4, 2, 1, 1, 1, 4, 4, 4, 2, 2, 2, 2, 4, 3, 1, 1, 1, 4, 2, 1]]}]} Hope this helps! |
NBA API Version
v1.4.1
Issue
TeamDashboardByGeneralSplits seems to be pulling odd data, or filling in data in the wrong fields. IE PPG = Point differential, which should not be.
Code
import pandas as pd
import requests
from nba_api.stats.endpoints import scoreboardv2
import datetime
from nba_api.stats.endpoints import teamdashboardbygeneralsplits
dallas = '1610612742'
boston = '1610612738'
sb = scoreboardv2.ScoreboardV2(league_id="00", game_date="2024-06-14", day_offset="0").game_header.get_dict()
scoreframe = pd.DataFrame(sb['data'], columns=sb['headers'])
stats= teamdashboardbygeneralsplits.TeamDashboardByGeneralSplits(measure_type_detailed_defense='Base', per_mode_detailed='PerGame', plus_minus='Y', season_type_all_star='Playoffs', team_id=boston).get_dict()
stats
-check stats output
The text was updated successfully, but these errors were encountered: