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

medal_location2R 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 1 total medal; helpful for geospatial mapping

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 1 total medal; helpful for geospatial mapping

Usage

medal_location2

Format

A data frame with 36 rows and 6 variables:

name

name of country, as referred to by the USA

iso_a3

country code, as referred to by the UN

bronze

number of bronze medals, in counts

gold

number of gold medals, in counts

silver

number of silver medals, in counts

total

total number of medals, sum of bronze, gold, and silver

Examples

utils::head(medal_location2)

plotly::plot_ly(medal_location2,
type='choropleth',
locations=medal_location2$iso_a3,
z=medal_location2$total, text=medal_location2$hover, colorscale="Blues",
reversescale = TRUE) |> # make darker countries = more medals
 plotly::layout(title = "Winter Olympic Medals Won per Country <br> (1924 - 2014)") |>
 plotly::colorbar(title = "Total Medals")

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