QuestionQuestion

Use the SportsAnalytics API for R, to accomplish the following:

a) Retrieve the NBA data for the 2007-2008 season.
b) Subset the data for your favorite team. Show the code you used to find:
o Which player has the best three point percentage?
o Which player has played the largest number of minutes?
o Which player has the most "Steals"?
c) Show 5 teams for the 2007-2008 season that have the most wins in descending order.
d) Use at least 5 Google charts (your choice) to show relevant data from this dataset.
e) Use gvisGeoChart function to display the location on the world map of the last 5 Basketball World Cup Champions

Please include the R code source file (including packages/libraries used, etc.) and screenshots of the outputs.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

Sports Analytics
# Importing the Sports Analytics library
library("SportsAnalytics")
# a)    Retrieve the NBA data for the 2007-2008 season.
nba_data_07_08<-fetch_NBAPlayerStatistics("07-08")


# b)   Subset the data for your favorite team. Show the code you used to find:
# Subsetting the data for favoriate team
BOS_data_07_08<-nba_data_07_08[nba_data_07_08$Team=="BOS",]

#    Which player has the best three point percentage?
BOS_data_07_08$three_point_per<-(BOS_data_07_08$ThreesMade/BOS_data_07_08$ThreesAttempted)*100
best_threes<-max(BOS_data_07_08$three_point_per,na.rm = TRUE)
BOS_data_07_08[which(BOS_data_07_08$three_point_per==best_threes),"Name"]
## [1] "Ray Allen"
#    Which player has played the largest number of minutes?
max_minutes<-max(BOS_data_07_08$TotalMinutesPlayed)
BOS_data_07_08[which(BOS_data_07_08$TotalMinutesPlayed==max_minutes),"Name"]
## [1] "Paul Pierce"
#    Which player has the most "Steals"?
max_steals<-max(BOS_data_07_08$Steals)
BOS_data_07_08[which(BOS_data_07_08$Steals==max_steals),"Name"]...

By purchasing this solution you'll be able to access the following files:
Solution.docx and Solution.R.

$63.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Statistics-R Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats