| oly12 {VGAMdata} | R Documentation |
2012 Summer Olympics: Individuals Data
Description
Individual data for the Summer 2012 Olympic Games.
Usage
data(oly12)
Format
A data frame with 10384 observations on the following 14 variables.
NameThe individual competitor's name.
CountryCountry.
AgeA numeric vector, age in years.
HeightA numeric vector, height in m.
WeightA numeric vector, weight in kg.
SexA factor with levels
FandM.DOBA Date, date of birth.
PlaceOBPlace of birth.
GoldNumeric vector, number of such medals won.
SilverSimilar to
Gold.BronzeSimilar to
Gold.TotalA numeric vector, total number of medals.
SportA factor with levels
Archery,Athletics,Athletics,Triathlon,Badminton, etc.EventThe sporting event.
Details
This data set represents a very small modification of a
.csv spreadsheet from the source below.
Height has been converted to meters,
and date of birth is of a "Date" class
(see as.Date).
A few non-ASCII characters have been replaced by some ASCII sequence
(yet to be fixed up properly).
Some competitors share the same name. Some errors in the data are likely to exist.
Source
Downloaded from
http://www.guardian.co.uk/sport/series/london-2012-olympics-data
in 2013-03; more recently it has changed to
https://www.theguardian.com/sport/series/london-2012-olympics-data.
Examples
data(oly12)
mtab <- with(oly12, table(Country, Gold))
(mtab <- head(sort(mtab[, "1"] + 2 * mtab[, "2"], decreasing = TRUE), 10))
## Not run:
barplot(mtab, col = "gold", cex.names = 0.8, names = abbreviate(names(mtab)),
beside = TRUE, main = "2012 Summer Olympic Final Gold Medal Count",
ylab = "Gold medal count", las = 1, sub = "Top 10 countries")
## End(Not run)