Skip to content

Instantly share code, notes, and snippets.

@ryanburge
Last active February 17, 2020 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanburge/86cf2c7ae1af9ff3f70a01f8528bed23 to your computer and use it in GitHub Desktop.
Save ryanburge/86cf2c7ae1af9ff3f70a01f8528bed23 to your computer and use it in GitHub Desktop.
SBC conservative
graph <- gss %>%
filter(denom == 14) %>%
filter(attend == 6 | attend == 7 | attend == 8) %>%
mutate(literal = car::recode(bible, "1=1; 2:3=0; else = NA")) %>%
group_by(year) %>%
mean_ci(literal)
graph %>%
ggplot(., aes(x = year, y = mean)) +
geom_point(size=3, color="white") +
geom_point(size=2, shape=1) +
geom_point(size=1, shape=19) +
geom_smooth(se = FALSE, linetype = "twodash", color = "black") +
y_pct() +
theme_gg("Abel") +
labs(x = "", y = "", title = "Southern Baptists Who are Biblical Literalists", caption = "@ryanburge\nData 1984-2018", subtitle = "Among Weekly Attenders") +
ggsave("E://sbc_literalism.png", type = "cairo-png")
graph <- gss %>%
filter(denom == 14) %>%
filter(attend == 6 | attend == 7 | attend == 8) %>%
mutate(gays = car::recode(homosex, "1:2=1; 3:4=0; else = NA")) %>%
group_by(year) %>%
mean_ci(gays)
graph %>%
ggplot(., aes(x = year, y = mean)) +
geom_point(size=3, color="white") +
geom_point(size=2, shape=1) +
geom_point(size=1, shape=19) +
geom_smooth(se = FALSE, linetype = "twodash", color = "darkorchid") +
y_pct() +
theme_gg("Abel") +
labs(x = "", y = "", title = "Southern Baptists Who Believe Homosexual Sex is Wrong", caption = "@ryanburge\nData 1984-2018", subtitle = "Among Weekly Attenders") +
ggsave("E://sbc_homosex.png", type = "cairo-png")
graph <- gss %>%
filter(denom == 14) %>%
filter(attend == 6 | attend == 7 | attend == 8) %>%
gss_pid3(partyid) %>%
group_by(year) %>%
ct(pid3) %>%
filter(pid3 == "Republican")
graph %>%
ggplot(., aes(x = year, y = pct)) +
geom_point(size=3, color="white") +
geom_point(size=2, shape=1) +
geom_point(size=1, shape=19) +
geom_smooth(se = FALSE, linetype = "twodash", color = "firebrick3") +
y_pct() +
theme_gg("Abel") +
labs(x = "", y = "", title = "Southern Baptists Who Are Republicans", caption = "@ryanburge\nData 1984-2018", subtitle = "Among Weekly Attenders") +
ggsave("E://sbc_repub.png", type = "cairo-png")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment