#RWC2019: using geom_hline

In my investigation of single numbers to characterise performance in #RWC2019, I have been using ggplot to visualise the data from World Rugby (link).

In the visualisation below, I was keen to look at outliers <1 and >4. I found four games. A fifth game, Australia v Fiji is a 1.20 game.

I used geom_hline() with a yintercept to draw lines at 1 and 4. For these lines I used the geom_hline() function, and specified a range for the lines, their colour and their size (link):

geom_hline(yintercept = range(1, 4), color=’coral’, size=1)

I included the original geom_hline() for the median ratio. My code for this was:

geom_hline(yintercept = 2.16)

I checked the accuracy of this median with median(df$Ratio) (the result was a median of 2.155 which I rounded up to 2.16.)

Photo Credit

Reaching to score (World Rugby)

#RWC2019: thinking of games as single numbers

World Rugby provide data about each game at #RWC2019 (link). These data include a record of kicks, passes, scrums and lineouts.

For some time, I have been interested in whether we can describe a game in a single number. This number expresses the relationships between kicks, passes, scrums and lineouts. To date, 28 games have been played. In these games, my numbers vary from 0.52 to 5.34. The median ratio is 2.16.

The 28 games as a single number (a ratio of kicks/passes divided by lineouts/scrums):

I have used ggplot to visualise these data points with geom_point and identified the range of ratios:

I used the glm () function to look at the relationship between the ratios: (“glm is used to fit generalized linear models, specified by giving a symbolic description of the linear predictor and a description of the error distribution” (link)).

The median ratio for the 28 games played is 2.16. I used the geom_hline function to draw this median (link).

Photo Credit

France v Tonga (World Rugby)

#RWC2019 after 22 games

World Rugby provides data on each game palyed at RWC2019 (link). I am using these data to keep a record of the tournament ona Google Sheet (link).

I have used the data to help me explore R and to look carefully at colour blind palettes (link).

My record of the twenty-games played so far include these ggplots:

I used the geom_smooth () option to look at penalties and free kicks conceded. This example uses the glm method. I used it as an example of a generalised linear model with a small number of data points (link).

I had a look at the number of lineouts and scrums in a game. I used the size function in this visualisation

I looked at kicks and passes too in order to think about the flow of a game. So far the total passes in a game have ranged from 205 to 367.

My median data for the twenty-games are:

  • 16 penalties and free kicks conceded.
  • 60 kicks.
  • 260 passes.
  • 14 scrums
  • 25 lineouts

Photo Credit

Before the Game (Ian Freeman, Twitter)