medal_counts | R 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
medal_counts
A data frame with 42 rows and 3 variables:
name of country, as referred to by the USA
type of medal, factor with levels "gold", "silver" or "bronze"
number of medals of that type, in counts
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)")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.