DS4PS / ays-r-coding-sum-2022

Introductory data science course in R, taught at the Andrew Young School GSU.
http://ds4ps.org/ays-r-coding-sum-2022/
2 stars 2 forks source link

Lab 3 clarification question #3

Open kyarosiuk1 opened 2 years ago

kyarosiuk1 commented 2 years ago

Hello, can you please clarify the "Plot average strikeouts by team" that we are to create in our Lab 3? I am not clear where do we see it plotted on the chart that we are replicating...in the provided example I see a blue line showing average strike for a league (league average)...If this is an extra we are to add/calculate to our chart, what would be the correct calculation for average strike per team? Would we need to calculate average within each team and plot it by team's name? I am sorry, but I am totally confused by the request to "Plot average strikeouts by team" ...

lecy commented 2 years ago

Each team data point in the Lahmann package and on the graph in Lab 3 (gray points) are already the team averages.

Look back over the NYT interactive graphic - if you select a team it adds an orange trendline for the team. That is what you are adding in this step - the visual highlighting part - but you don't need to tabulate anything new for this step.

https://archive.nytimes.com/www.nytimes.com/interactive/2013/03/29/sports/baseball/Strikeouts-Are-Still-Soaring.html

kyarosiuk1 commented 2 years ago

I see, so for step 2, do I just pick any team and plot the average for that team? Or which function do we need to use to add that dynamic button? (I was under impression that for Lab 3 we are doing a static plot only)...

jamisoncrawford commented 2 years ago

@kyarosiuk1 for Lab 03, it's not necessary to graph the dynamic component of the plot, which displays the history of the selected team's average. Instead, only graph the static components, which includes the blue trend line for the league average.

In Lab 04, you will use Shiny to create a dashboard by adding an interactive user input that graphs the selected team average.