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
| #!/usr/bin/env Rscript | |
| # Mormon CHEP vote charts (two charts, one script). | |
| # Chart 1: 2024 presidential v 2026 House vote flow (alluvial/Sankey-style). | |
| # Replicates the NORC-style "Presidential election 2024 v House election | |
| # 2026, vote share" chart for Mormons. | |
| # Chart 2: demographic breakdown of the change in vote margin 2024 -> 2026. | |
| # Replicates the NORC-style "Demographic breakdown / Change in House vote | |
| # margin" chart for Mormons. Tall (non-square) output. | |
| # | |
| # Sample (both charts): LDS LIKELY voters, weighted by CHEP_WEIGHT. |
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
| # Post 50 — Did the midterm blue wave reach Latter-day Saints? | |
| # Single-file merge of the two election posts (old 50: LDS districts + | |
| # 2026 results; old 51: CHEP party/approval/House-vote by religion). | |
| # Only the 9 charts in the published analysis are generated: | |
| # 50_midterm_1 UT House districts: expected share vs 2026 partial + swing | |
| # 50_midterm_2 western hex cartogram, top-20 LDS districts labeled | |
| # 50_midterm_3 western zoom map, top-20 LDS districts labeled | |
| # 50_midterm_4 top-20 LDS districts expected-vs-actual table | |
| # 50_midterm_5 UT 20 most LDS counties: Trump 2024 vs House 2026 | |
| # 50_midterm_6 ID 20 most LDS counties: Trump 2024 vs House 2026 |
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
| # Title: Physically In, Mentally Out (PIMO) Mormons — Pooled Pew RLS Crosstabs | |
| # Description: Pools Pew Religious Landscape Study 2007 and 2014 (no over-time | |
| # comparisons; 2023-24 excluded because it did not ask a one-true-church | |
| # question — verified in data/rls/codebook2024.xlsx and the official | |
| # 2023-24 RLS topline). Defines PIMOs among current Latter-day Saints as | |
| # weekly+ attenders who do not affirm the one-true-church claim | |
| # (One_True in 2:3 = "Many religions can lead to eternal life" or | |
| # "Neither/Both equally"; Don't know excluded). Homosexuality acceptance | |
| # and Right_and_Wrong are NOT part of the definition; they are profiled | |
| # as crosstab rows. Compares five columns — LDS overall, Active (non-PIMO), |
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
| # Title: Latter-day Saint Converts vs. Leavers — The Out/In Exchange Ratio (GSS, Pew RLS, & GFS) | |
| # Post Number: 48 | |
| # Author: Mormon Metrics | |
| # Output Images: | |
| # 1. images/48_lds_exchange_ratio_heatmap_1.png | |
| # 2. images/48_lds_exchange_ratio_overall_2.png | |
| # | |
| # Question: Post 47 (Fig. 2) showed where former Latter-day Saints land. | |
| # This post gives every religion its own base: for each religion, how many | |
| # leavers does it have for every 1 joiner? Leavers were raised in the row |
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
| # Title: Predicting Latter-day Saint Disaffiliation & Destination Traditions (GFS, GSS, & Pew RLS) | |
| # Post Number: 47 | |
| # Author: Mormon Metrics | |
| # Output Images: | |
| # 1. images/47_predicting_lds_leavers_forest_plot_1.png | |
| # 2. images/47_predicting_lds_leavers_landing_table_2.png | |
| library(haven) | |
| library(tidyverse) | |
| library(showtext) |
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
| # Title: Religious In-Flow, Out-Flow, and Retention in the United States (Global Flourishing Study) | |
| # Post Number: 46 | |
| # Author: Mormon Metrics | |
| # Output Images: | |
| # 1. images/46_gfs_inflow_outflow_table_1.png | |
| # 2. images/46_gfs_retention_ranking_2.png | |
| # 3. images/46_gfs_lds_outflow_destinations_3.png | |
| # 4. images/46_gfs_lds_inflow_origins_4.png | |
| # 5. images/46_gfs_inflow_outflow_broad_5.png |
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
| # ============================================================================== | |
| # 44_lds_scouting_exit_did.R | |
| # Comprehensive Econometric Study: Causal Impact of the LDS Scouting Exit (2005–2024) | |
| # 1. 19-Year Western Counties Panel DiD & Event Studies (2005–2023) | |
| # 2. Utah Regional Trends & Category Comparisons (2012–2023) | |
| # 3. Western Counties Panel Event Studies & Storefront DiD (2012–2023) | |
| # 4. Macroeconomic BEA Outdoor Recreation Activity Accounts (BEA ORSA 2012–2024) | |
| # Mormon Metrics | |
| # ============================================================================== |
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
| # Title: Idaho & Nevada Abortion Attitudes & Latter-day Saint Demographics (CES 2018–2025) | |
| # Post Number: 45 | |
| # Author: Mormon Metrics | |
| # Output Images: | |
| # 1. images/45_idaho_registered_voter_religion_1.png | |
| # 2. images/45_idaho_abortion_support_calc_2.png | |
| # 3. images/45_nevada_registered_voter_religion_3.png | |
| # 4. images/45_nevada_abortion_support_calc_4.png | |
| # 5. images/45_idaho_abortion_scenarios_5.png | |
| # 6. images/45_nevada_abortion_scenarios_6.png |
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
| # Mormon Metrics — Post 43 | |
| # Title: Devotion Metric and Total Fertility Heatmaps | |
| # Description: Visualizing the joint distribution of religious devotion and completed fertility | |
| # comparing the Cooperative Election Study (CES 2020) and the Pew Religious Landscape | |
| # Study (2014 & 2024 combined) among Latter-day Saints aged 40 and older. | |
| # - CES: Devout metric coded as 0 and 1 | |
| # - Pew RLS: Devotion index divided in half (median split) among LDS. | |
| library(tidyverse) | |
| library(haven) |
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
| # Title: Religious Behavior Index Over Time (2007–2024) | |
| # Description: Harmonizing Pew Religious Landscape Study data across 2007, 2014, and 2024 | |
| # to track longitudinal trends in religious behavior across religious traditions, | |
| # building on Ryan Burge's 2024 Religious Behavior Index. | |
| # Excludes religiously unaffiliated across all charts. | |
| library(tidyverse) | |
| library(haven) | |
| library(scales) | |
| library(ggtext) |
NewerOlder