diff --git a/R/nba_stats_boxscore_v3.R b/R/nba_stats_boxscore_v3.R index 8559481b..8d184b8c 100644 --- a/R/nba_stats_boxscore_v3.R +++ b/R/nba_stats_boxscore_v3.R @@ -500,6 +500,173 @@ NULL #' @param ... Additional arguments passed to an underlying function like httr. #' @return A list of data frames: home_team_player_advanced, away_team_player_advanced, #' home_team_totals_advanced, away_team_totals_advanced +#' +#' **home_team_player_advanced** +#' +#' +#' |col_name |types | +#' |:-------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |person_id |integer | +#' |first_name |character | +#' |family_name |character | +#' |name_i |character | +#' |player_slug |character | +#' |position |character | +#' |comment |character | +#' |jersey_num |character | +#' |minutes |character | +#' |estimated_offensive_rating |numeric | +#' |offensive_rating |numeric | +#' |estimated_defensive_rating |numeric | +#' |defensive_rating |numeric | +#' |estimated_net_rating |numeric | +#' |net_rating |numeric | +#' |assist_percentage |numeric | +#' |assist_to_turnover |numeric | +#' |assist_ratio |numeric | +#' |offensive_rebound_percentage |numeric | +#' |defensive_rebound_percentage |numeric | +#' |rebound_percentage |numeric | +#' |turnover_ratio |numeric | +#' |effective_field_goal_percentage |numeric | +#' |true_shooting_percentage |numeric | +#' |usage_percentage |numeric | +#' |estimated_usage_percentage |numeric | +#' |estimated_pace |numeric | +#' |pace |numeric | +#' |pace_per40 |numeric | +#' |possessions |numeric | +#' |pie |numeric | +#' +#' **away_team_player_advanced** +#' +#' +#' |col_name |types | +#' |:-------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |person_id |integer | +#' |first_name |character | +#' |family_name |character | +#' |name_i |character | +#' |player_slug |character | +#' |position |character | +#' |comment |character | +#' |jersey_num |character | +#' |minutes |character | +#' |estimated_offensive_rating |numeric | +#' |offensive_rating |numeric | +#' |estimated_defensive_rating |numeric | +#' |defensive_rating |numeric | +#' |estimated_net_rating |numeric | +#' |net_rating |numeric | +#' |assist_percentage |numeric | +#' |assist_to_turnover |numeric | +#' |assist_ratio |numeric | +#' |offensive_rebound_percentage |numeric | +#' |defensive_rebound_percentage |numeric | +#' |rebound_percentage |numeric | +#' |turnover_ratio |numeric | +#' |effective_field_goal_percentage |numeric | +#' |true_shooting_percentage |numeric | +#' |usage_percentage |numeric | +#' |estimated_usage_percentage |numeric | +#' |estimated_pace |numeric | +#' |pace |numeric | +#' |pace_per40 |numeric | +#' |possessions |numeric | +#' |pie |numeric | +#' +#' **home_team_totals_advanced** +#' +#' +#' |col_name |types | +#' |:----------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |minutes |character | +#' |estimated_offensive_rating |numeric | +#' |offensive_rating |numeric | +#' |estimated_defensive_rating |numeric | +#' |defensive_rating |numeric | +#' |estimated_net_rating |numeric | +#' |net_rating |numeric | +#' |assist_percentage |numeric | +#' |assist_to_turnover |numeric | +#' |assist_ratio |numeric | +#' |offensive_rebound_percentage |numeric | +#' |defensive_rebound_percentage |numeric | +#' |rebound_percentage |numeric | +#' |estimated_team_turnover_percentage |numeric | +#' |turnover_ratio |numeric | +#' |effective_field_goal_percentage |numeric | +#' |true_shooting_percentage |numeric | +#' |usage_percentage |numeric | +#' |estimated_usage_percentage |numeric | +#' |estimated_pace |numeric | +#' |pace |numeric | +#' |pace_per40 |numeric | +#' |possessions |numeric | +#' |pie |numeric | +#' +#' **away_team_totals_advanced** +#' +#' +#' |col_name |types | +#' |:----------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |minutes |character | +#' |estimated_offensive_rating |numeric | +#' |offensive_rating |numeric | +#' |estimated_defensive_rating |numeric | +#' |defensive_rating |numeric | +#' |estimated_net_rating |numeric | +#' |net_rating |numeric | +#' |assist_percentage |numeric | +#' |assist_to_turnover |numeric | +#' |assist_ratio |numeric | +#' |offensive_rebound_percentage |numeric | +#' |defensive_rebound_percentage |numeric | +#' |rebound_percentage |numeric | +#' |estimated_team_turnover_percentage |numeric | +#' |turnover_ratio |numeric | +#' |effective_field_goal_percentage |numeric | +#' |true_shooting_percentage |numeric | +#' |usage_percentage |numeric | +#' |estimated_usage_percentage |numeric | +#' |estimated_pace |numeric | +#' |pace |numeric | +#' |pace_per40 |numeric | +#' |possessions |numeric | +#' |pie |numeric | +#' #' @importFrom jsonlite fromJSON toJSON #' @importFrom dplyr filter select rename bind_cols bind_rows as_tibble #' @import rvest @@ -652,6 +819,131 @@ NULL #' @param ... Additional arguments passed to an underlying function like httr. #' @return A list of data frames: home_team_player_misc, away_team_player_misc, #' home_team_totals_misc, away_team_totals_misc +#' +#' **home_team_player_misc** +#' +#' +#' |col_name |types | +#' |:------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |person_id |integer | +#' |first_name |character | +#' |family_name |character | +#' |name_i |character | +#' |player_slug |character | +#' |position |character | +#' |comment |character | +#' |jersey_num |character | +#' |minutes |character | +#' |points_off_turnovers |integer | +#' |points_second_chance |integer | +#' |points_fast_break |integer | +#' |points_paint |integer | +#' |opp_points_off_turnovers |integer | +#' |opp_points_second_chance |integer | +#' |opp_points_fast_break |integer | +#' |opp_points_paint |integer | +#' |blocks |integer | +#' |blocks_against |integer | +#' |fouls_personal |integer | +#' |fouls_drawn |integer | +#' +#' **away_team_player_misc** +#' +#' +#' |col_name |types | +#' |:------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |person_id |integer | +#' |first_name |character | +#' |family_name |character | +#' |name_i |character | +#' |player_slug |character | +#' |position |character | +#' |comment |character | +#' |jersey_num |character | +#' |minutes |character | +#' |points_off_turnovers |integer | +#' |points_second_chance |integer | +#' |points_fast_break |integer | +#' |points_paint |integer | +#' |opp_points_off_turnovers |integer | +#' |opp_points_second_chance |integer | +#' |opp_points_fast_break |integer | +#' |opp_points_paint |integer | +#' |blocks |integer | +#' |blocks_against |integer | +#' |fouls_personal |integer | +#' |fouls_drawn |integer | +#' +#' **home_team_totals_misc** +#' +#' +#' |col_name |types | +#' |:------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |minutes |character | +#' |points_off_turnovers |integer | +#' |points_second_chance |integer | +#' |points_fast_break |integer | +#' |points_paint |integer | +#' |opp_points_off_turnovers |integer | +#' |opp_points_second_chance |integer | +#' |opp_points_fast_break |integer | +#' |opp_points_paint |integer | +#' |blocks |integer | +#' |blocks_against |integer | +#' |fouls_personal |integer | +#' |fouls_drawn |integer | +#' +#' **away_team_totals_misc** +#' +#' +#' |col_name |types | +#' |:------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |minutes |character | +#' |points_off_turnovers |integer | +#' |points_second_chance |integer | +#' |points_fast_break |integer | +#' |points_paint |integer | +#' |opp_points_off_turnovers |integer | +#' |opp_points_second_chance |integer | +#' |opp_points_fast_break |integer | +#' |opp_points_paint |integer | +#' |blocks |integer | +#' |blocks_against |integer | +#' |fouls_personal |integer | +#' |fouls_drawn |integer | +#' #' @importFrom jsonlite fromJSON toJSON #' @importFrom dplyr filter select rename bind_cols bind_rows as_tibble #' @import rvest @@ -803,6 +1095,143 @@ NULL #' @param ... Additional arguments passed to an underlying function like httr. #' @return A list of data frames: home_team_player_scoring, away_team_player_scoring, #' home_team_totals_scoring, away_team_totals_scoring +#' +#' **home_team_player_scoring** +#' +#' +#' |col_name |types | +#' |:-----------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |person_id |integer | +#' |first_name |character | +#' |family_name |character | +#' |name_i |character | +#' |player_slug |character | +#' |position |character | +#' |comment |character | +#' |jersey_num |character | +#' |minutes |character | +#' |percentage_field_goals_attempted2pt |numeric | +#' |percentage_field_goals_attempted3pt |numeric | +#' |percentage_points2pt |numeric | +#' |percentage_points_midrange2pt |numeric | +#' |percentage_points3pt |numeric | +#' |percentage_points_fast_break |numeric | +#' |percentage_points_free_throw |numeric | +#' |percentage_points_off_turnovers |numeric | +#' |percentage_points_paint |numeric | +#' |percentage_assisted2pt |numeric | +#' |percentage_unassisted2pt |numeric | +#' |percentage_assisted3pt |numeric | +#' |percentage_unassisted3pt |numeric | +#' |percentage_assisted_fgm |numeric | +#' |percentage_unassisted_fgm |numeric | +#' +#' **away_team_player_scoring** +#' +#' +#' |col_name |types | +#' |:-----------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |person_id |integer | +#' |first_name |character | +#' |family_name |character | +#' |name_i |character | +#' |player_slug |character | +#' |position |character | +#' |comment |character | +#' |jersey_num |character | +#' |minutes |character | +#' |percentage_field_goals_attempted2pt |numeric | +#' |percentage_field_goals_attempted3pt |numeric | +#' |percentage_points2pt |numeric | +#' |percentage_points_midrange2pt |numeric | +#' |percentage_points3pt |numeric | +#' |percentage_points_fast_break |numeric | +#' |percentage_points_free_throw |numeric | +#' |percentage_points_off_turnovers |numeric | +#' |percentage_points_paint |numeric | +#' |percentage_assisted2pt |numeric | +#' |percentage_unassisted2pt |numeric | +#' |percentage_assisted3pt |numeric | +#' |percentage_unassisted3pt |numeric | +#' |percentage_assisted_fgm |numeric | +#' |percentage_unassisted_fgm |numeric | +#' +#' **home_team_totals_scoring** +#' +#' +#' |col_name |types | +#' |:-----------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |minutes |character | +#' |percentage_field_goals_attempted2pt |numeric | +#' |percentage_field_goals_attempted3pt |numeric | +#' |percentage_points2pt |numeric | +#' |percentage_points_midrange2pt |numeric | +#' |percentage_points3pt |numeric | +#' |percentage_points_fast_break |numeric | +#' |percentage_points_free_throw |numeric | +#' |percentage_points_off_turnovers |numeric | +#' |percentage_points_paint |numeric | +#' |percentage_assisted2pt |numeric | +#' |percentage_unassisted2pt |numeric | +#' |percentage_assisted3pt |numeric | +#' |percentage_unassisted3pt |numeric | +#' |percentage_assisted_fgm |numeric | +#' |percentage_unassisted_fgm |numeric | +#' +#' **away_team_totals_scoring** +#' +#' +#' |col_name |types | +#' |:-----------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |minutes |character | +#' |percentage_field_goals_attempted2pt |numeric | +#' |percentage_field_goals_attempted3pt |numeric | +#' |percentage_points2pt |numeric | +#' |percentage_points_midrange2pt |numeric | +#' |percentage_points3pt |numeric | +#' |percentage_points_fast_break |numeric | +#' |percentage_points_free_throw |numeric | +#' |percentage_points_off_turnovers |numeric | +#' |percentage_points_paint |numeric | +#' |percentage_assisted2pt |numeric | +#' |percentage_unassisted2pt |numeric | +#' |percentage_assisted3pt |numeric | +#' |percentage_unassisted3pt |numeric | +#' |percentage_assisted_fgm |numeric | +#' |percentage_unassisted_fgm |numeric | +#' #' @importFrom jsonlite fromJSON toJSON #' @importFrom dplyr filter select rename bind_cols bind_rows as_tibble #' @import rvest @@ -954,6 +1383,155 @@ NULL #' @param ... Additional arguments passed to an underlying function like httr. #' @return A list of data frames: home_team_player_usage, away_team_player_usage, #' home_team_totals_usage, away_team_totals_usage +#' +#' **home_team_player_usage** +#' +#' +#' |col_name |types | +#' |:-----------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |person_id |integer | +#' |first_name |character | +#' |family_name |character | +#' |name_i |character | +#' |player_slug |character | +#' |position |character | +#' |comment |character | +#' |jersey_num |character | +#' |minutes |character | +#' |usage_percentage |numeric | +#' |percentage_field_goals_made |numeric | +#' |percentage_field_goals_attempted |numeric | +#' |percentage_three_pointers_made |numeric | +#' |percentage_three_pointers_attempted |numeric | +#' |percentage_free_throws_made |numeric | +#' |percentage_free_throws_attempted |numeric | +#' |percentage_rebounds_offensive |numeric | +#' |percentage_rebounds_defensive |numeric | +#' |percentage_rebounds_total |numeric | +#' |percentage_assists |numeric | +#' |percentage_turnovers |numeric | +#' |percentage_steals |numeric | +#' |percentage_blocks |numeric | +#' |percentage_blocks_allowed |numeric | +#' |percentage_personal_fouls |numeric | +#' |percentage_personal_fouls_drawn |numeric | +#' |percentage_points |numeric | +#' +#' **away_team_player_usage** +#' +#' +#' |col_name |types | +#' |:-----------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |person_id |integer | +#' |first_name |character | +#' |family_name |character | +#' |name_i |character | +#' |player_slug |character | +#' |position |character | +#' |comment |character | +#' |jersey_num |character | +#' |minutes |character | +#' |usage_percentage |numeric | +#' |percentage_field_goals_made |numeric | +#' |percentage_field_goals_attempted |numeric | +#' |percentage_three_pointers_made |numeric | +#' |percentage_three_pointers_attempted |numeric | +#' |percentage_free_throws_made |numeric | +#' |percentage_free_throws_attempted |numeric | +#' |percentage_rebounds_offensive |numeric | +#' |percentage_rebounds_defensive |numeric | +#' |percentage_rebounds_total |numeric | +#' |percentage_assists |numeric | +#' |percentage_turnovers |numeric | +#' |percentage_steals |numeric | +#' |percentage_blocks |numeric | +#' |percentage_blocks_allowed |numeric | +#' |percentage_personal_fouls |numeric | +#' |percentage_personal_fouls_drawn |numeric | +#' |percentage_points |numeric | +#' +#' **home_team_totals_usage** +#' +#' +#' |col_name |types | +#' |:-----------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |minutes |character | +#' |usage_percentage |numeric | +#' |percentage_field_goals_made |numeric | +#' |percentage_field_goals_attempted |numeric | +#' |percentage_three_pointers_made |numeric | +#' |percentage_three_pointers_attempted |numeric | +#' |percentage_free_throws_made |numeric | +#' |percentage_free_throws_attempted |numeric | +#' |percentage_rebounds_offensive |numeric | +#' |percentage_rebounds_defensive |numeric | +#' |percentage_rebounds_total |numeric | +#' |percentage_assists |numeric | +#' |percentage_turnovers |numeric | +#' |percentage_steals |numeric | +#' |percentage_blocks |numeric | +#' |percentage_blocks_allowed |numeric | +#' |percentage_personal_fouls |numeric | +#' |percentage_personal_fouls_drawn |numeric | +#' |percentage_points |numeric | +#' +#' **away_team_totals_usage** +#' +#' +#' |col_name |types | +#' |:-----------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |minutes |character | +#' |usage_percentage |numeric | +#' |percentage_field_goals_made |numeric | +#' |percentage_field_goals_attempted |numeric | +#' |percentage_three_pointers_made |numeric | +#' |percentage_three_pointers_attempted |numeric | +#' |percentage_free_throws_made |numeric | +#' |percentage_free_throws_attempted |numeric | +#' |percentage_rebounds_offensive |numeric | +#' |percentage_rebounds_defensive |numeric | +#' |percentage_rebounds_total |numeric | +#' |percentage_assists |numeric | +#' |percentage_turnovers |numeric | +#' |percentage_steals |numeric | +#' |percentage_blocks |numeric | +#' |percentage_blocks_allowed |numeric | +#' |percentage_personal_fouls |numeric | +#' |percentage_personal_fouls_drawn |numeric | +#' |percentage_points |numeric | +#' #' @importFrom jsonlite fromJSON toJSON #' @importFrom dplyr filter select rename bind_cols bind_rows as_tibble #' @import rvest @@ -1106,6 +1684,115 @@ NULL #' @return A list of data frames: home_team_player_four_factors, #' away_team_player_four_factors, home_team_totals_four_factors, #' away_team_totals_four_factors +#' +#' **home_team_player_four_factors** +#' +#' +#' |col_name |types | +#' |:-----------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |person_id |integer | +#' |first_name |character | +#' |family_name |character | +#' |name_i |character | +#' |player_slug |character | +#' |position |character | +#' |comment |character | +#' |jersey_num |character | +#' |minutes |character | +#' |effective_field_goal_percentage |numeric | +#' |free_throw_attempt_rate |numeric | +#' |team_turnover_percentage |numeric | +#' |offensive_rebound_percentage |numeric | +#' |opp_effective_field_goal_percentage |numeric | +#' |opp_free_throw_attempt_rate |numeric | +#' |opp_team_turnover_percentage |numeric | +#' |opp_offensive_rebound_percentage |numeric | +#' +#' **away_team_player_four_factors** +#' +#' +#' |col_name |types | +#' |:-----------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |person_id |integer | +#' |first_name |character | +#' |family_name |character | +#' |name_i |character | +#' |player_slug |character | +#' |position |character | +#' |comment |character | +#' |jersey_num |character | +#' |minutes |character | +#' |effective_field_goal_percentage |numeric | +#' |free_throw_attempt_rate |numeric | +#' |team_turnover_percentage |numeric | +#' |offensive_rebound_percentage |numeric | +#' |opp_effective_field_goal_percentage |numeric | +#' |opp_free_throw_attempt_rate |numeric | +#' |opp_team_turnover_percentage |numeric | +#' |opp_offensive_rebound_percentage |numeric | +#' +#' **home_team_totals_four_factors** +#' +#' +#' |col_name |types | +#' |:-----------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |minutes |character | +#' |effective_field_goal_percentage |numeric | +#' |free_throw_attempt_rate |numeric | +#' |team_turnover_percentage |numeric | +#' |offensive_rebound_percentage |numeric | +#' |opp_effective_field_goal_percentage |numeric | +#' |opp_free_throw_attempt_rate |numeric | +#' |opp_team_turnover_percentage |numeric | +#' |opp_offensive_rebound_percentage |numeric | +#' +#' **away_team_totals_four_factors** +#' +#' +#' |col_name |types | +#' |:-----------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |minutes |character | +#' |effective_field_goal_percentage |numeric | +#' |free_throw_attempt_rate |numeric | +#' |team_turnover_percentage |numeric | +#' |offensive_rebound_percentage |numeric | +#' |opp_effective_field_goal_percentage |numeric | +#' |opp_free_throw_attempt_rate |numeric | +#' |opp_team_turnover_percentage |numeric | +#' |opp_offensive_rebound_percentage |numeric | +#' #' @importFrom jsonlite fromJSON toJSON #' @importFrom dplyr filter select rename bind_cols bind_rows as_tibble #' @import rvest @@ -1257,6 +1944,161 @@ NULL #' @param ... Additional arguments passed to an underlying function like httr. #' @return A list of data frames: home_team_player_player_track, away_team_player_player_track, #' home_team_totals_player_track, away_team_totals_player_track +#' +#' **home_team_player_player_track** +#' +#' +#' |col_name |types | +#' |:-------------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |person_id |integer | +#' |first_name |character | +#' |family_name |character | +#' |name_i |character | +#' |player_slug |character | +#' |position |character | +#' |comment |character | +#' |jersey_num |character | +#' |minutes |character | +#' |speed |numeric | +#' |distance |numeric | +#' |rebound_chances_offensive |integer | +#' |rebound_chances_defensive |integer | +#' |rebound_chances_total |integer | +#' |touches |integer | +#' |secondary_assists |integer | +#' |free_throw_assists |integer | +#' |passes |integer | +#' |assists |integer | +#' |contested_field_goals_made |integer | +#' |contested_field_goals_attempted |integer | +#' |contested_field_goal_percentage |numeric | +#' |uncontested_field_goals_made |integer | +#' |uncontested_field_goals_attempted |integer | +#' |uncontested_field_goals_percentage |numeric | +#' |field_goal_percentage |numeric | +#' |defended_at_rim_field_goals_made |integer | +#' |defended_at_rim_field_goals_attempted |integer | +#' |defended_at_rim_field_goal_percentage |numeric | +#' +#' **away_team_player_player_track** +#' +#' +#' |col_name |types | +#' |:-------------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |person_id |integer | +#' |first_name |character | +#' |family_name |character | +#' |name_i |character | +#' |player_slug |character | +#' |position |character | +#' |comment |character | +#' |jersey_num |character | +#' |minutes |character | +#' |speed |numeric | +#' |distance |numeric | +#' |rebound_chances_offensive |integer | +#' |rebound_chances_defensive |integer | +#' |rebound_chances_total |integer | +#' |touches |integer | +#' |secondary_assists |integer | +#' |free_throw_assists |integer | +#' |passes |integer | +#' |assists |integer | +#' |contested_field_goals_made |integer | +#' |contested_field_goals_attempted |integer | +#' |contested_field_goal_percentage |numeric | +#' |uncontested_field_goals_made |integer | +#' |uncontested_field_goals_attempted |integer | +#' |uncontested_field_goals_percentage |numeric | +#' |field_goal_percentage |numeric | +#' |defended_at_rim_field_goals_made |integer | +#' |defended_at_rim_field_goals_attempted |integer | +#' |defended_at_rim_field_goal_percentage |numeric | +#' +#' **home_team_totals_player_track** +#' +#' +#' |col_name |types | +#' |:-------------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |minutes |character | +#' |distance |numeric | +#' |rebound_chances_offensive |integer | +#' |rebound_chances_defensive |integer | +#' |rebound_chances_total |integer | +#' |touches |integer | +#' |secondary_assists |integer | +#' |free_throw_assists |integer | +#' |passes |integer | +#' |assists |integer | +#' |contested_field_goals_made |integer | +#' |contested_field_goals_attempted |integer | +#' |contested_field_goal_percentage |numeric | +#' |uncontested_field_goals_made |integer | +#' |uncontested_field_goals_attempted |integer | +#' |uncontested_field_goals_percentage |numeric | +#' |field_goal_percentage |numeric | +#' |defended_at_rim_field_goals_made |integer | +#' |defended_at_rim_field_goals_attempted |integer | +#' |defended_at_rim_field_goal_percentage |numeric | +#' +#' **away_team_totals_player_track** +#' +#' +#' |col_name |types | +#' |:-------------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |minutes |character | +#' |distance |numeric | +#' |rebound_chances_offensive |integer | +#' |rebound_chances_defensive |integer | +#' |rebound_chances_total |integer | +#' |touches |integer | +#' |secondary_assists |integer | +#' |free_throw_assists |integer | +#' |passes |integer | +#' |assists |integer | +#' |contested_field_goals_made |integer | +#' |contested_field_goals_attempted |integer | +#' |contested_field_goal_percentage |numeric | +#' |uncontested_field_goals_made |integer | +#' |uncontested_field_goals_attempted |integer | +#' |uncontested_field_goals_percentage |numeric | +#' |field_goal_percentage |numeric | +#' |defended_at_rim_field_goals_made |integer | +#' |defended_at_rim_field_goals_attempted |integer | +#' |defended_at_rim_field_goal_percentage |numeric | +#' #' @importFrom jsonlite fromJSON toJSON #' @importFrom dplyr filter select rename bind_cols bind_rows as_tibble #' @import rvest @@ -1407,6 +2249,115 @@ NULL #' @param range_type range_type #' @param ... Additional arguments passed to an underlying function like httr. #' @return A list of data frames: home_team_player_matchups, away_team_player_matchups +#' +#' **home_team_player_matchups** +#' +#' +#' |col_name |types | +#' |:---------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |person_id |integer | +#' |first_name |character | +#' |family_name |character | +#' |name_i |character | +#' |player_slug |character | +#' |position |character | +#' |comment |character | +#' |jersey_num |character | +#' |matchups_person_id |integer | +#' |matchups_first_name |character | +#' |matchups_family_name |character | +#' |matchups_name_i |character | +#' |matchups_player_slug |character | +#' |matchups_jersey_num |character | +#' |matchup_minutes |character | +#' |matchup_minutes_sort |numeric | +#' |partial_possessions |numeric | +#' |percentage_defender_total_time |numeric | +#' |percentage_offensive_total_time |numeric | +#' |percentage_total_time_both_on |numeric | +#' |switches_on |integer | +#' |player_points |integer | +#' |team_points |integer | +#' |matchup_assists |integer | +#' |matchup_potential_assists |integer | +#' |matchup_turnovers |integer | +#' |matchup_blocks |integer | +#' |matchup_field_goals_made |integer | +#' |matchup_field_goals_attempted |integer | +#' |matchup_field_goals_percentage |numeric | +#' |matchup_three_pointers_made |integer | +#' |matchup_three_pointers_attempted |integer | +#' |matchup_three_pointers_percentage |numeric | +#' |help_blocks |integer | +#' |help_field_goals_made |integer | +#' |help_field_goals_attempted |integer | +#' |help_field_goals_percentage |numeric | +#' |matchup_free_throws_made |integer | +#' |matchup_free_throws_attempted |integer | +#' |shooting_fouls |integer | +#' +#' **away_team_player_matchups** +#' +#' +#' |col_name |types | +#' |:---------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |person_id |integer | +#' |first_name |character | +#' |family_name |character | +#' |name_i |character | +#' |player_slug |character | +#' |position |character | +#' |comment |character | +#' |jersey_num |character | +#' |matchups_person_id |integer | +#' |matchups_first_name |character | +#' |matchups_family_name |character | +#' |matchups_name_i |character | +#' |matchups_player_slug |character | +#' |matchups_jersey_num |character | +#' |matchup_minutes |character | +#' |matchup_minutes_sort |numeric | +#' |partial_possessions |numeric | +#' |percentage_defender_total_time |numeric | +#' |percentage_offensive_total_time |numeric | +#' |percentage_total_time_both_on |numeric | +#' |switches_on |integer | +#' |player_points |integer | +#' |team_points |integer | +#' |matchup_assists |integer | +#' |matchup_potential_assists |integer | +#' |matchup_turnovers |integer | +#' |matchup_blocks |integer | +#' |matchup_field_goals_made |integer | +#' |matchup_field_goals_attempted |integer | +#' |matchup_field_goals_percentage |numeric | +#' |matchup_three_pointers_made |integer | +#' |matchup_three_pointers_attempted |integer | +#' |matchup_three_pointers_percentage |numeric | +#' |help_blocks |integer | +#' |help_field_goals_made |integer | +#' |help_field_goals_attempted |integer | +#' |help_field_goals_percentage |numeric | +#' |matchup_free_throws_made |integer | +#' |matchup_free_throws_attempted |integer | +#' |shooting_fouls |integer | +#' #' @importFrom jsonlite fromJSON toJSON #' @importFrom dplyr filter select rename bind_cols bind_rows as_tibble #' @import rvest @@ -1531,6 +2482,147 @@ NULL #' @param ... Additional arguments passed to an underlying function like httr. #' @return Returns a named list of data frames: home_team_player_hustle, away_team_player_hustle, #' home_team_hustle_totals, away_team_hustle_totals +#' +#' **home_team_player_hustle** +#' +#' +#' |col_name |types | +#' |:-------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |person_id |integer | +#' |first_name |character | +#' |family_name |character | +#' |name_i |character | +#' |player_slug |character | +#' |position |character | +#' |comment |character | +#' |jersey_num |character | +#' |minutes |character | +#' |points |integer | +#' |contested_shots |integer | +#' |contested_shots2pt |integer | +#' |contested_shots3pt |integer | +#' |deflections |integer | +#' |charges_drawn |integer | +#' |screen_assists |integer | +#' |screen_assist_points |integer | +#' |loose_balls_recovered_offensive |integer | +#' |loose_balls_recovered_defensive |integer | +#' |loose_balls_recovered_total |integer | +#' |offensive_box_outs |integer | +#' |defensive_box_outs |integer | +#' |box_out_player_team_rebounds |integer | +#' |box_out_player_rebounds |integer | +#' |box_outs |integer | +#' +#' **away_team_player_hustle** +#' +#' +#' |col_name |types | +#' |:-------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |person_id |integer | +#' |first_name |character | +#' |family_name |character | +#' |name_i |character | +#' |player_slug |character | +#' |position |character | +#' |comment |character | +#' |jersey_num |character | +#' |minutes |character | +#' |points |integer | +#' |contested_shots |integer | +#' |contested_shots2pt |integer | +#' |contested_shots3pt |integer | +#' |deflections |integer | +#' |charges_drawn |integer | +#' |screen_assists |integer | +#' |screen_assist_points |integer | +#' |loose_balls_recovered_offensive |integer | +#' |loose_balls_recovered_defensive |integer | +#' |loose_balls_recovered_total |integer | +#' |offensive_box_outs |integer | +#' |defensive_box_outs |integer | +#' |box_out_player_team_rebounds |integer | +#' |box_out_player_rebounds |integer | +#' |box_outs |integer | +#' +#' **home_team_totals_hustle** +#' +#' +#' |col_name |types | +#' |:-------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |minutes |character | +#' |points |integer | +#' |contested_shots |integer | +#' |contested_shots2pt |integer | +#' |contested_shots3pt |integer | +#' |deflections |integer | +#' |charges_drawn |integer | +#' |screen_assists |integer | +#' |screen_assist_points |integer | +#' |loose_balls_recovered_offensive |integer | +#' |loose_balls_recovered_defensive |integer | +#' |loose_balls_recovered_total |integer | +#' |offensive_box_outs |integer | +#' |defensive_box_outs |integer | +#' |box_out_player_team_rebounds |integer | +#' |box_out_player_rebounds |integer | +#' |box_outs |integer | +#' +#' **away_team_totals_hustle** +#' +#' +#' |col_name |types | +#' |:-------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |minutes |character | +#' |points |integer | +#' |contested_shots |integer | +#' |contested_shots2pt |integer | +#' |contested_shots3pt |integer | +#' |deflections |integer | +#' |charges_drawn |integer | +#' |screen_assists |integer | +#' |screen_assist_points |integer | +#' |loose_balls_recovered_offensive |integer | +#' |loose_balls_recovered_defensive |integer | +#' |loose_balls_recovered_total |integer | +#' |offensive_box_outs |integer | +#' |defensive_box_outs |integer | +#' |box_out_player_team_rebounds |integer | +#' |box_out_player_rebounds |integer | +#' |box_outs |integer | +#' #' @importFrom jsonlite fromJSON toJSON #' @importFrom dplyr filter select rename bind_cols bind_rows as_tibble #' @import rvest @@ -1670,6 +2762,109 @@ NULL #' @param ... Additional arguments passed to an underlying function like httr. #' @return A list of data frames: home_team_player_defensive, away_team_player_defensive, #' home_team_totals_defensive, away_team_totals_defensive +#' +#' **home_team_player_defensive** +#' +#' +#' |col_name |types | +#' |:--------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |person_id |integer | +#' |first_name |character | +#' |family_name |character | +#' |name_i |character | +#' |player_slug |character | +#' |position |character | +#' |comment |character | +#' |jersey_num |character | +#' |matchup_minutes |character | +#' |partial_possessions |numeric | +#' |switches_on |integer | +#' |player_points |integer | +#' |defensive_rebounds |integer | +#' |matchup_assists |integer | +#' |matchup_turnovers |integer | +#' |steals |integer | +#' |blocks |integer | +#' |matchup_field_goals_made |integer | +#' |matchup_field_goals_attempted |integer | +#' |matchup_field_goal_percentage |numeric | +#' |matchup_three_pointers_made |integer | +#' |matchup_three_pointers_attempted |integer | +#' |matchup_three_pointer_percentage |numeric | +#' +#' **away_team_player_defensive** +#' +#' +#' |col_name |types | +#' |:--------------------------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' |person_id |integer | +#' |first_name |character | +#' |family_name |character | +#' |name_i |character | +#' |player_slug |character | +#' |position |character | +#' |comment |character | +#' |jersey_num |character | +#' |matchup_minutes |character | +#' |partial_possessions |numeric | +#' |switches_on |integer | +#' |player_points |integer | +#' |defensive_rebounds |integer | +#' |matchup_assists |integer | +#' |matchup_turnovers |integer | +#' |steals |integer | +#' |blocks |integer | +#' |matchup_field_goals_made |integer | +#' |matchup_field_goals_attempted |integer | +#' |matchup_field_goal_percentage |numeric | +#' |matchup_three_pointers_made |integer | +#' |matchup_three_pointers_attempted |integer | +#' |matchup_three_pointer_percentage |numeric | +#' +#' **home_team_totals_defensive** +#' +#' +#' |col_name |types | +#' |:------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' +#' **away_team_totals_defensive** +#' +#' +#' |col_name |types | +#' |:------------|:---------| +#' |game_id |character | +#' |away_team_id |integer | +#' |home_team_id |integer | +#' |team_id |integer | +#' |team_name |character | +#' |team_city |character | +#' |team_tricode |character | +#' |team_slug |character | +#' #' @importFrom jsonlite fromJSON toJSON #' @importFrom dplyr filter select rename bind_cols bind_rows as_tibble #' @import rvest diff --git a/man/nba_boxscoreadvancedv3.Rd b/man/nba_boxscoreadvancedv3.Rd index d0b4183b..90ff33e6 100644 --- a/man/nba_boxscoreadvancedv3.Rd +++ b/man/nba_boxscoreadvancedv3.Rd @@ -32,6 +32,167 @@ nba_boxscoreadvancedv3( \value{ A list of data frames: home_team_player_advanced, away_team_player_advanced, home_team_totals_advanced, away_team_totals_advanced + +\strong{home_team_player_advanced}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + person_id \tab integer \cr + first_name \tab character \cr + family_name \tab character \cr + name_i \tab character \cr + player_slug \tab character \cr + position \tab character \cr + comment \tab character \cr + jersey_num \tab character \cr + minutes \tab character \cr + estimated_offensive_rating \tab numeric \cr + offensive_rating \tab numeric \cr + estimated_defensive_rating \tab numeric \cr + defensive_rating \tab numeric \cr + estimated_net_rating \tab numeric \cr + net_rating \tab numeric \cr + assist_percentage \tab numeric \cr + assist_to_turnover \tab numeric \cr + assist_ratio \tab numeric \cr + offensive_rebound_percentage \tab numeric \cr + defensive_rebound_percentage \tab numeric \cr + rebound_percentage \tab numeric \cr + turnover_ratio \tab numeric \cr + effective_field_goal_percentage \tab numeric \cr + true_shooting_percentage \tab numeric \cr + usage_percentage \tab numeric \cr + estimated_usage_percentage \tab numeric \cr + estimated_pace \tab numeric \cr + pace \tab numeric \cr + pace_per40 \tab numeric \cr + possessions \tab numeric \cr + pie \tab numeric \cr +} + + +\strong{away_team_player_advanced}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + person_id \tab integer \cr + first_name \tab character \cr + family_name \tab character \cr + name_i \tab character \cr + player_slug \tab character \cr + position \tab character \cr + comment \tab character \cr + jersey_num \tab character \cr + minutes \tab character \cr + estimated_offensive_rating \tab numeric \cr + offensive_rating \tab numeric \cr + estimated_defensive_rating \tab numeric \cr + defensive_rating \tab numeric \cr + estimated_net_rating \tab numeric \cr + net_rating \tab numeric \cr + assist_percentage \tab numeric \cr + assist_to_turnover \tab numeric \cr + assist_ratio \tab numeric \cr + offensive_rebound_percentage \tab numeric \cr + defensive_rebound_percentage \tab numeric \cr + rebound_percentage \tab numeric \cr + turnover_ratio \tab numeric \cr + effective_field_goal_percentage \tab numeric \cr + true_shooting_percentage \tab numeric \cr + usage_percentage \tab numeric \cr + estimated_usage_percentage \tab numeric \cr + estimated_pace \tab numeric \cr + pace \tab numeric \cr + pace_per40 \tab numeric \cr + possessions \tab numeric \cr + pie \tab numeric \cr +} + + +\strong{home_team_totals_advanced}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + minutes \tab character \cr + estimated_offensive_rating \tab numeric \cr + offensive_rating \tab numeric \cr + estimated_defensive_rating \tab numeric \cr + defensive_rating \tab numeric \cr + estimated_net_rating \tab numeric \cr + net_rating \tab numeric \cr + assist_percentage \tab numeric \cr + assist_to_turnover \tab numeric \cr + assist_ratio \tab numeric \cr + offensive_rebound_percentage \tab numeric \cr + defensive_rebound_percentage \tab numeric \cr + rebound_percentage \tab numeric \cr + estimated_team_turnover_percentage \tab numeric \cr + turnover_ratio \tab numeric \cr + effective_field_goal_percentage \tab numeric \cr + true_shooting_percentage \tab numeric \cr + usage_percentage \tab numeric \cr + estimated_usage_percentage \tab numeric \cr + estimated_pace \tab numeric \cr + pace \tab numeric \cr + pace_per40 \tab numeric \cr + possessions \tab numeric \cr + pie \tab numeric \cr +} + + +\strong{away_team_totals_advanced}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + minutes \tab character \cr + estimated_offensive_rating \tab numeric \cr + offensive_rating \tab numeric \cr + estimated_defensive_rating \tab numeric \cr + defensive_rating \tab numeric \cr + estimated_net_rating \tab numeric \cr + net_rating \tab numeric \cr + assist_percentage \tab numeric \cr + assist_to_turnover \tab numeric \cr + assist_ratio \tab numeric \cr + offensive_rebound_percentage \tab numeric \cr + defensive_rebound_percentage \tab numeric \cr + rebound_percentage \tab numeric \cr + estimated_team_turnover_percentage \tab numeric \cr + turnover_ratio \tab numeric \cr + effective_field_goal_percentage \tab numeric \cr + true_shooting_percentage \tab numeric \cr + usage_percentage \tab numeric \cr + estimated_usage_percentage \tab numeric \cr + estimated_pace \tab numeric \cr + pace \tab numeric \cr + pace_per40 \tab numeric \cr + possessions \tab numeric \cr + pie \tab numeric \cr +} } \description{ \strong{Get NBA Stats API Boxscore Advanced V3} diff --git a/man/nba_boxscoredefensivev2.Rd b/man/nba_boxscoredefensivev2.Rd index 6716bd24..51373816 100644 --- a/man/nba_boxscoredefensivev2.Rd +++ b/man/nba_boxscoredefensivev2.Rd @@ -32,6 +32,103 @@ nba_boxscoredefensivev2( \value{ A list of data frames: home_team_player_defensive, away_team_player_defensive, home_team_totals_defensive, away_team_totals_defensive + +\strong{home_team_player_defensive}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + person_id \tab integer \cr + first_name \tab character \cr + family_name \tab character \cr + name_i \tab character \cr + player_slug \tab character \cr + position \tab character \cr + comment \tab character \cr + jersey_num \tab character \cr + matchup_minutes \tab character \cr + partial_possessions \tab numeric \cr + switches_on \tab integer \cr + player_points \tab integer \cr + defensive_rebounds \tab integer \cr + matchup_assists \tab integer \cr + matchup_turnovers \tab integer \cr + steals \tab integer \cr + blocks \tab integer \cr + matchup_field_goals_made \tab integer \cr + matchup_field_goals_attempted \tab integer \cr + matchup_field_goal_percentage \tab numeric \cr + matchup_three_pointers_made \tab integer \cr + matchup_three_pointers_attempted \tab integer \cr + matchup_three_pointer_percentage \tab numeric \cr +} + + +\strong{away_team_player_defensive}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + person_id \tab integer \cr + first_name \tab character \cr + family_name \tab character \cr + name_i \tab character \cr + player_slug \tab character \cr + position \tab character \cr + comment \tab character \cr + jersey_num \tab character \cr + matchup_minutes \tab character \cr + partial_possessions \tab numeric \cr + switches_on \tab integer \cr + player_points \tab integer \cr + defensive_rebounds \tab integer \cr + matchup_assists \tab integer \cr + matchup_turnovers \tab integer \cr + steals \tab integer \cr + blocks \tab integer \cr + matchup_field_goals_made \tab integer \cr + matchup_field_goals_attempted \tab integer \cr + matchup_field_goal_percentage \tab numeric \cr + matchup_three_pointers_made \tab integer \cr + matchup_three_pointers_attempted \tab integer \cr + matchup_three_pointer_percentage \tab numeric \cr +} + + +\strong{home_team_totals_defensive}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr +} + + +\strong{away_team_totals_defensive}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr +} } \description{ \strong{Get NBA Stats API Boxscore Defensive V2} diff --git a/man/nba_boxscorefourfactorsv3.Rd b/man/nba_boxscorefourfactorsv3.Rd index ec2755d4..c36ff669 100644 --- a/man/nba_boxscorefourfactorsv3.Rd +++ b/man/nba_boxscorefourfactorsv3.Rd @@ -33,6 +33,109 @@ nba_boxscorefourfactorsv3( A list of data frames: home_team_player_four_factors, away_team_player_four_factors, home_team_totals_four_factors, away_team_totals_four_factors + +\strong{home_team_player_four_factors}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + person_id \tab integer \cr + first_name \tab character \cr + family_name \tab character \cr + name_i \tab character \cr + player_slug \tab character \cr + position \tab character \cr + comment \tab character \cr + jersey_num \tab character \cr + minutes \tab character \cr + effective_field_goal_percentage \tab numeric \cr + free_throw_attempt_rate \tab numeric \cr + team_turnover_percentage \tab numeric \cr + offensive_rebound_percentage \tab numeric \cr + opp_effective_field_goal_percentage \tab numeric \cr + opp_free_throw_attempt_rate \tab numeric \cr + opp_team_turnover_percentage \tab numeric \cr + opp_offensive_rebound_percentage \tab numeric \cr +} + + +\strong{away_team_player_four_factors}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + person_id \tab integer \cr + first_name \tab character \cr + family_name \tab character \cr + name_i \tab character \cr + player_slug \tab character \cr + position \tab character \cr + comment \tab character \cr + jersey_num \tab character \cr + minutes \tab character \cr + effective_field_goal_percentage \tab numeric \cr + free_throw_attempt_rate \tab numeric \cr + team_turnover_percentage \tab numeric \cr + offensive_rebound_percentage \tab numeric \cr + opp_effective_field_goal_percentage \tab numeric \cr + opp_free_throw_attempt_rate \tab numeric \cr + opp_team_turnover_percentage \tab numeric \cr + opp_offensive_rebound_percentage \tab numeric \cr +} + + +\strong{home_team_totals_four_factors}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + minutes \tab character \cr + effective_field_goal_percentage \tab numeric \cr + free_throw_attempt_rate \tab numeric \cr + team_turnover_percentage \tab numeric \cr + offensive_rebound_percentage \tab numeric \cr + opp_effective_field_goal_percentage \tab numeric \cr + opp_free_throw_attempt_rate \tab numeric \cr + opp_team_turnover_percentage \tab numeric \cr + opp_offensive_rebound_percentage \tab numeric \cr +} + + +\strong{away_team_totals_four_factors}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + minutes \tab character \cr + effective_field_goal_percentage \tab numeric \cr + free_throw_attempt_rate \tab numeric \cr + team_turnover_percentage \tab numeric \cr + offensive_rebound_percentage \tab numeric \cr + opp_effective_field_goal_percentage \tab numeric \cr + opp_free_throw_attempt_rate \tab numeric \cr + opp_team_turnover_percentage \tab numeric \cr + opp_offensive_rebound_percentage \tab numeric \cr +} } \description{ \strong{Get NBA Stats API Boxscore Four Factors V3} diff --git a/man/nba_boxscorehustlev2.Rd b/man/nba_boxscorehustlev2.Rd index aa079664..48a97532 100644 --- a/man/nba_boxscorehustlev2.Rd +++ b/man/nba_boxscorehustlev2.Rd @@ -14,6 +14,141 @@ nba_boxscorehustlev2(game_id = "0022200021", ...) \value{ Returns a named list of data frames: home_team_player_hustle, away_team_player_hustle, home_team_hustle_totals, away_team_hustle_totals + +\strong{home_team_player_hustle}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + person_id \tab integer \cr + first_name \tab character \cr + family_name \tab character \cr + name_i \tab character \cr + player_slug \tab character \cr + position \tab character \cr + comment \tab character \cr + jersey_num \tab character \cr + minutes \tab character \cr + points \tab integer \cr + contested_shots \tab integer \cr + contested_shots2pt \tab integer \cr + contested_shots3pt \tab integer \cr + deflections \tab integer \cr + charges_drawn \tab integer \cr + screen_assists \tab integer \cr + screen_assist_points \tab integer \cr + loose_balls_recovered_offensive \tab integer \cr + loose_balls_recovered_defensive \tab integer \cr + loose_balls_recovered_total \tab integer \cr + offensive_box_outs \tab integer \cr + defensive_box_outs \tab integer \cr + box_out_player_team_rebounds \tab integer \cr + box_out_player_rebounds \tab integer \cr + box_outs \tab integer \cr +} + + +\strong{away_team_player_hustle}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + person_id \tab integer \cr + first_name \tab character \cr + family_name \tab character \cr + name_i \tab character \cr + player_slug \tab character \cr + position \tab character \cr + comment \tab character \cr + jersey_num \tab character \cr + minutes \tab character \cr + points \tab integer \cr + contested_shots \tab integer \cr + contested_shots2pt \tab integer \cr + contested_shots3pt \tab integer \cr + deflections \tab integer \cr + charges_drawn \tab integer \cr + screen_assists \tab integer \cr + screen_assist_points \tab integer \cr + loose_balls_recovered_offensive \tab integer \cr + loose_balls_recovered_defensive \tab integer \cr + loose_balls_recovered_total \tab integer \cr + offensive_box_outs \tab integer \cr + defensive_box_outs \tab integer \cr + box_out_player_team_rebounds \tab integer \cr + box_out_player_rebounds \tab integer \cr + box_outs \tab integer \cr +} + + +\strong{home_team_totals_hustle}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + minutes \tab character \cr + points \tab integer \cr + contested_shots \tab integer \cr + contested_shots2pt \tab integer \cr + contested_shots3pt \tab integer \cr + deflections \tab integer \cr + charges_drawn \tab integer \cr + screen_assists \tab integer \cr + screen_assist_points \tab integer \cr + loose_balls_recovered_offensive \tab integer \cr + loose_balls_recovered_defensive \tab integer \cr + loose_balls_recovered_total \tab integer \cr + offensive_box_outs \tab integer \cr + defensive_box_outs \tab integer \cr + box_out_player_team_rebounds \tab integer \cr + box_out_player_rebounds \tab integer \cr + box_outs \tab integer \cr +} + + +\strong{away_team_totals_hustle}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + minutes \tab character \cr + points \tab integer \cr + contested_shots \tab integer \cr + contested_shots2pt \tab integer \cr + contested_shots3pt \tab integer \cr + deflections \tab integer \cr + charges_drawn \tab integer \cr + screen_assists \tab integer \cr + screen_assist_points \tab integer \cr + loose_balls_recovered_offensive \tab integer \cr + loose_balls_recovered_defensive \tab integer \cr + loose_balls_recovered_total \tab integer \cr + offensive_box_outs \tab integer \cr + defensive_box_outs \tab integer \cr + box_out_player_team_rebounds \tab integer \cr + box_out_player_rebounds \tab integer \cr + box_outs \tab integer \cr +} } \description{ \strong{Get NBA Stats API Boxscore Hustle V2} diff --git a/man/nba_boxscorematchupsv3.Rd b/man/nba_boxscorematchupsv3.Rd index 7c4c7888..4cc0962c 100644 --- a/man/nba_boxscorematchupsv3.Rd +++ b/man/nba_boxscorematchupsv3.Rd @@ -31,6 +31,111 @@ nba_boxscorematchupsv3( } \value{ A list of data frames: home_team_player_matchups, away_team_player_matchups + +\strong{home_team_player_matchups}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + person_id \tab integer \cr + first_name \tab character \cr + family_name \tab character \cr + name_i \tab character \cr + player_slug \tab character \cr + position \tab character \cr + comment \tab character \cr + jersey_num \tab character \cr + matchups_person_id \tab integer \cr + matchups_first_name \tab character \cr + matchups_family_name \tab character \cr + matchups_name_i \tab character \cr + matchups_player_slug \tab character \cr + matchups_jersey_num \tab character \cr + matchup_minutes \tab character \cr + matchup_minutes_sort \tab numeric \cr + partial_possessions \tab numeric \cr + percentage_defender_total_time \tab numeric \cr + percentage_offensive_total_time \tab numeric \cr + percentage_total_time_both_on \tab numeric \cr + switches_on \tab integer \cr + player_points \tab integer \cr + team_points \tab integer \cr + matchup_assists \tab integer \cr + matchup_potential_assists \tab integer \cr + matchup_turnovers \tab integer \cr + matchup_blocks \tab integer \cr + matchup_field_goals_made \tab integer \cr + matchup_field_goals_attempted \tab integer \cr + matchup_field_goals_percentage \tab numeric \cr + matchup_three_pointers_made \tab integer \cr + matchup_three_pointers_attempted \tab integer \cr + matchup_three_pointers_percentage \tab numeric \cr + help_blocks \tab integer \cr + help_field_goals_made \tab integer \cr + help_field_goals_attempted \tab integer \cr + help_field_goals_percentage \tab numeric \cr + matchup_free_throws_made \tab integer \cr + matchup_free_throws_attempted \tab integer \cr + shooting_fouls \tab integer \cr +} + + +\strong{away_team_player_matchups}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + person_id \tab integer \cr + first_name \tab character \cr + family_name \tab character \cr + name_i \tab character \cr + player_slug \tab character \cr + position \tab character \cr + comment \tab character \cr + jersey_num \tab character \cr + matchups_person_id \tab integer \cr + matchups_first_name \tab character \cr + matchups_family_name \tab character \cr + matchups_name_i \tab character \cr + matchups_player_slug \tab character \cr + matchups_jersey_num \tab character \cr + matchup_minutes \tab character \cr + matchup_minutes_sort \tab numeric \cr + partial_possessions \tab numeric \cr + percentage_defender_total_time \tab numeric \cr + percentage_offensive_total_time \tab numeric \cr + percentage_total_time_both_on \tab numeric \cr + switches_on \tab integer \cr + player_points \tab integer \cr + team_points \tab integer \cr + matchup_assists \tab integer \cr + matchup_potential_assists \tab integer \cr + matchup_turnovers \tab integer \cr + matchup_blocks \tab integer \cr + matchup_field_goals_made \tab integer \cr + matchup_field_goals_attempted \tab integer \cr + matchup_field_goals_percentage \tab numeric \cr + matchup_three_pointers_made \tab integer \cr + matchup_three_pointers_attempted \tab integer \cr + matchup_three_pointers_percentage \tab numeric \cr + help_blocks \tab integer \cr + help_field_goals_made \tab integer \cr + help_field_goals_attempted \tab integer \cr + help_field_goals_percentage \tab numeric \cr + matchup_free_throws_made \tab integer \cr + matchup_free_throws_attempted \tab integer \cr + shooting_fouls \tab integer \cr +} } \description{ \strong{Get NBA Stats API Boxscore Matchups V3} diff --git a/man/nba_boxscoremiscv3.Rd b/man/nba_boxscoremiscv3.Rd index a9e2b7ef..275c3246 100644 --- a/man/nba_boxscoremiscv3.Rd +++ b/man/nba_boxscoremiscv3.Rd @@ -32,6 +32,125 @@ nba_boxscoremiscv3( \value{ A list of data frames: home_team_player_misc, away_team_player_misc, home_team_totals_misc, away_team_totals_misc + +\strong{home_team_player_misc}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + person_id \tab integer \cr + first_name \tab character \cr + family_name \tab character \cr + name_i \tab character \cr + player_slug \tab character \cr + position \tab character \cr + comment \tab character \cr + jersey_num \tab character \cr + minutes \tab character \cr + points_off_turnovers \tab integer \cr + points_second_chance \tab integer \cr + points_fast_break \tab integer \cr + points_paint \tab integer \cr + opp_points_off_turnovers \tab integer \cr + opp_points_second_chance \tab integer \cr + opp_points_fast_break \tab integer \cr + opp_points_paint \tab integer \cr + blocks \tab integer \cr + blocks_against \tab integer \cr + fouls_personal \tab integer \cr + fouls_drawn \tab integer \cr +} + + +\strong{away_team_player_misc}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + person_id \tab integer \cr + first_name \tab character \cr + family_name \tab character \cr + name_i \tab character \cr + player_slug \tab character \cr + position \tab character \cr + comment \tab character \cr + jersey_num \tab character \cr + minutes \tab character \cr + points_off_turnovers \tab integer \cr + points_second_chance \tab integer \cr + points_fast_break \tab integer \cr + points_paint \tab integer \cr + opp_points_off_turnovers \tab integer \cr + opp_points_second_chance \tab integer \cr + opp_points_fast_break \tab integer \cr + opp_points_paint \tab integer \cr + blocks \tab integer \cr + blocks_against \tab integer \cr + fouls_personal \tab integer \cr + fouls_drawn \tab integer \cr +} + + +\strong{home_team_totals_misc}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + minutes \tab character \cr + points_off_turnovers \tab integer \cr + points_second_chance \tab integer \cr + points_fast_break \tab integer \cr + points_paint \tab integer \cr + opp_points_off_turnovers \tab integer \cr + opp_points_second_chance \tab integer \cr + opp_points_fast_break \tab integer \cr + opp_points_paint \tab integer \cr + blocks \tab integer \cr + blocks_against \tab integer \cr + fouls_personal \tab integer \cr + fouls_drawn \tab integer \cr +} + + +\strong{away_team_totals_misc}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + minutes \tab character \cr + points_off_turnovers \tab integer \cr + points_second_chance \tab integer \cr + points_fast_break \tab integer \cr + points_paint \tab integer \cr + opp_points_off_turnovers \tab integer \cr + opp_points_second_chance \tab integer \cr + opp_points_fast_break \tab integer \cr + opp_points_paint \tab integer \cr + blocks \tab integer \cr + blocks_against \tab integer \cr + fouls_personal \tab integer \cr + fouls_drawn \tab integer \cr +} } \description{ \strong{Get NBA Stats API Boxscore Misc V3} diff --git a/man/nba_boxscoreplayertrackv3.Rd b/man/nba_boxscoreplayertrackv3.Rd index c5a908f8..ce45f009 100644 --- a/man/nba_boxscoreplayertrackv3.Rd +++ b/man/nba_boxscoreplayertrackv3.Rd @@ -32,6 +32,155 @@ nba_boxscoreplayertrackv3( \value{ A list of data frames: home_team_player_player_track, away_team_player_player_track, home_team_totals_player_track, away_team_totals_player_track + +\strong{home_team_player_player_track}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + person_id \tab integer \cr + first_name \tab character \cr + family_name \tab character \cr + name_i \tab character \cr + player_slug \tab character \cr + position \tab character \cr + comment \tab character \cr + jersey_num \tab character \cr + minutes \tab character \cr + speed \tab numeric \cr + distance \tab numeric \cr + rebound_chances_offensive \tab integer \cr + rebound_chances_defensive \tab integer \cr + rebound_chances_total \tab integer \cr + touches \tab integer \cr + secondary_assists \tab integer \cr + free_throw_assists \tab integer \cr + passes \tab integer \cr + assists \tab integer \cr + contested_field_goals_made \tab integer \cr + contested_field_goals_attempted \tab integer \cr + contested_field_goal_percentage \tab numeric \cr + uncontested_field_goals_made \tab integer \cr + uncontested_field_goals_attempted \tab integer \cr + uncontested_field_goals_percentage \tab numeric \cr + field_goal_percentage \tab numeric \cr + defended_at_rim_field_goals_made \tab integer \cr + defended_at_rim_field_goals_attempted \tab integer \cr + defended_at_rim_field_goal_percentage \tab numeric \cr +} + + +\strong{away_team_player_player_track}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + person_id \tab integer \cr + first_name \tab character \cr + family_name \tab character \cr + name_i \tab character \cr + player_slug \tab character \cr + position \tab character \cr + comment \tab character \cr + jersey_num \tab character \cr + minutes \tab character \cr + speed \tab numeric \cr + distance \tab numeric \cr + rebound_chances_offensive \tab integer \cr + rebound_chances_defensive \tab integer \cr + rebound_chances_total \tab integer \cr + touches \tab integer \cr + secondary_assists \tab integer \cr + free_throw_assists \tab integer \cr + passes \tab integer \cr + assists \tab integer \cr + contested_field_goals_made \tab integer \cr + contested_field_goals_attempted \tab integer \cr + contested_field_goal_percentage \tab numeric \cr + uncontested_field_goals_made \tab integer \cr + uncontested_field_goals_attempted \tab integer \cr + uncontested_field_goals_percentage \tab numeric \cr + field_goal_percentage \tab numeric \cr + defended_at_rim_field_goals_made \tab integer \cr + defended_at_rim_field_goals_attempted \tab integer \cr + defended_at_rim_field_goal_percentage \tab numeric \cr +} + + +\strong{home_team_totals_player_track}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + minutes \tab character \cr + distance \tab numeric \cr + rebound_chances_offensive \tab integer \cr + rebound_chances_defensive \tab integer \cr + rebound_chances_total \tab integer \cr + touches \tab integer \cr + secondary_assists \tab integer \cr + free_throw_assists \tab integer \cr + passes \tab integer \cr + assists \tab integer \cr + contested_field_goals_made \tab integer \cr + contested_field_goals_attempted \tab integer \cr + contested_field_goal_percentage \tab numeric \cr + uncontested_field_goals_made \tab integer \cr + uncontested_field_goals_attempted \tab integer \cr + uncontested_field_goals_percentage \tab numeric \cr + field_goal_percentage \tab numeric \cr + defended_at_rim_field_goals_made \tab integer \cr + defended_at_rim_field_goals_attempted \tab integer \cr + defended_at_rim_field_goal_percentage \tab numeric \cr +} + + +\strong{away_team_totals_player_track}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + minutes \tab character \cr + distance \tab numeric \cr + rebound_chances_offensive \tab integer \cr + rebound_chances_defensive \tab integer \cr + rebound_chances_total \tab integer \cr + touches \tab integer \cr + secondary_assists \tab integer \cr + free_throw_assists \tab integer \cr + passes \tab integer \cr + assists \tab integer \cr + contested_field_goals_made \tab integer \cr + contested_field_goals_attempted \tab integer \cr + contested_field_goal_percentage \tab numeric \cr + uncontested_field_goals_made \tab integer \cr + uncontested_field_goals_attempted \tab integer \cr + uncontested_field_goals_percentage \tab numeric \cr + field_goal_percentage \tab numeric \cr + defended_at_rim_field_goals_made \tab integer \cr + defended_at_rim_field_goals_attempted \tab integer \cr + defended_at_rim_field_goal_percentage \tab numeric \cr +} } \description{ \strong{Get NBA Stats API Boxscore Player Tracking V3} diff --git a/man/nba_boxscorescoringv3.Rd b/man/nba_boxscorescoringv3.Rd index e47f35d6..2a65d4b6 100644 --- a/man/nba_boxscorescoringv3.Rd +++ b/man/nba_boxscorescoringv3.Rd @@ -32,6 +32,137 @@ nba_boxscorescoringv3( \value{ A list of data frames: home_team_player_scoring, away_team_player_scoring, home_team_totals_scoring, away_team_totals_scoring + +\strong{home_team_player_scoring}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + person_id \tab integer \cr + first_name \tab character \cr + family_name \tab character \cr + name_i \tab character \cr + player_slug \tab character \cr + position \tab character \cr + comment \tab character \cr + jersey_num \tab character \cr + minutes \tab character \cr + percentage_field_goals_attempted2pt \tab numeric \cr + percentage_field_goals_attempted3pt \tab numeric \cr + percentage_points2pt \tab numeric \cr + percentage_points_midrange2pt \tab numeric \cr + percentage_points3pt \tab numeric \cr + percentage_points_fast_break \tab numeric \cr + percentage_points_free_throw \tab numeric \cr + percentage_points_off_turnovers \tab numeric \cr + percentage_points_paint \tab numeric \cr + percentage_assisted2pt \tab numeric \cr + percentage_unassisted2pt \tab numeric \cr + percentage_assisted3pt \tab numeric \cr + percentage_unassisted3pt \tab numeric \cr + percentage_assisted_fgm \tab numeric \cr + percentage_unassisted_fgm \tab numeric \cr +} + + +\strong{away_team_player_scoring}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + person_id \tab integer \cr + first_name \tab character \cr + family_name \tab character \cr + name_i \tab character \cr + player_slug \tab character \cr + position \tab character \cr + comment \tab character \cr + jersey_num \tab character \cr + minutes \tab character \cr + percentage_field_goals_attempted2pt \tab numeric \cr + percentage_field_goals_attempted3pt \tab numeric \cr + percentage_points2pt \tab numeric \cr + percentage_points_midrange2pt \tab numeric \cr + percentage_points3pt \tab numeric \cr + percentage_points_fast_break \tab numeric \cr + percentage_points_free_throw \tab numeric \cr + percentage_points_off_turnovers \tab numeric \cr + percentage_points_paint \tab numeric \cr + percentage_assisted2pt \tab numeric \cr + percentage_unassisted2pt \tab numeric \cr + percentage_assisted3pt \tab numeric \cr + percentage_unassisted3pt \tab numeric \cr + percentage_assisted_fgm \tab numeric \cr + percentage_unassisted_fgm \tab numeric \cr +} + + +\strong{home_team_totals_scoring}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + minutes \tab character \cr + percentage_field_goals_attempted2pt \tab numeric \cr + percentage_field_goals_attempted3pt \tab numeric \cr + percentage_points2pt \tab numeric \cr + percentage_points_midrange2pt \tab numeric \cr + percentage_points3pt \tab numeric \cr + percentage_points_fast_break \tab numeric \cr + percentage_points_free_throw \tab numeric \cr + percentage_points_off_turnovers \tab numeric \cr + percentage_points_paint \tab numeric \cr + percentage_assisted2pt \tab numeric \cr + percentage_unassisted2pt \tab numeric \cr + percentage_assisted3pt \tab numeric \cr + percentage_unassisted3pt \tab numeric \cr + percentage_assisted_fgm \tab numeric \cr + percentage_unassisted_fgm \tab numeric \cr +} + + +\strong{away_team_totals_scoring}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + minutes \tab character \cr + percentage_field_goals_attempted2pt \tab numeric \cr + percentage_field_goals_attempted3pt \tab numeric \cr + percentage_points2pt \tab numeric \cr + percentage_points_midrange2pt \tab numeric \cr + percentage_points3pt \tab numeric \cr + percentage_points_fast_break \tab numeric \cr + percentage_points_free_throw \tab numeric \cr + percentage_points_off_turnovers \tab numeric \cr + percentage_points_paint \tab numeric \cr + percentage_assisted2pt \tab numeric \cr + percentage_unassisted2pt \tab numeric \cr + percentage_assisted3pt \tab numeric \cr + percentage_unassisted3pt \tab numeric \cr + percentage_assisted_fgm \tab numeric \cr + percentage_unassisted_fgm \tab numeric \cr +} } \description{ \strong{Get NBA Stats API Boxscore Scoring V3} diff --git a/man/nba_boxscoreusagev3.Rd b/man/nba_boxscoreusagev3.Rd index fc59402f..02fd7b00 100644 --- a/man/nba_boxscoreusagev3.Rd +++ b/man/nba_boxscoreusagev3.Rd @@ -32,6 +32,149 @@ nba_boxscoreusagev3( \value{ A list of data frames: home_team_player_usage, away_team_player_usage, home_team_totals_usage, away_team_totals_usage + +\strong{home_team_player_usage}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + person_id \tab integer \cr + first_name \tab character \cr + family_name \tab character \cr + name_i \tab character \cr + player_slug \tab character \cr + position \tab character \cr + comment \tab character \cr + jersey_num \tab character \cr + minutes \tab character \cr + usage_percentage \tab numeric \cr + percentage_field_goals_made \tab numeric \cr + percentage_field_goals_attempted \tab numeric \cr + percentage_three_pointers_made \tab numeric \cr + percentage_three_pointers_attempted \tab numeric \cr + percentage_free_throws_made \tab numeric \cr + percentage_free_throws_attempted \tab numeric \cr + percentage_rebounds_offensive \tab numeric \cr + percentage_rebounds_defensive \tab numeric \cr + percentage_rebounds_total \tab numeric \cr + percentage_assists \tab numeric \cr + percentage_turnovers \tab numeric \cr + percentage_steals \tab numeric \cr + percentage_blocks \tab numeric \cr + percentage_blocks_allowed \tab numeric \cr + percentage_personal_fouls \tab numeric \cr + percentage_personal_fouls_drawn \tab numeric \cr + percentage_points \tab numeric \cr +} + + +\strong{away_team_player_usage}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + person_id \tab integer \cr + first_name \tab character \cr + family_name \tab character \cr + name_i \tab character \cr + player_slug \tab character \cr + position \tab character \cr + comment \tab character \cr + jersey_num \tab character \cr + minutes \tab character \cr + usage_percentage \tab numeric \cr + percentage_field_goals_made \tab numeric \cr + percentage_field_goals_attempted \tab numeric \cr + percentage_three_pointers_made \tab numeric \cr + percentage_three_pointers_attempted \tab numeric \cr + percentage_free_throws_made \tab numeric \cr + percentage_free_throws_attempted \tab numeric \cr + percentage_rebounds_offensive \tab numeric \cr + percentage_rebounds_defensive \tab numeric \cr + percentage_rebounds_total \tab numeric \cr + percentage_assists \tab numeric \cr + percentage_turnovers \tab numeric \cr + percentage_steals \tab numeric \cr + percentage_blocks \tab numeric \cr + percentage_blocks_allowed \tab numeric \cr + percentage_personal_fouls \tab numeric \cr + percentage_personal_fouls_drawn \tab numeric \cr + percentage_points \tab numeric \cr +} + + +\strong{home_team_totals_usage}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + minutes \tab character \cr + usage_percentage \tab numeric \cr + percentage_field_goals_made \tab numeric \cr + percentage_field_goals_attempted \tab numeric \cr + percentage_three_pointers_made \tab numeric \cr + percentage_three_pointers_attempted \tab numeric \cr + percentage_free_throws_made \tab numeric \cr + percentage_free_throws_attempted \tab numeric \cr + percentage_rebounds_offensive \tab numeric \cr + percentage_rebounds_defensive \tab numeric \cr + percentage_rebounds_total \tab numeric \cr + percentage_assists \tab numeric \cr + percentage_turnovers \tab numeric \cr + percentage_steals \tab numeric \cr + percentage_blocks \tab numeric \cr + percentage_blocks_allowed \tab numeric \cr + percentage_personal_fouls \tab numeric \cr + percentage_personal_fouls_drawn \tab numeric \cr + percentage_points \tab numeric \cr +} + + +\strong{away_team_totals_usage}\tabular{ll}{ + col_name \tab types \cr + game_id \tab character \cr + away_team_id \tab integer \cr + home_team_id \tab integer \cr + team_id \tab integer \cr + team_name \tab character \cr + team_city \tab character \cr + team_tricode \tab character \cr + team_slug \tab character \cr + minutes \tab character \cr + usage_percentage \tab numeric \cr + percentage_field_goals_made \tab numeric \cr + percentage_field_goals_attempted \tab numeric \cr + percentage_three_pointers_made \tab numeric \cr + percentage_three_pointers_attempted \tab numeric \cr + percentage_free_throws_made \tab numeric \cr + percentage_free_throws_attempted \tab numeric \cr + percentage_rebounds_offensive \tab numeric \cr + percentage_rebounds_defensive \tab numeric \cr + percentage_rebounds_total \tab numeric \cr + percentage_assists \tab numeric \cr + percentage_turnovers \tab numeric \cr + percentage_steals \tab numeric \cr + percentage_blocks \tab numeric \cr + percentage_blocks_allowed \tab numeric \cr + percentage_personal_fouls \tab numeric \cr + percentage_personal_fouls_drawn \tab numeric \cr + percentage_points \tab numeric \cr +} } \description{ \strong{Get NBA Stats API Boxscore Usage V3} diff --git a/tests/testthat/test-nba_boxscoreadvancedv3.R b/tests/testthat/test-nba_boxscoreadvancedv3.R new file mode 100644 index 00000000..cdb792a7 --- /dev/null +++ b/tests/testthat/test-nba_boxscoreadvancedv3.R @@ -0,0 +1,170 @@ +test_that("NBA Boxscore Advanced V3", { + skip_on_cran() + skip_on_ci() + + x <- nba_boxscoreadvancedv3(game_id = "0022200021") + + cols_x1 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "person_id", + "first_name", + "family_name", + "name_i", + "player_slug", + "position", + "comment", + "jersey_num", + "minutes", + "estimated_offensive_rating", + "offensive_rating", + "estimated_defensive_rating", + "defensive_rating", + "estimated_net_rating", + "net_rating", + "assist_percentage", + "assist_to_turnover", + "assist_ratio", + "offensive_rebound_percentage", + "defensive_rebound_percentage", + "rebound_percentage", + "turnover_ratio", + "effective_field_goal_percentage", + "true_shooting_percentage", + "usage_percentage", + "estimated_usage_percentage", + "estimated_pace", + "pace", + "pace_per40", + "possessions", + "pie" + ) + + cols_x2 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "person_id", + "first_name", + "family_name", + "name_i", + "player_slug", + "position", + "comment", + "jersey_num", + "minutes", + "estimated_offensive_rating", + "offensive_rating", + "estimated_defensive_rating", + "defensive_rating", + "estimated_net_rating", + "net_rating", + "assist_percentage", + "assist_to_turnover", + "assist_ratio", + "offensive_rebound_percentage", + "defensive_rebound_percentage", + "rebound_percentage", + "turnover_ratio", + "effective_field_goal_percentage", + "true_shooting_percentage", + "usage_percentage", + "estimated_usage_percentage", + "estimated_pace", + "pace", + "pace_per40", + "possessions", + "pie" + ) + + cols_x3 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "minutes", + "estimated_offensive_rating", + "offensive_rating", + "estimated_defensive_rating", + "defensive_rating", + "estimated_net_rating", + "net_rating", + "assist_percentage", + "assist_to_turnover", + "assist_ratio", + "offensive_rebound_percentage", + "defensive_rebound_percentage", + "rebound_percentage", + "estimated_team_turnover_percentage", + "turnover_ratio", + "effective_field_goal_percentage", + "true_shooting_percentage", + "usage_percentage", + "estimated_usage_percentage", + "estimated_pace", + "pace", + "pace_per40", + "possessions", + "pie" + ) + + cols_x4 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "minutes", + "estimated_offensive_rating", + "offensive_rating", + "estimated_defensive_rating", + "defensive_rating", + "estimated_net_rating", + "net_rating", + "assist_percentage", + "assist_to_turnover", + "assist_ratio", + "offensive_rebound_percentage", + "defensive_rebound_percentage", + "rebound_percentage", + "estimated_team_turnover_percentage", + "turnover_ratio", + "effective_field_goal_percentage", + "true_shooting_percentage", + "usage_percentage", + "estimated_usage_percentage", + "estimated_pace", + "pace", + "pace_per40", + "possessions", + "pie" + ) + + expect_equal(sort(colnames(x[[1]])), sort(cols_x1)) + expect_s3_class(x[[1]], 'data.frame') + expect_equal(sort(colnames(x[[2]])), sort(cols_x2)) + expect_s3_class(x[[2]], 'data.frame') + expect_equal(sort(colnames(x[[3]])), sort(cols_x3)) + expect_s3_class(x[[3]], 'data.frame') + expect_equal(sort(colnames(x[[4]])), sort(cols_x4)) + expect_s3_class(x[[4]], 'data.frame') + +}) diff --git a/tests/testthat/test-nba_boxscoredefensivev2.R b/tests/testthat/test-nba_boxscoredefensivev2.R new file mode 100644 index 00000000..5383c44f --- /dev/null +++ b/tests/testthat/test-nba_boxscoredefensivev2.R @@ -0,0 +1,106 @@ +test_that("NBA Boxscore Defensive V2", { + skip_on_cran() + skip_on_ci() + + x <- nba_boxscoredefensivev2(game_id = "0022200021") + + cols_x1 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "person_id", + "first_name", + "family_name", + "name_i", + "player_slug", + "position", + "comment", + "jersey_num", + "matchup_minutes", + "partial_possessions", + "switches_on", + "player_points", + "defensive_rebounds", + "matchup_assists", + "matchup_turnovers", + "steals", + "blocks", + "matchup_field_goals_made", + "matchup_field_goals_attempted", + "matchup_field_goal_percentage", + "matchup_three_pointers_made", + "matchup_three_pointers_attempted", + "matchup_three_pointer_percentage" + ) + + cols_x2 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "person_id", + "first_name", + "family_name", + "name_i", + "player_slug", + "position", + "comment", + "jersey_num", + "matchup_minutes", + "partial_possessions", + "switches_on", + "player_points", + "defensive_rebounds", + "matchup_assists", + "matchup_turnovers", + "steals", + "blocks", + "matchup_field_goals_made", + "matchup_field_goals_attempted", + "matchup_field_goal_percentage", + "matchup_three_pointers_made", + "matchup_three_pointers_attempted", + "matchup_three_pointer_percentage" + ) + + cols_x3 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug" + ) + + cols_x4 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug" + ) + + expect_equal(sort(colnames(x[[1]])), sort(cols_x1)) + expect_s3_class(x[[1]], 'data.frame') + expect_equal(sort(colnames(x[[2]])), sort(cols_x2)) + expect_s3_class(x[[2]], 'data.frame') + expect_equal(sort(colnames(x[[3]])), sort(cols_x3)) + expect_s3_class(x[[3]], 'data.frame') + expect_equal(sort(colnames(x[[4]])), sort(cols_x4)) + expect_s3_class(x[[4]], 'data.frame') + +}) diff --git a/tests/testthat/test-nba_boxscorefourfactorsv3.R b/tests/testthat/test-nba_boxscorefourfactorsv3.R new file mode 100644 index 00000000..45b11a06 --- /dev/null +++ b/tests/testthat/test-nba_boxscorefourfactorsv3.R @@ -0,0 +1,112 @@ +test_that("NBA Boxscore Four Factors V3", { + skip_on_cran() + skip_on_ci() + + x <- nba_boxscorefourfactorsv3(game_id = "0022200021") + + cols_x1 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "person_id", + "first_name", + "family_name", + "name_i", + "player_slug", + "position", + "comment", + "jersey_num", + "minutes", + "effective_field_goal_percentage", + "free_throw_attempt_rate", + "team_turnover_percentage", + "offensive_rebound_percentage", + "opp_effective_field_goal_percentage", + "opp_free_throw_attempt_rate", + "opp_team_turnover_percentage", + "opp_offensive_rebound_percentage" + ) + + cols_x2 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "person_id", + "first_name", + "family_name", + "name_i", + "player_slug", + "position", + "comment", + "jersey_num", + "minutes", + "effective_field_goal_percentage", + "free_throw_attempt_rate", + "team_turnover_percentage", + "offensive_rebound_percentage", + "opp_effective_field_goal_percentage", + "opp_free_throw_attempt_rate", + "opp_team_turnover_percentage", + "opp_offensive_rebound_percentage" + ) + + cols_x3 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "minutes", + "effective_field_goal_percentage", + "free_throw_attempt_rate", + "team_turnover_percentage", + "offensive_rebound_percentage", + "opp_effective_field_goal_percentage", + "opp_free_throw_attempt_rate", + "opp_team_turnover_percentage", + "opp_offensive_rebound_percentage" + ) + + cols_x4 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "minutes", + "effective_field_goal_percentage", + "free_throw_attempt_rate", + "team_turnover_percentage", + "offensive_rebound_percentage", + "opp_effective_field_goal_percentage", + "opp_free_throw_attempt_rate", + "opp_team_turnover_percentage", + "opp_offensive_rebound_percentage" + ) + + expect_equal(sort(colnames(x[[1]])), sort(cols_x1)) + expect_s3_class(x[[1]], 'data.frame') + expect_equal(sort(colnames(x[[2]])), sort(cols_x2)) + expect_s3_class(x[[2]], 'data.frame') + expect_equal(sort(colnames(x[[3]])), sort(cols_x3)) + expect_s3_class(x[[3]], 'data.frame') + expect_equal(sort(colnames(x[[4]])), sort(cols_x4)) + expect_s3_class(x[[4]], 'data.frame') + +}) diff --git a/tests/testthat/test-nba_boxscorehustlev2.R b/tests/testthat/test-nba_boxscorehustlev2.R new file mode 100644 index 00000000..63e8052c --- /dev/null +++ b/tests/testthat/test-nba_boxscorehustlev2.R @@ -0,0 +1,144 @@ +test_that("NBA Boxscore Hustle V2", { + skip_on_cran() + skip_on_ci() + + x <- nba_boxscorehustlev2(game_id = "0022200021") + + cols_x1 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "person_id", + "first_name", + "family_name", + "name_i", + "player_slug", + "position", + "comment", + "jersey_num", + "minutes", + "points", + "contested_shots", + "contested_shots2pt", + "contested_shots3pt", + "deflections", + "charges_drawn", + "screen_assists", + "screen_assist_points", + "loose_balls_recovered_offensive", + "loose_balls_recovered_defensive", + "loose_balls_recovered_total", + "offensive_box_outs", + "defensive_box_outs", + "box_out_player_team_rebounds", + "box_out_player_rebounds", + "box_outs" + ) + + cols_x2 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "person_id", + "first_name", + "family_name", + "name_i", + "player_slug", + "position", + "comment", + "jersey_num", + "minutes", + "points", + "contested_shots", + "contested_shots2pt", + "contested_shots3pt", + "deflections", + "charges_drawn", + "screen_assists", + "screen_assist_points", + "loose_balls_recovered_offensive", + "loose_balls_recovered_defensive", + "loose_balls_recovered_total", + "offensive_box_outs", + "defensive_box_outs", + "box_out_player_team_rebounds", + "box_out_player_rebounds", + "box_outs" + ) + + cols_x3 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "minutes", + "points", + "contested_shots", + "contested_shots2pt", + "contested_shots3pt", + "deflections", + "charges_drawn", + "screen_assists", + "screen_assist_points", + "loose_balls_recovered_offensive", + "loose_balls_recovered_defensive", + "loose_balls_recovered_total", + "offensive_box_outs", + "defensive_box_outs", + "box_out_player_team_rebounds", + "box_out_player_rebounds", + "box_outs" + ) + + cols_x4 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "minutes", + "points", + "contested_shots", + "contested_shots2pt", + "contested_shots3pt", + "deflections", + "charges_drawn", + "screen_assists", + "screen_assist_points", + "loose_balls_recovered_offensive", + "loose_balls_recovered_defensive", + "loose_balls_recovered_total", + "offensive_box_outs", + "defensive_box_outs", + "box_out_player_team_rebounds", + "box_out_player_rebounds", + "box_outs" + ) + + expect_equal(sort(colnames(x[[1]])), sort(cols_x1)) + expect_s3_class(x[[1]], 'data.frame') + expect_equal(sort(colnames(x[[2]])), sort(cols_x2)) + expect_s3_class(x[[2]], 'data.frame') + expect_equal(sort(colnames(x[[3]])), sort(cols_x3)) + expect_s3_class(x[[3]], 'data.frame') + expect_equal(sort(colnames(x[[4]])), sort(cols_x4)) + expect_s3_class(x[[4]], 'data.frame') + +}) diff --git a/tests/testthat/test-nba_boxscorematchupsv3.R b/tests/testthat/test-nba_boxscorematchupsv3.R new file mode 100644 index 00000000..85b8a4b6 --- /dev/null +++ b/tests/testthat/test-nba_boxscorematchupsv3.R @@ -0,0 +1,114 @@ +test_that("NBA Boxscore Matchups V3", { + skip_on_cran() + skip_on_ci() + + x <- nba_boxscorematchupsv3(game_id = "0022200021") + + cols_x1 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "person_id", + "first_name", + "family_name", + "name_i", + "player_slug", + "position", + "comment", + "jersey_num", + "matchups_person_id", + "matchups_first_name", + "matchups_family_name", + "matchups_name_i", + "matchups_player_slug", + "matchups_jersey_num", + "matchup_minutes", + "matchup_minutes_sort", + "partial_possessions", + "percentage_defender_total_time", + "percentage_offensive_total_time", + "percentage_total_time_both_on", + "switches_on", + "player_points", + "team_points", + "matchup_assists", + "matchup_potential_assists", + "matchup_turnovers", + "matchup_blocks", + "matchup_field_goals_made", + "matchup_field_goals_attempted", + "matchup_field_goals_percentage", + "matchup_three_pointers_made", + "matchup_three_pointers_attempted", + "matchup_three_pointers_percentage", + "help_blocks", + "help_field_goals_made", + "help_field_goals_attempted", + "help_field_goals_percentage", + "matchup_free_throws_made", + "matchup_free_throws_attempted", + "shooting_fouls" + ) + + cols_x2 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "person_id", + "first_name", + "family_name", + "name_i", + "player_slug", + "position", + "comment", + "jersey_num", + "matchups_person_id", + "matchups_first_name", + "matchups_family_name", + "matchups_name_i", + "matchups_player_slug", + "matchups_jersey_num", + "matchup_minutes", + "matchup_minutes_sort", + "partial_possessions", + "percentage_defender_total_time", + "percentage_offensive_total_time", + "percentage_total_time_both_on", + "switches_on", + "player_points", + "team_points", + "matchup_assists", + "matchup_potential_assists", + "matchup_turnovers", + "matchup_blocks", + "matchup_field_goals_made", + "matchup_field_goals_attempted", + "matchup_field_goals_percentage", + "matchup_three_pointers_made", + "matchup_three_pointers_attempted", + "matchup_three_pointers_percentage", + "help_blocks", + "help_field_goals_made", + "help_field_goals_attempted", + "help_field_goals_percentage", + "matchup_free_throws_made", + "matchup_free_throws_attempted", + "shooting_fouls" + ) + + expect_equal(sort(colnames(x[[1]])), sort(cols_x1)) + expect_s3_class(x[[1]], 'data.frame') + expect_equal(sort(colnames(x[[2]])), sort(cols_x2)) + expect_s3_class(x[[2]], 'data.frame') + +}) diff --git a/tests/testthat/test-nba_boxscoremiscv3.R b/tests/testthat/test-nba_boxscoremiscv3.R new file mode 100644 index 00000000..21e0da68 --- /dev/null +++ b/tests/testthat/test-nba_boxscoremiscv3.R @@ -0,0 +1,128 @@ +test_that("NBA Boxscore Misc V3", { + skip_on_cran() + skip_on_ci() + + x <- nba_boxscoremiscv3(game_id = "0022200021") + + cols_x1 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "person_id", + "first_name", + "family_name", + "name_i", + "player_slug", + "position", + "comment", + "jersey_num", + "minutes", + "points_off_turnovers", + "points_second_chance", + "points_fast_break", + "points_paint", + "opp_points_off_turnovers", + "opp_points_second_chance", + "opp_points_fast_break", + "opp_points_paint", + "blocks", + "blocks_against", + "fouls_personal", + "fouls_drawn" + ) + + cols_x2 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "person_id", + "first_name", + "family_name", + "name_i", + "player_slug", + "position", + "comment", + "jersey_num", + "minutes", + "points_off_turnovers", + "points_second_chance", + "points_fast_break", + "points_paint", + "opp_points_off_turnovers", + "opp_points_second_chance", + "opp_points_fast_break", + "opp_points_paint", + "blocks", + "blocks_against", + "fouls_personal", + "fouls_drawn" + ) + + cols_x3 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "minutes", + "points_off_turnovers", + "points_second_chance", + "points_fast_break", + "points_paint", + "opp_points_off_turnovers", + "opp_points_second_chance", + "opp_points_fast_break", + "opp_points_paint", + "blocks", + "blocks_against", + "fouls_personal", + "fouls_drawn" + ) + + cols_x4 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "minutes", + "points_off_turnovers", + "points_second_chance", + "points_fast_break", + "points_paint", + "opp_points_off_turnovers", + "opp_points_second_chance", + "opp_points_fast_break", + "opp_points_paint", + "blocks", + "blocks_against", + "fouls_personal", + "fouls_drawn" + ) + + expect_equal(sort(colnames(x[[1]])), sort(cols_x1)) + expect_s3_class(x[[1]], 'data.frame') + expect_equal(sort(colnames(x[[2]])), sort(cols_x2)) + expect_s3_class(x[[2]], 'data.frame') + expect_equal(sort(colnames(x[[3]])), sort(cols_x3)) + expect_s3_class(x[[3]], 'data.frame') + expect_equal(sort(colnames(x[[4]])), sort(cols_x4)) + expect_s3_class(x[[4]], 'data.frame') + +}) diff --git a/tests/testthat/test-nba_boxscoreplayertrackv3.R b/tests/testthat/test-nba_boxscoreplayertrackv3.R new file mode 100644 index 00000000..bece173e --- /dev/null +++ b/tests/testthat/test-nba_boxscoreplayertrackv3.R @@ -0,0 +1,158 @@ +test_that("NBA Boxscore Player Track V3", { + skip_on_cran() + skip_on_ci() + + x <- nba_boxscoreplayertrackv3(game_id = "0022200021") + + cols_x1 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "person_id", + "first_name", + "family_name", + "name_i", + "player_slug", + "position", + "comment", + "jersey_num", + "minutes", + "speed", + "distance", + "rebound_chances_offensive", + "rebound_chances_defensive", + "rebound_chances_total", + "touches", + "secondary_assists", + "free_throw_assists", + "passes", + "assists", + "contested_field_goals_made", + "contested_field_goals_attempted", + "contested_field_goal_percentage", + "uncontested_field_goals_made", + "uncontested_field_goals_attempted", + "uncontested_field_goals_percentage", + "field_goal_percentage", + "defended_at_rim_field_goals_made", + "defended_at_rim_field_goals_attempted", + "defended_at_rim_field_goal_percentage" + ) + + cols_x2 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "person_id", + "first_name", + "family_name", + "name_i", + "player_slug", + "position", + "comment", + "jersey_num", + "minutes", + "speed", + "distance", + "rebound_chances_offensive", + "rebound_chances_defensive", + "rebound_chances_total", + "touches", + "secondary_assists", + "free_throw_assists", + "passes", + "assists", + "contested_field_goals_made", + "contested_field_goals_attempted", + "contested_field_goal_percentage", + "uncontested_field_goals_made", + "uncontested_field_goals_attempted", + "uncontested_field_goals_percentage", + "field_goal_percentage", + "defended_at_rim_field_goals_made", + "defended_at_rim_field_goals_attempted", + "defended_at_rim_field_goal_percentage" + ) + + cols_x3 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "minutes", + "distance", + "rebound_chances_offensive", + "rebound_chances_defensive", + "rebound_chances_total", + "touches", + "secondary_assists", + "free_throw_assists", + "passes", + "assists", + "contested_field_goals_made", + "contested_field_goals_attempted", + "contested_field_goal_percentage", + "uncontested_field_goals_made", + "uncontested_field_goals_attempted", + "uncontested_field_goals_percentage", + "field_goal_percentage", + "defended_at_rim_field_goals_made", + "defended_at_rim_field_goals_attempted", + "defended_at_rim_field_goal_percentage" + ) + + cols_x4 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "minutes", + "distance", + "rebound_chances_offensive", + "rebound_chances_defensive", + "rebound_chances_total", + "touches", + "secondary_assists", + "free_throw_assists", + "passes", + "assists", + "contested_field_goals_made", + "contested_field_goals_attempted", + "contested_field_goal_percentage", + "uncontested_field_goals_made", + "uncontested_field_goals_attempted", + "uncontested_field_goals_percentage", + "field_goal_percentage", + "defended_at_rim_field_goals_made", + "defended_at_rim_field_goals_attempted", + "defended_at_rim_field_goal_percentage" + ) + + expect_equal(sort(colnames(x[[1]])), sort(cols_x1)) + expect_s3_class(x[[1]], 'data.frame') + expect_equal(sort(colnames(x[[2]])), sort(cols_x2)) + expect_s3_class(x[[2]], 'data.frame') + expect_equal(sort(colnames(x[[3]])), sort(cols_x3)) + expect_s3_class(x[[3]], 'data.frame') + expect_equal(sort(colnames(x[[4]])), sort(cols_x4)) + expect_s3_class(x[[4]], 'data.frame') + +}) diff --git a/tests/testthat/test-nba_boxscorescoringv3.R b/tests/testthat/test-nba_boxscorescoringv3.R new file mode 100644 index 00000000..7919b54f --- /dev/null +++ b/tests/testthat/test-nba_boxscorescoringv3.R @@ -0,0 +1,140 @@ +test_that("NBA Boxscore Scoring V3", { + skip_on_cran() + skip_on_ci() + + x <- nba_boxscorescoringv3(game_id = "0022200021") + + cols_x1 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "person_id", + "first_name", + "family_name", + "name_i", + "player_slug", + "position", + "comment", + "jersey_num", + "minutes", + "percentage_field_goals_attempted2pt", + "percentage_field_goals_attempted3pt", + "percentage_points2pt", + "percentage_points_midrange2pt", + "percentage_points3pt", + "percentage_points_fast_break", + "percentage_points_free_throw", + "percentage_points_off_turnovers", + "percentage_points_paint", + "percentage_assisted2pt", + "percentage_unassisted2pt", + "percentage_assisted3pt", + "percentage_unassisted3pt", + "percentage_assisted_fgm", + "percentage_unassisted_fgm" + ) + + cols_x2 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "person_id", + "first_name", + "family_name", + "name_i", + "player_slug", + "position", + "comment", + "jersey_num", + "minutes", + "percentage_field_goals_attempted2pt", + "percentage_field_goals_attempted3pt", + "percentage_points2pt", + "percentage_points_midrange2pt", + "percentage_points3pt", + "percentage_points_fast_break", + "percentage_points_free_throw", + "percentage_points_off_turnovers", + "percentage_points_paint", + "percentage_assisted2pt", + "percentage_unassisted2pt", + "percentage_assisted3pt", + "percentage_unassisted3pt", + "percentage_assisted_fgm", + "percentage_unassisted_fgm" + ) + + cols_x3 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "minutes", + "percentage_field_goals_attempted2pt", + "percentage_field_goals_attempted3pt", + "percentage_points2pt", + "percentage_points_midrange2pt", + "percentage_points3pt", + "percentage_points_fast_break", + "percentage_points_free_throw", + "percentage_points_off_turnovers", + "percentage_points_paint", + "percentage_assisted2pt", + "percentage_unassisted2pt", + "percentage_assisted3pt", + "percentage_unassisted3pt", + "percentage_assisted_fgm", + "percentage_unassisted_fgm" + ) + + cols_x4 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "minutes", + "percentage_field_goals_attempted2pt", + "percentage_field_goals_attempted3pt", + "percentage_points2pt", + "percentage_points_midrange2pt", + "percentage_points3pt", + "percentage_points_fast_break", + "percentage_points_free_throw", + "percentage_points_off_turnovers", + "percentage_points_paint", + "percentage_assisted2pt", + "percentage_unassisted2pt", + "percentage_assisted3pt", + "percentage_unassisted3pt", + "percentage_assisted_fgm", + "percentage_unassisted_fgm" + ) + + expect_equal(sort(colnames(x[[1]])), sort(cols_x1)) + expect_s3_class(x[[1]], 'data.frame') + expect_equal(sort(colnames(x[[2]])), sort(cols_x2)) + expect_s3_class(x[[2]], 'data.frame') + expect_equal(sort(colnames(x[[3]])), sort(cols_x3)) + expect_s3_class(x[[3]], 'data.frame') + expect_equal(sort(colnames(x[[4]])), sort(cols_x4)) + expect_s3_class(x[[4]], 'data.frame') + +}) diff --git a/tests/testthat/test-nba_boxscoreusagev3.R b/tests/testthat/test-nba_boxscoreusagev3.R new file mode 100644 index 00000000..34460365 --- /dev/null +++ b/tests/testthat/test-nba_boxscoreusagev3.R @@ -0,0 +1,152 @@ +test_that("NBA Boxscore Usage V3", { + skip_on_cran() + skip_on_ci() + + x <- nba_boxscoreusagev3(game_id = "0022200021") + + cols_x1 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "person_id", + "first_name", + "family_name", + "name_i", + "player_slug", + "position", + "comment", + "jersey_num", + "minutes", + "usage_percentage", + "percentage_field_goals_made", + "percentage_field_goals_attempted", + "percentage_three_pointers_made", + "percentage_three_pointers_attempted", + "percentage_free_throws_made", + "percentage_free_throws_attempted", + "percentage_rebounds_offensive", + "percentage_rebounds_defensive", + "percentage_rebounds_total", + "percentage_assists", + "percentage_turnovers", + "percentage_steals", + "percentage_blocks", + "percentage_blocks_allowed", + "percentage_personal_fouls", + "percentage_personal_fouls_drawn", + "percentage_points" + ) + + cols_x2 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "person_id", + "first_name", + "family_name", + "name_i", + "player_slug", + "position", + "comment", + "jersey_num", + "minutes", + "usage_percentage", + "percentage_field_goals_made", + "percentage_field_goals_attempted", + "percentage_three_pointers_made", + "percentage_three_pointers_attempted", + "percentage_free_throws_made", + "percentage_free_throws_attempted", + "percentage_rebounds_offensive", + "percentage_rebounds_defensive", + "percentage_rebounds_total", + "percentage_assists", + "percentage_turnovers", + "percentage_steals", + "percentage_blocks", + "percentage_blocks_allowed", + "percentage_personal_fouls", + "percentage_personal_fouls_drawn", + "percentage_points" + ) + + cols_x3 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "minutes", + "usage_percentage", + "percentage_field_goals_made", + "percentage_field_goals_attempted", + "percentage_three_pointers_made", + "percentage_three_pointers_attempted", + "percentage_free_throws_made", + "percentage_free_throws_attempted", + "percentage_rebounds_offensive", + "percentage_rebounds_defensive", + "percentage_rebounds_total", + "percentage_assists", + "percentage_turnovers", + "percentage_steals", + "percentage_blocks", + "percentage_blocks_allowed", + "percentage_personal_fouls", + "percentage_personal_fouls_drawn", + "percentage_points" + ) + + cols_x4 <- c( + "game_id", + "away_team_id", + "home_team_id", + "team_id", + "team_name", + "team_city", + "team_tricode", + "team_slug", + "minutes", + "usage_percentage", + "percentage_field_goals_made", + "percentage_field_goals_attempted", + "percentage_three_pointers_made", + "percentage_three_pointers_attempted", + "percentage_free_throws_made", + "percentage_free_throws_attempted", + "percentage_rebounds_offensive", + "percentage_rebounds_defensive", + "percentage_rebounds_total", + "percentage_assists", + "percentage_turnovers", + "percentage_steals", + "percentage_blocks", + "percentage_blocks_allowed", + "percentage_personal_fouls", + "percentage_personal_fouls_drawn", + "percentage_points" + ) + + expect_equal(sort(colnames(x[[1]])), sort(cols_x1)) + expect_s3_class(x[[1]], 'data.frame') + expect_equal(sort(colnames(x[[2]])), sort(cols_x2)) + expect_s3_class(x[[2]], 'data.frame') + expect_equal(sort(colnames(x[[3]])), sort(cols_x3)) + expect_s3_class(x[[3]], 'data.frame') + expect_equal(sort(colnames(x[[4]])), sort(cols_x4)) + expect_s3_class(x[[4]], 'data.frame') + +})