# Section 2 Exercise

Considering each of the following figures (including the captions). Some background to each dataset will be given, together with the intended aim of the plot. How might each figure be improved?

1. This plot uses the mtcars dataset (type ?mtcars for details). The aim is to show the relationship between weight and fuel economy in different models of car.
1. This plot uses the mvscores dataset from the MAS6005 library. The aim is to compare test match batting scores for one player, Michael Vaughan, between the matches he played as captain, and the matches where he was not captain1. (It is thought the burden of captaincy may affect a player’s form.)
1. This plot uses the inequality dataset from the MAS6005 library. The aim is to show how the UK’s gini coefficient2 compares with that of other countries in the OECD.
1. This plot uses the medals dataset from the MAS6005 library. The aim is to compare total number of medals won against population size3 in the 2016 Rio olympics.

Over the next few sections, we’ll take each plot in turn, and think about how they might be better drawn.

1. Data obtained from [ http://stats.espncricinfo.com/ci/engine/player/22182.html?class=1;template=results;type=allround;view=match] [Accessed on 21 March 2017]

2. OECD (2016), Income inequality (indicator). doi: 10.1787/459aa7f1-en [Accessed on 17 August 2016]

3. Population estimates obtained from [http://data.worldbank.org/indicator/SP.POP.TOTL?end=2015&start=2000] [Accessed on 6 October 2016]. The medal table was obtained from https://www.rio2016.com/en/medal-count-country, but this link is no longer active.