# 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)
college_recent_grads
str(college_recent_grads)
tibble [173 × 21] (S3: tbl_df/tbl/data.frame)
$ rank : int [1:173] 1 2 3 4 5 6 7 8 9 10 ...
$ major_code : int [1:173] 2419 2416 2415 2417 2405 2418 6202 5001 2414 2408 ...
$ major : chr [1:173] "Petroleum Engineering" "Mining And Mineral Engineering" "Metallurgical Engineering" "Naval Architecture And Marine Engineering" ...
$ major_category : chr [1:173] "Engineering" "Engineering" "Engineering" "Engineering" ...
$ total : int [1:173] 2339 756 856 1258 32260 2573 3777 1792 91227 81527 ...
$ sample_size : int [1:173] 36 7 3 16 289 17 51 10 1029 631 ...
$ men : int [1:173] 2057 679 725 1123 21239 2200 2110 832 80320 65511 ...
$ women : int [1:173] 282 77 131 135 11021 373 1667 960 10907 16016 ...
$ sharewomen : num [1:173] 0.121 0.102 0.153 0.107 0.342 ...
$ employed : int [1:173] 1976 640 648 758 25694 1857 2912 1526 76442 61928 ...
$ employed_fulltime : int [1:173] 1849 556 558 1069 23170 2038 2924 1085 71298 55450 ...
$ employed_parttime : int [1:173] 270 170 133 150 5180 264 296 553 13101 12695 ...
$ employed_fulltime_yearround: int [1:173] 1207 388 340 692 16697 1449 2482 827 54639 41413 ...
$ unemployed : int [1:173] 37 85 16 40 1672 400 308 33 4650 3895 ...
$ unemployment_rate : num [1:173] 0.0184 0.1172 0.0241 0.0501 0.0611 ...
$ p25th : num [1:173] 95000 55000 50000 43000 50000 50000 53000 31500 48000 45000 ...
$ median : num [1:173] 110000 75000 73000 70000 65000 65000 62000 62000 60000 60000 ...
$ p75th : num [1:173] 125000 90000 105000 80000 75000 102000 72000 109000 70000 72000 ...
$ college_jobs : int [1:173] 1534 350 456 529 18314 1142 1768 972 52844 45829 ...
$ non_college_jobs : int [1:173] 364 257 176 102 4440 657 314 500 16384 10874 ...
$ low_wage_jobs : int [1:173] 193 50 0 0 972 244 259 220 3253 3170 ...
psychology <- c(head(arrange(college_recent_grads, desc(total)),1))
psychology
psychology$women/psychology$men
psychology$employed/psychology$unemployed
psychology$men/psychology$total
psychology$women/psychology$total
arrange(college_recent_grads, desc(median))
head(arrange(college_recent_grads, desc(median)), 10)
head(arrange(college_recent_grads, median), 10)