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
cces16 <- read_csv("https://raw.githubusercontent.com/ryanburge/cces/master/CCES%20for%20Methods/small_cces.csv") | |
cces20 <- read_csv("https://www.dropbox.com/s/wuixmc67ae786wp/small_ces2020.csv?dl=1") | |
Codebook for 2016 | |
https://github.com/ryanburge/cces/raw/master/Codebooks/CCES_2016_Small_Codebook.pdf | |
Codebook for 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
cces <- read_csv("https://raw.githubusercontent.com/ryanburge/cces/master/CCES%20for%20Methods/small_cces.csv") | |
https://github.com/ryanburge/cces/raw/master/Codebooks/CCES_2016_Small_Codebook.pdf | |
https://emilhvitfeldt.github.io/r-color-palettes/discrete.html | |
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
Abortion scale construction: | |
1. Always allow a woman to obtain an abortion as a matter of choice. Support = 1, Oppose = 0 | |
2. Prohibit all abortions after the 20th week of pregnancy. Support = 0, Oppose = 1 | |
3. Allow employers to decline coverage of abortions in insurance plans. Support = 0, Oppose = 1 | |
4. Prohibit the expenditure of funds authorized or appropriated by federal law for any abortion. Support = 0, Oppose = 1 | |
5. Make abortions illegal in all circumstances. Support = 0, Oppose = 1. | |
# https://git.io/JEbT8 |
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
compare %>% | |
ggplot(., aes(x = date, y = r7, group = county, color = county, linetype = county)) + | |
geom_line() + | |
scale_color_gdocs() + | |
theme_rb()+ | |
theme(plot.subtitle = element_text(size = 10)) + | |
theme(legend.position = c(.2, .8)) + | |
labs(x = "Date", y = "Cases Per 1000 Per Day", title = "Comparing COVID Cases in Southern Illinois Counties", | |
subtitle = "", |
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
library(tidyverse) | |
library(socsci) #remotes::install_github("ryanburge/socsci") | |
median(cces08$V246, na.rm = TRUE) #8 | |
yyy1 <- cces08 %>% | |
filter(V246 <= 7) %>% |
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
arr <- read_csv("D://arrivals.csv") | |
arr <- arr %>% | |
mutate(name = replace_na(`Basic data and indicators`, "REMOVE")) %>% | |
select(-`Basic data and indicators`) | |
tot <- arr %>% | |
filter(X3 == "Total arrivals" | name != "REMOVE") %>% | |
relocate(name) |
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
## Grab the data here: | |
pop <- read.csv("https://raw.githubusercontent.com/ryanburge/pls2003_sp17/master/population.csv") %>% | |
mutate(height = round(height, 1)) %>% | |
mutate(weight = round(weight, 1)) | |
### More data here: | |
bball <- read_csv("https://raw.githubusercontent.com/ryanburge/pls2003_sp17/master/bball.csv", guess_max = 25000) | |
bball <- bball %>% |
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
library(tidyverse) | |
# library(haven) | |
library(car) | |
# cces20 <- read_dta("D://cces/data/cces20.dta") | |
cces20 <- cces20 %>% | |
mutate(white = car::recode(race, "1=1; else=0")) %>% |
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() |
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
1. Go to http://104.248.127.81:8787/auth-sign-in | |
2. User: your first name (no caps) | |
3. Password: your last name (no caps) | |
Type this: | |
library(socsci) | |
Paste this in to grab data: | |
cces <- read_csv("https://raw.githubusercontent.com/ryanburge/cces/master/CCES%20for%20Methods/small_cces.csv") |