Skip to content

Instantly share code, notes, and snippets.

@dwillis
Created October 12, 2021 16:45
Show Gist options
  • Save dwillis/48bfe589e2fdf97301ce7443f35fffe0 to your computer and use it in GitHub Desktop.
Save dwillis/48bfe589e2fdf97301ce7443f35fffe0 to your computer and use it in GitHub Desktop.
allegany_sums_all <- allegany_athletics %>%
group_by(county, year) %>%
summarise(boys_total = sum(boys_participants), girls_total = sum(girls_participants)) %>%
select(county, year, boys_total, girls_total)
allegany_sums_without_cau <- allegany_athletics %>%
filter(is.na(type)) %>%
group_by(county, year) %>%
summarise(boys_without_cs = sum(boys_participants), girls_without_cs = sum(girls_participants)) %>%
select(county, year, boys_without_cs, girls_without_cs)
allegany_totals <- allegany_sums_all %>% left_join(allegany_sums_without_cau) %>% mutate(leaid = "2400030")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment