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
| # Who is Moving? Demographic Realignment Among Ex-Mormons (2007–2024) | |
| # Analyzing Pew RLS 2007, 2014, and 2024 waves to figure out which ex-Mormons | |
| # are driving the Republican shift. | |
| library(tidyverse) | |
| library(haven) | |
| library(ggtext) | |
| library(showtext) | |
| # ── Fonts & Styling ────────────────────────────────────────────────────────── |
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
| # Where the Disaffiliated Land Politically — Pew RLS 2024 | |
| # Among people who left the religion they were raised in, where do they fall | |
| # on the political spectrum? Comparison across former religions. | |
| library(tidyverse) | |
| library(haven) | |
| library(ggtext) | |
| library(showtext) | |
| font_add("Cairo_bold", "~/Library/Fonts/Cairo-Bold.ttf") |
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(showtext) | |
| library(magick) | |
| font_add("Cairo_bold", "~/Library/Fonts/Cairo-Bold.ttf") | |
| font_add("Cairo", "~/Library/Fonts/Cairo-Regular.ttf") | |
| showtext::showtext_auto(enable = TRUE) | |
| showtext::showtext_opts(dpi = 300) |
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(stringr) | |
| library(scales) | |
| library(ggtext) | |
| library(patchwork) | |
| library(showtext) | |
| font_add("Cairo_bold", "~/Library/Fonts/Cairo-Bold.ttf") | |
| font_add("Cairo", "~/Library/Fonts/Cairo-Regular.ttf") | |
| showtext::showtext_auto(enable = TRUE) |
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(car) | |
| library(binom) | |
| library(ggtext) | |
| library(sjlabelled) | |
| library(clipr) | |
| library(showtext) | |
| font_add("Cairo_bold", "~/Library/Fonts/Cairo-Bold.ttf") |
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(clipr) | |
| # ── Load data ──────────────────────────────────────────────────────────── | |
| cumulative <- readRDS("./data/CES/cumulative_2006-2024.rds") | |
| # Load 2025 individual year data and harmonize to match cumulative columns | |
| # NOTE: verify variable names against data/CES/codebooks/CES25_Common.pdf |
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(car) | |
| library(binom) | |
| library(ggtext) | |
| library(sjlabelled) | |
| library(clipr) | |
| # ── Load data ────────────────────────────────────────────────────────────────── |
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) | |
| ### Starting with CES DATA |
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
| """ | |
| Pull median home square footage by state from FRED (Realtor.com data) and plot a bar chart. | |
| Series: MEDSQUFEE + state postal code (e.g., MEDSQUFEEUT) | |
| Get a free API key at: https://fredaccount.stlouisfed.org/login/secure/ | |
| """ | |
| import requests | |
| import pandas as pd | |
| import matplotlib.pyplot as plt |
NewerOlder