dat %>%
drop_na() %>%
filter(year>1979) %>%
group_by(year,Party) %>%
summarise(passed=sum(all_pass)) %>%
ggplot(aes(x = year, y = passed, fill = Party)) +
geom_area(position = 'stack') +
scale_fill_manual(values= c("blue", "red")) +
ggtitle("Number of Bills Passed Since 1980") +
labs(x = "Year", y = "All Bills Passed")`summarise()` has grouped output by 'year'. You can override using the
`.groups` argument.