Select the 25th home game (adjust column name if needed)

home_game_25 <- dodgers_data[25, c(“temp”, “attend”, “opponent”)]

Create a scatter plot

ggplot(dodgers_data, aes(x = temp, y = attend)) + geom_point() + labs(title = “Attend vs. Temp”, x = “Temp (°F)”, y = “Attend”) + theme_minimal() #Create A Boxplot ggplot(dodgers_data, aes(x = bobblehead, y = attend)) + geom_boxplot() + labs(title = “Attend by bobblehead Type”, x = “bobblehead Type”, y = “Attend”) + theme_minimal() #Game 25 game_25 <- dodgers_data[25, c(“temp”, “attend”, “opponent”, “bobblehead”)] > print(game_25) # A tibble: 1 × 4 temp attend opponent bobblehead
1 61 36561 Astros NO

#Median median_attend <- median(dodgers_data$attend, na.rm = TRUE) print(median_attend) [1] 40284

#Night Games night_games <- sum(dodgers_data$day_night == “Night”, na.rm = TRUE) print(night_games) [1] 66