Question: In this lab we will be working with data from 2 0 1 6 - 2 3 of the Portland Thorns, a highlysuccessful National Women
In this lab we will be working with data from of the Portland Thorns, a highlysuccessful National Womens Soccer League NWSL team located in Portland, OR Our goalsincludevisualizing categorical datainvestigating associations between categorical datainvestigating associations with numerical dataWe will also see some new ways of working with data with R Packages and DataTheres nothing in this section that you actually need to do just read through tomake sure you understand whats happening.Thetidyversepackage includes many of the R commands we need to work with data.librarytidyverseThe data for this lab was sourced from thenwslRpackage on Github. The code below readsthis data from a csv file and then assigns the namethornsto the dataset.thornsreadcsvthornscsvThethornsdataset has rows and variables. The observations are all the Thorns gamesup through the season. The variables are as follows:
Variable DescriptongameidAn unique ID for the gamegamedateGame datehometeamName of the home team, abbreviatedawayteamName of the away team, abbreviatedopponentThe team Thorns played againsthomeptsNumber of points by the home teamawayptsNumber of points by the away teamresultResult of the game for Thorns win loss, tieyearSeason ThornsresultsIn this section we start looking at the categorical variableresultwhich records the resultwin loss, or tie for each game.Task Create a bar plot for the variableresult.Additionally, calculate the numbers of wins, losses, and ties. Hint: in previous activities, wehave used thecountfunction to do this kind of calculation.# add code here
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
