Tabulating degrees
AE 10
Load the data:
BA_degrees <- read_csv("data/BA-degrees.csv")Degrees awarded in 2015
Task 1: Recreate the table of degrees awarded in 2015.
# A tibble: 33 × 2
field perc
<chr> <dbl>
1 Business 0.192
2 Health professions and related programs 0.114
3 Social sciences and history 0.0881
4 Psychology 0.0620
5 Biological and biomedical sciences 0.0580
6 Engineering 0.0516
7 Visual and performing arts 0.0506
8 Education 0.0484
9 Communication, journalism, and related programs 0.0478
10 Homeland security, law enforcement, and firefighting 0.0331
# ℹ 23 more rows
# add code herePopular Bachelor’s degrees awarded over time
Group some degrees into “other” category:
BA_degrees_other <- BA_degrees |>
mutate(
field = if_else(
field == "Health professions and related programs",
"Health professions",
field
),
field = fct_other(
field,
keep = c(
"Business",
"Health professions",
"Social sciences and history"
)
),
) |>
group_by(year, field) |>
summarize(perc = sum(perc), .groups = "drop")Task 2: Recreate the table popular degrees with sparklines, without color
# add code hereTask 3: Recreate the table popular degrees with sparklines, with color
# add code here