This file contains hidden or 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(stringr) | |
| library(data.table) | |
| library(binom) | |
| svys <- c( | |
| "./data/fears_surveys/w2015.sav", | |
| "./data/fears_surveys/w2017.sav", | |
| "./data/fears_surveys/w2019.sav", |
This file contains hidden or 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(binom) | |
| library(haven) | |
| library(car) | |
| library(ggtext) | |
| library(sjlabelled) | |
| # Load the dataset | |
| data <- readRDS("./data/CES/cumulative_2006-2024.rds") |
This file contains hidden or 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(binom) | |
| library(haven) | |
| library(car) | |
| library(ggtext) | |
| library(sjlabelled) | |
| # Load the dataset | |
| data <- readRDS("./data/CES/cumulative_2006-2024.rds") |
This file contains hidden or 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
| from google import genai | |
| import httpx | |
| import io | |
| from helium import * | |
| import datetime | |
| import pandas as pd | |
| import numpy as np | |
| import time | |
| from selenium import webdriver | |
| from webdriver_manager.chrome import ChromeDriverManager |
This file contains hidden or 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
| import survey_tools as st | |
| import pandas as pd | |
| from scipy.stats import norm | |
| import math | |
| ces_data = pd.read_csv("../data/CES/CES24_Common.csv") | |
| # crosstabs for career choice | |
| ces_data['industry_rc'] = st.recode(ces_data, "industry", "10=NaN") | |
| st.tabs(ces_data.query("religpew == 3"), "industry_rc", wts="commonweight", display="column") |
This file contains hidden or 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(binom) | |
| library(haven) | |
| library(car) | |
| library(ggtext) | |
| library(sjlabelled) | |
| # Load the dataset | |
| data <- readRDS("./data/CES/cumulative_2006-2024.rds") |
This file contains hidden or 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(binom) | |
| library(haven) | |
| library(car) | |
| library(ggtext) | |
| library(sjlabelled) | |
| library(clipr) | |
| # Load PRLS | |
| typology_data <- read.csv("./data/rls/mormon_typology.csv") |
This file contains hidden or 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(binom) | |
| library(haven) | |
| library(car) | |
| library(ggtext) | |
| library(sjlabelled) | |
| # Load the dataset | |
| data <- readRDS("./data/CES/cumulative_2006-2024.rds") |
This file contains hidden or 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(binom) | |
| library(haven) | |
| library(car) | |
| library(ggtext) | |
| library(sjlabelled) | |
| # Here is the sheet I used to merge in the gun control variable: | |
| # https://docs.google.com/spreadsheets/d/13Fo6SEF_B9nTSmnt3kLFt_EaVaNIvWl_iTwXUUoB3-Y/edit?usp=sharing |
This file contains hidden or 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(binom) | |
| library(haven) | |
| library(car) | |
| library(ggtext) | |
| library(sjlabelled) | |
| # Load the dataset | |
| data <- readRDS("./data/CES/cumulative_2006-2024.rds") |
NewerOlder