![]() ![]() They are the box scores you see on (with some minor preprocessing): The first 4 elements of the list ( visitor_basic_boxscore, visitor_adv_boxscore, home_basic_boxscore, home_basic_boxscore) are data frames for the basic and advanced box scores of both teams. ![]() $ Player: chr "LeBron James" "Jae Crowder" "Derrick Rose" "Dwyane Wade". $ Role : chr "Starter" "Starter" "Starter" "Starter". $ Player: chr "Jaylen Brown" "Kyrie Irving" "Jayson Tatum" "Al Horford". #> $ visitor_basic_boxscore:'ame':đ3 obs. Let’s take a closer look at the first element of the list: The keys of the list are the game_ids, and (as we will see shortly) each element of the list is itself a list of length 5. It is a list of length 1312, which corresponds to the total number of games (Regular Season and Playoffs) in the 2017-18 season. ![]() Next, let’s look at the master_list object which contains all the box score information: The game_id is how I was able to scrape the box scores for all the games. For example, if we wanted to see the results of the game between the Celtics and the Cavs on, we would look up the game_id (201710170CLE) and go to the URL. The first column, game_id, is ’s way of uniquely identifying a game. #> overtimes attendance game_remarks game_type Game_df game_id date_game game_start_time visitor_team_name visitor_pts home_team_name home_pts (Code that I wrote for these questions can be found here.) Let’s load the packages and data (data available as links from this page):
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |