SNAP Work

Author

CRG

Work Characteristics of Texas SNAP Recipients

Data: IPUMS USA, 2023 5-Year Estimates

Variables I pulled:

library(ipumsr,quietly = T)
library(dplyr,quietly = T)

Attaching package: 'dplyr'
The following objects are masked from 'package:stats':

    filter, lag
The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union
library(ggplot2,quietly = T)
library(survey,quietly = T)

Attaching package: 'survey'
The following object is masked from 'package:graphics':

    dotchart
ddi <- read_ipums_ddi("C:/Users/rayo-garza/Documents/R2024/usa_00078.xml")
dat <- read_ipums_micro(ddi)
Use of data from IPUMS USA is subject to conditions including that users should cite the data appropriately. Use command `ipums_conditions()` for more details.
dat <- zap_labels(dat)

Clean up – mutations, etc.

dat_tx <- dat |>
  filter(AGE >= 18, AGE <= 59)   #<---filtering for working age pop

dat_tx <- dat_tx |>
  mutate(
    snap = ifelse(FOODSTMP == 2, 1, 0),  # 1 = received SNAP in past 12 months
    employed = ifelse(EMPSTAT == 1, 1, 0),  # 1 = at work
    snap_employment_status = case_when(
      snap == 1 & employed == 1 ~ "SNAP recipient & Employed",
      snap == 1 & employed == 0 ~ "SNAP recipient & Not Employed",
      snap == 0 & employed == 1 ~ "Non-SNAP & Employed",
      snap == 0 & employed == 0 ~ "Non-SNAP & Not Employed",
      TRUE ~ NA_character_
    )
  )

Who is Employed & on SNAP?

library(srvyr)  
Warning: package 'srvyr' was built under R version 4.4.3

Attaching package: 'srvyr'
The following object is masked from 'package:stats':

    filter
design <- dat_tx |>
  as_survey_design(weights = PERWT)

snap_work_summary <- design |>
  filter(snap == 1) |>
  summarise(
    percent_employed = survey_mean(employed, vartype = "ci")
  )

snap_work_summary
# A tibble: 1 × 3
  percent_employed percent_employed_low percent_employed_upp
             <dbl>                <dbl>                <dbl>
1            0.593                0.588                0.597

EMployment Status by SNAP Part

employment_by_snap <- design |>
  group_by(snap) |>
  summarise(
    employment_rate = survey_mean(employed, vartype = "ci")
  )

employment_by_snap
# A tibble: 2 × 4
   snap employment_rate employment_rate_low employment_rate_upp
  <dbl>           <dbl>               <dbl>               <dbl>
1     0           0.767               0.766               0.769
2     1           0.593               0.588               0.597

So this means that the employment rate of people on SNAP is 59% and those not on SNAP is 77% – Most working age adults who receive SNAP in Texas are employed, SNAP supports low-income workers–not the work-averse!

ggplot(
  dat_tx |>
    filter(!is.na(snap_employment_status)) |>
    count(snap_employment_status, wt = PERWT) |>
    mutate(share = n / sum(n)),
  aes(x = snap_employment_status, y = share)
) +
  geom_col() +
  scale_y_continuous(labels = scales::percent) +
  labs(
    title = "Employment Status of Adults by SNAP Participation (Texas, Age 18–64)",
    x = NULL,
    y = "Share of Population"
  ) +
  theme_minimal()

SNAP Recipients by Emp Status

library(scales)


snap_emp_plot_data <- dat_tx |>
  filter(snap == 1) |>
  mutate(
    employment_status = ifelse(employed == 1, "Employed", "Not Employed")
  ) |>
  count(employment_status, wt = PERWT) |>
  mutate(
    percent = n / sum(n),
    label = paste0(percent_format(accuracy = 0.1)(percent), "\nN = ", format(round(n), big.mark = ","))
  )

ggplot(snap_emp_plot_data, aes(x = employment_status, y = percent, fill = employment_status)) +
  geom_col(width = 0.6) +
  geom_text(aes(label = label), vjust = 1.2, size = 5) +
  scale_y_continuous(labels = percent_format(accuracy = 1), expand = expansion(mult = c(0, 0.1))) +
  scale_fill_manual(values = c("#4CAF50", "#F44336")) +
  labs(
    title = "Employment Status Among SNAP Recipients in Texas (Ages 18–64)",
    x = NULL,
    y = "Share of SNAP Recipients"
  ) +
  theme_minimal(base_size = 14) +
  theme(legend.position = "none")

Using SNAP QC Data for 2023

library(dplyr)
library(readr)

Attaching package: 'readr'
The following object is masked from 'package:scales':

    col_factor
library(scales)

qc_pub_fy2023 <- read_csv("C:/Users/rayo-garza/Documents/R2024/qc_pub_fy2023.csv")
Warning: One or more parsing issues, call `problems()` on your data frame for details,
e.g.:
  dat <- vroom(...)
  problems(dat)
Rows: 43776 Columns: 854
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr   (1): STATENAME
dbl (690): FSAFIL1, FSAFIL2, FSAFIL3, FSAFIL4, FSAFIL5, FSAFIL6, FSAFIL7, FS...
lgl (163): FSAFIL12, FSAFIL13, FSAFIL14, FSAFIL15, FSAFIL16, REL12, REL13, R...

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
# View(qc_pub_fy2023)

#filters
qc_tx <- qc_pub_fy2023|>
  filter(STATE == 48, AGE1 >= 18, AGE1 <= 64)


qc_tx <- qc_tx|>
  mutate(
    disabled = DIS1 == 1,
    employed = EMPSTA1 == 1,
    abawd = ABWDST1 == 1,  # 1 = classified as ABAWD
    weight = as.numeric(FYWGT)
  )


qc_tx_nondis <- qc_tx %>% 
  filter(!disabled)  # filter for non-disabled adults only

#summarize weighted counts by ABAWD + employment
abawd_employment_summary <- summarise(
  group_by(qc_tx_nondis, abawd, employed),
  weighted_count = sum(weight, na.rm = TRUE),
  .groups = "drop"
)

#calculate 
abawd_employment_summary <- abawd_employment_summary %>%
  group_by(abawd) %>%
  mutate(
    share = weighted_count / sum(weighted_count),
    label = paste0(
      percent(share, accuracy = 0.1),
      "\nN = ", format(round(weighted_count), big.mark = ",")
    )
  )

print(abawd_employment_summary)
# A tibble: 4 × 5
# Groups:   abawd [2]
  abawd employed weighted_count share label               
  <lgl> <lgl>             <dbl> <dbl> <chr>               
1 FALSE FALSE            59735. 0.822 "82.2%\nN = 59,735" 
2 FALSE TRUE             12944. 0.178 "17.8%\nN = 12,944" 
3 TRUE  FALSE           525824. 0.565 "56.5%\nN = 525,824"
4 TRUE  TRUE            404525. 0.435 "43.5%\nN = 404,525"
library(ggplot2)

plot_df <- abawd_employment_summary |>
  mutate(
    abawd_label = ifelse(abawd, "ABAWD", "Non-ABAWD"),
    emp_label = ifelse(employed, "Employed", "Not Employed")
  )

ggplot(plot_df, aes(x = abawd_label, y = share, fill = emp_label)) +
  geom_col(position = "stack", width = 0.6) +
  geom_text(aes(label = label), 
            position = position_stack(vjust = 0.5), 
            size = 5, color = "white") +
  scale_y_continuous(labels = percent_format(accuracy = 1)) +
  scale_fill_manual(values = c("Employed" = "#4CAF50", "Not Employed" = "#F44336")) +
  labs(
    title = "Employment Status of Non-Disabled SNAP Adults in Texas (FY 2023)",
    x = "ABAWD Status",
    y = "Share of Group",
    fill = NULL
  ) +
  theme_minimal(base_size = 14)