Final medal count, by country, for the Summer 2008 and 2012 Olympic Games.

data(olym08)
data(olym12)

Format

A data frame with 87 or 85 observations on the following 6 variables.

rank

a numeric vector, overall ranking of the countries.

country

a factor.

gold

a numeric vector, number of gold medals.

silver

a numeric vector, number of silver medals.

bronze

a numeric vector, number of bronze medals.

totalmedal

a numeric vector, total number of medals.

% \item{\code{country}}{a factor. character vector. }

Details

The events were held during (i) August 8–24, 2008, in Beijing; and (ii) 27 July–12 August, 2012, in London.

References

The official English website was/is http://en.beijing2008.cn and http://www.london2012.com. Help from Viet Hoang Quoc is gratefully acknowledged.

See also

grc.

Examples

summary(olym08)
#>     ranking             country        gold            silver      
#>  Min.   : 1.00   Afghanistan: 1   Min.   : 0.000   Min.   : 0.000  
#>  1st Qu.:22.00   Algeria    : 1   1st Qu.: 0.000   1st Qu.: 1.000  
#>  Median :44.00   Argentina  : 1   Median : 1.000   Median : 1.000  
#>  Mean   :43.03   Armenia    : 1   Mean   : 3.471   Mean   : 3.483  
#>  3rd Qu.:65.00   Australia  : 1   3rd Qu.: 3.000   3rd Qu.: 4.000  
#>  Max.   :81.00   Austria    : 1   Max.   :51.000   Max.   :38.000  
#>                  (Other)    :81                                    
#>      bronze         totalmedal    
#>  Min.   : 0.000   Min.   :  1.00  
#>  1st Qu.: 1.000   1st Qu.:  2.00  
#>  Median : 2.000   Median :  4.00  
#>  Mean   : 4.057   Mean   : 11.01  
#>  3rd Qu.: 4.000   3rd Qu.: 10.00  
#>  Max.   :36.000   Max.   :110.00  
#>                                   
summary(olym12)
#>     ranking             country        gold            silver      
#>  Min.   : 1.00   Afghanistan: 1   Min.   : 0.000   Min.   : 0.000  
#>  1st Qu.:22.00   Algeria    : 1   1st Qu.: 0.000   1st Qu.: 1.000  
#>  Median :42.00   Argentina  : 1   Median : 1.000   Median : 1.000  
#>  Mean   :42.11   Armenia    : 1   Mean   : 3.553   Mean   : 3.576  
#>  3rd Qu.:63.00   Australia  : 1   3rd Qu.: 3.000   3rd Qu.: 4.000  
#>  Max.   :79.00   Azerbaijan : 1   Max.   :46.000   Max.   :29.000  
#>                  (Other)    :79                                    
#>      bronze         totalmedal    
#>  Min.   : 0.000   Min.   :  1.00  
#>  1st Qu.: 1.000   1st Qu.:  2.00  
#>  Median : 2.000   Median :  4.00  
#>  Mean   : 4.188   Mean   : 11.32  
#>  3rd Qu.: 5.000   3rd Qu.: 12.00  
#>  Max.   :32.000   Max.   :104.00  
#>                                   
## maybe str(olym08) ; plot(olym08) ...
if (FALSE)  par(mfrow = c(1, 2))
myylim <- c(0, 55)
with(head(olym08, n = 8),
barplot(rbind(gold, silver, bronze),
   col = c("gold", "grey", "brown"),  # No "silver" or "bronze"!
#          "gold", "grey71", "chocolate4",
   names.arg = country, cex.names = 0.5, ylim = myylim,
   beside = TRUE, main = "2008 Summer Olympic Final Medal Count",
   ylab = "Medal count", las = 1,
   sub = "Top 8 countries; 'gold'=gold, 'grey'=silver, 'brown'=bronze"))

with(head(olym12, n = 8),
barplot(rbind(gold, silver, bronze),
   col = c("gold", "grey", "brown"),  # No "silver" or "bronze"!
   names.arg = country, cex.names = 0.5, ylim = myylim,
   beside = TRUE, main = "2012 Summer Olympic Final Medal Count",
   ylab = "Medal count", las = 1,
   sub = "Top 8 countries; 'gold'=gold, 'grey'=silver, 'brown'=bronze"))  # \dontrun{}