Last active
November 11, 2020 23:03
-
-
Save ryanburge/4ac9e7454f04c82e7ae6ef1a2f5b2ae0 to your computer and use it in GitHub Desktop.
Assignment #1 Graduate Students Fall 2020
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TUTORIAL: https://rpubs.com/ryanburge/fall_2019 | |
For each answer, please provide your syntax and a written description of the answer. | |
This will be due on November 22, 2020 at 8 PM in the Dropbox. | |
You can take a look at the variable names by typing: | |
gss %>% glimpse() | |
after you have loaded your data into the console. | |
####### Problem Set #1 ######## | |
The following students will answer these five questions: | |
1. Irem | |
2. Brock | |
3. Kendyl | |
gss <- read_csv("https://raw.githubusercontent.com/ryanburge/ct/master/gss_small.csv", guess_max = 25000) | |
Codebook: https://gssdataexplorer.norc.org/ | |
1. How many people had earned a 4 year college degree in 1972? How had that changed by 2018? | |
2. Are men or women more likely to live in a trailer (use only the data from 2010-2018)? | |
3. Visualize the trend in gun ownership among Democrats and Republicans since 1973. | |
4. Visualize the support for the right of someone to end their own life if they had a terminal illness in 2012 by religious tradition. | |
reltrad = 1 Evangelical | |
reltrad = 2 Mainline | |
reltrad = 3 Black Prot. | |
reltrad = 4 Catholic | |
reltrad = 5 Jewish | |
reltrad = 6 Other Faith | |
reltrad = 7 No Religion | |
5. Are men or women more likely to say that sex between two adults of the same gender is "not wrong at all"? Visualize how that has changed over time. | |
####### Problem Set #2 ######## | |
The following students will answer these five questions: | |
1. Noah | |
2. Skylar | |
3. Alec | |
gss <- read_csv("https://raw.githubusercontent.com/ryanburge/ct/master/gss_small.csv", guess_max = 25000) | |
Codebook: https://gssdataexplorer.norc.org/ | |
1. What percentage of people were over the age of 60 in the 1972 survey? What percentage in 2018? | |
2. Are women more likely to support abortion in the case of a birth defect than men? Has it always been that way? Visualize your result. | |
3. Which religious tradition had the highest average church attendance in 2000? Visualize this. | |
reltrad = 1 Evangelical | |
reltrad = 2 Mainline | |
reltrad = 3 Black Prot. | |
reltrad = 4 Catholic | |
reltrad = 5 Jewish | |
reltrad = 6 Other Faith | |
reltrad = 7 No Religion | |
4. What percentage of high school dropouts had a father who also dropped out of college in 2014? | |
5. What percentage of people with a 4 year college degree are also married to someone with a 4 year college degree in 2018? | |
####### Problem Set #3 ######## | |
The following students will answer these five questions: | |
1. Liz | |
2. Karen | |
3. Hunter | |
gss <- read_csv("https://raw.githubusercontent.com/ryanburge/ct/master/gss_small.csv", guess_max = 25000) | |
Codebook: https://gssdataexplorer.norc.org/ | |
1. What percentage of white people had at least a high school diploma in 1972? What about 2018? | |
2. Are women more likely to own a gun than men? Has this changed over time? | |
3. Which religious tradition had the highest level of education in 2010? Visualize this. | |
4. What percentage of people had both a mother and father with a 4 year college degree in 2016? | |
5. How has the partisanship of white men changed over time? Visualize this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Error Bars
error_bar <- function(wd){ if(missing(wd)){ geom_errorbar(aes(ymin=lower, ymax=upper), width=.2, position=position_dodge(.9)) } else{ geom_errorbar(aes(ymin=lower, ymax=upper), width=wd, position=position_dodge(.9)) } }