oly12: 2012 Summer Olympics: Individuals Data

oly12R 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.

Name

The individual competitor's name.

Country

Country.

Age

A numeric vector, age in years.

Height

A numeric vector, height in m.

Weight

A numeric vector, weight in kg.

Sex

A factor with levels F and M.

DOB

A Date, date of birth.

PlaceOB

Place of birth.

Gold

Numeric vector, number of such medals won.

Silver

Similar to Gold.

Bronze

Similar to Gold.

Total

A numeric vector, total number of medals.

Sport

A factor with levels Archery, Athletics, Athletics, Triathlon, Badminton, etc.

Event

The 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)

VGAMdata documentation built on Sept. 18, 2023, 9:08 a.m.