Basketball Data Science (With Applications in R)