# Run this code to load the required packages
suppressMessages(suppressWarnings(suppressPackageStartupMessages({
library(mosaic)
library(supernova)
library(fivethirtyeight)
})))
nbaplayers <- read.csv("https://docs.google.com/spreadsheets/d/e/2PACX-1vSWOzObVF0AHcXHCxZepTDtTjhpIE4PkrrlnxK67XVxuOwt8iSqz9G-VQKwez54xZfXhYe1Yj5PlA0-/pub?gid=2123483031&single=true&output=csv", head = TRUE)
tail(nbaplayers, 10)
tail(filter(nbaplayers, player_name=="Stephen Curry"))
# Here we showed the percentage of NBA players in each team.
tally(nbaplayers$team, format="proportion")
# Top 10 heaviest NBA players in history
head(arrange(nbaplayers, desc(weight)), 10)
# It looks like Bhullar, Lauderdale, Shaq, Hamilton, and Miller are the 10 heavist NBA players in history
# Top 10 lightest NBA players in history
head(arrange(nbaplayers, weight), 10)
# It looks like Spid Webb and Earl Boykins are the top 10 lightest NBA players
# Sorted by shortest height
head(arrange(nbaplayers, height), 20)
# Sorted by smallest weight
head(arrange(nbaplayers, weight), 20)