18 BYU Baseball
Readings
Guided Instruction
PowerPoint explanation of joins and link to video walkthrough
Over the campfire, you and a friend get into a debate about which college in Utah has had the best MLB success. As an avid BYU fan, you want to prove your point, and you go to data to settle the debate. You need a clear visualization that depicts the performance of BYU players compared to other Utah college players that have played in the major leagues. The library(Lahman)
package has a comprehensive set of baseball data. It is great for testing out our relational data skills. We will also need a function to adjust player salaries due to inflation- library(priceR)
.
- Install the
library(Lahman)
and examine the available data sets.- Find the handful of data sets that you will need in that package to show full college name and player first and last names (not first and middle name) as well as their annual earnings.
- Install and load the
priceR
package, then use theadjust_for_inflation(price = your_earnings_vector, from_date = your_earnings_year_vector, country = "US", to_date = 2021)
function to get all earnings in 2021 dollars. - In an
.qmd
file make a plot (or two) showing how professional baseball player earnings who are alum of BYU compare to the professional players who are alum of other Utah schools. A simple bar graph comparing the total (or mean) of salaries per school is not sufficient; try to get beyond graphing simple data summaries. - Write a paragraph (or two) to summarize your findings and explain what conclusions you can draw from your visualization.
- Render the
.qmd
file. Push all the files created in the rendering process into your GitHub repository.
Submit
In I-learn submit a link to the .md
file containing your chart(s) on GitHub.