medal_counts: Medal Counts for Winter Olympics by Country A dataset...

medal_countsR Documentation

Medal Counts for Winter Olympics by Country A dataset containing the medals and places won by each country, assuming the country has won at least 100 total medals

Description

Medal Counts for Winter Olympics by Country

A dataset containing the medals and places won by each country, assuming the country has won at least 100 total medals

Usage

medal_counts

Format

A data frame with 42 rows and 3 variables:

Country

name of country, as referred to by the USA

Medal

type of medal, factor with levels "gold", "silver" or "bronze"

totals

number of medals of that type, in counts

Examples

utils::head(medal_counts)

medal_counts |>
dplyr::mutate(Medal = forcats::fct_relevel(Medal,'bronze','silver','gold'),
      Country = reorder(Country, totals, sum)) |>
 plotly::plot_ly(x = ~Country, y = ~totals, color = ~Medal) |>
 plotly::add_bars() |>
 plotly::layout(barmode = "stack",
        hovermode = "x") |>
 plotly::layout(title = "Norway Has the Most Gold,
 Silver, <br> and Bronze Winter Olympic
 Medals <br> (1924 - 2014)")

sadleskorn/apply303 documentation built on April 14, 2022, 11:57 a.m.