generated from dlab-berkeley/D-Lab-Workshop-Template
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Challenge 6:
The challenge asks us to sort by the share of people who are essential workers. But the solution sorts by degree
Challenge 6: Putting it all together ----
d_state <- d |>
limit to working adults
filter(employment_status == 1 & age >= 18) |>
group by state
group_by(state) |>
calculate summary statistics
summarize(avg_income = mean(income, na.rm = T),
college = mean(educ == "BA" | educ == "graduate"),
essential_worker = mean(worker_type == 3)) |>
sort by share with BA or graduate degree
arrange(college)
Metadata
Metadata
Assignees
Labels
No labels